Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label May 25, 2025
@llvmbot
Copy link
Member

llvmbot commented May 25, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/141413.diff

1 Files Affected:

  • (modified) clang/utils/TableGen/SveEmitter.cpp (+1-3)
diff --git a/clang/utils/TableGen/SveEmitter.cpp b/clang/utils/TableGen/SveEmitter.cpp
index 1bae1c6a27afd..b506546110983 100644
--- a/clang/utils/TableGen/SveEmitter.cpp
+++ b/clang/utils/TableGen/SveEmitter.cpp
@@ -252,9 +252,7 @@ class Intrinsic {
   /// a short form without the type-specifiers, e.g. 'svld1(..)' instead of
   /// 'svld1_u32(..)'.
   static bool isOverloadedIntrinsic(StringRef Name) {
-    auto BrOpen = Name.find('[');
-    auto BrClose = Name.find(']');
-    return BrOpen != std::string::npos && BrClose != std::string::npos;
+    return Name.contains('[') && Name.contains(']');
   }
 
   /// Return true if the intrinsic takes a splat operand.

@kazutakahirata kazutakahirata merged commit f4b311b into llvm:main May 25, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250525_StringRef_idiom_clang_TableGen branch May 25, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants