Skip to content

Commit

Permalink
[clang-tidy] Use StringRef::consume_front (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 14, 2024
1 parent 2ae795d commit bc27f35
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions clang-tools-extra/clang-tidy/GlobList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ namespace clang::tidy {
// from the GlobList.
static bool consumeNegativeIndicator(StringRef &GlobList) {
GlobList = GlobList.trim();
if (GlobList.starts_with("-")) {
GlobList = GlobList.substr(1);
return true;
}
return false;
return GlobList.consume_front("-");
}

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

0 comments on commit bc27f35

Please sign in to comment.