Skip to content

Commit 771ab15

Browse files
[clang-tidy] Use StringRef::ltrim (NFC)
1 parent eccd279 commit 771ab15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void HeaderGuardCheck::registerPPCallbacks(const SourceManager &SM,
281281

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

287287
bool HeaderGuardCheck::shouldSuggestEndifComment(StringRef FileName) {

0 commit comments

Comments
 (0)