[PATCH] D140760: [clang-tidy] Support begin/end free functions in modernize-loop-convert

Chris Cotter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 18:35:35 PDT 2023


ccotter added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:158-159
+                                       callee(cxxMethodDecl(BeginNameMatcher))),
+                     callExpr(argumentCountIs(1),
+                              callee(functionDecl(BeginNameMatcher)))))
           .bind(BeginCallName);
----------------
PiotrZSL wrote:
> Now it will also catch calls to single parameter methods...
> maybe `unless(cxxMethodDecl())`, after all we want to catch only functions
I think `usesADL()` accomplishes the same thing here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140760/new/

https://reviews.llvm.org/D140760



More information about the cfe-commits mailing list