Skip to content

Commit

Permalink
[clang-tidy] Use StringRef::ltrim (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 13, 2024
1 parent eccd279 commit 771ab15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void HeaderGuardCheck::registerPPCallbacks(const SourceManager &SM,

std::string HeaderGuardCheck::sanitizeHeaderGuard(StringRef Guard) {
// Only reserved identifiers are allowed to start with an '_'.
return Guard.drop_while([](char C) { return C == '_'; }).str();
return Guard.ltrim('_').str();
}

bool HeaderGuardCheck::shouldSuggestEndifComment(StringRef FileName) {
Expand Down

0 comments on commit 771ab15

Please sign in to comment.