[clang-tidy] Use llvm::any_of (NFC)

This commit is contained in:
Kazu Hirata 2024-01-22 00:13:29 -08:00
parent 234da20377
commit a54463a4c6

View File

@ -46,7 +46,7 @@ AST_MATCHER_P(CompoundStmt, hasAnyTextFromList, std::vector<llvm::StringRef>,
StringRef Text = Lexer::getSourceText( StringRef Text = Lexer::getSourceText(
CharSourceRange::getTokenRange(Node.getSourceRange()), SM, CharSourceRange::getTokenRange(Node.getSourceRange()), SM,
Context.getLangOpts()); Context.getLangOpts());
return std::any_of(List.begin(), List.end(), [&](const StringRef &Str) { return llvm::any_of(List, [&](const StringRef &Str) {
return Text.contains_insensitive(Str); return Text.contains_insensitive(Str);
}); });
} }