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

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 20 07:47:12 PST 2021


njames93 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);
 }
----------------
Am I right in assuming lambdas need to be explicitly matched because in the traversal mode their operator() isn't matched as a functionDecl?


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