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

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 00:13:40 PST 2024


Author: Kazu Hirata
Date: 2024-01-22T00:13:29-08:00
New Revision: a54463a4c6c32810b064e02b39e2c8f0de974006

URL: https://github.com/llvm/llvm-project/commit/a54463a4c6c32810b064e02b39e2c8f0de974006
DIFF: https://github.com/llvm/llvm-project/commit/a54463a4c6c32810b064e02b39e2c8f0de974006.diff

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

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp
index 865c88391b0b4b..ff5b885aa95f81 100644
--- a/clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/EmptyCatchCheck.cpp
@@ -46,7 +46,7 @@ AST_MATCHER_P(CompoundStmt, hasAnyTextFromList, std::vector<llvm::StringRef>,
   StringRef Text = Lexer::getSourceText(
       CharSourceRange::getTokenRange(Node.getSourceRange()), SM,
       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);
   });
 }


        


More information about the cfe-commits mailing list