diff clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children 1f2b6ac9f198
line wrap: on
line diff
--- a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp	Wed Jul 21 10:27:27 2021 +0900
+++ b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp	Wed Nov 09 17:45:10 2022 +0900
@@ -49,13 +49,11 @@
 
   // Bail out if the contents of the macro are containing keywords that are
   // making the macro too complex.
-  if (std::find_if(
-          MI->tokens().begin(), MI->tokens().end(), [](const Token &T) {
-            return T.isOneOf(tok::kw_if, tok::kw_else, tok::kw_switch,
-                             tok::kw_case, tok::kw_break, tok::kw_while,
-                             tok::kw_do, tok::kw_for, tok::kw_continue,
-                             tok::kw_goto, tok::kw_return);
-          }) != MI->tokens().end())
+  if (llvm::any_of(MI->tokens(), [](const Token &T) {
+        return T.isOneOf(tok::kw_if, tok::kw_else, tok::kw_switch, tok::kw_case,
+                         tok::kw_break, tok::kw_while, tok::kw_do, tok::kw_for,
+                         tok::kw_continue, tok::kw_goto, tok::kw_return);
+      }))
     return;
 
   for (unsigned ArgNo = 0U; ArgNo < MI->getNumParams(); ++ArgNo) {