Skip to content

Commit bc27f35

Browse files
[clang-tidy] Use StringRef::consume_front (NFC)
1 parent 2ae795d commit bc27f35

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

clang-tools-extra/clang-tidy/GlobList.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ namespace clang::tidy {
1616
// from the GlobList.
1717
static bool consumeNegativeIndicator(StringRef &GlobList) {
1818
GlobList = GlobList.trim();
19-
if (GlobList.starts_with("-")) {
20-
GlobList = GlobList.substr(1);
21-
return true;
22-
}
23-
return false;
19+
return GlobList.consume_front("-");
2420
}
2521

2622
// Converts first glob from the comma-separated list of globs to Regex and

0 commit comments

Comments
 (0)