Skip to content

Commit c54a8ac

Browse files
[Sema] Use StringRef::ltrim (NFC)
1 parent 8d982e5 commit c54a8ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18376,7 +18376,7 @@ static bool isSetterLikeSelector(Selector sel) {
1837618376
if (sel.isUnarySelector()) return false;
1837718377

1837818378
StringRef str = sel.getNameForSlot(0);
18379-
while (!str.empty() && str.front() == '_') str = str.substr(1);
18379+
str = str.ltrim('_');
1838018380
if (str.starts_with("set"))
1838118381
str = str.substr(3);
1838218382
else if (str.starts_with("add")) {

0 commit comments

Comments
 (0)