[PATCH] D96131: [clang-tidy] Simplify function complexity check

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 20 09:23:50 PST 2021


steveire added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:505
+      functionDecl(isDefinition(), unless(isWeak())).bind("func"), this);
+  Finder->addMatcher(lambdaExpr().bind("lambda"), this);
 }
----------------
njames93 wrote:
> Am I right in assuming lambdas need to be explicitly matched because in the traversal mode their operator() isn't matched as a functionDecl?
Yes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96131



More information about the cfe-commits mailing list