Skip to content

Commit e785793

Browse files
kazutakahiratasivan-shani
authored andcommitted
[TableGen] Use StringRef::contains (NFC) (llvm#141413)
1 parent 381f2d7 commit e785793

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/utils/TableGen/SveEmitter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,7 @@ class Intrinsic {
252252
/// a short form without the type-specifiers, e.g. 'svld1(..)' instead of
253253
/// 'svld1_u32(..)'.
254254
static bool isOverloadedIntrinsic(StringRef Name) {
255-
auto BrOpen = Name.find('[');
256-
auto BrClose = Name.find(']');
257-
return BrOpen != std::string::npos && BrClose != std::string::npos;
255+
return Name.contains('[') && Name.contains(']');
258256
}
259257

260258
/// Return true if the intrinsic takes a splat operand.

0 commit comments

Comments
 (0)