[PATCH] D96281: [clang-tidy] Add options to flag individual core increments and to ignore macros to readability-function-cognitive-complexity check.

Jens Massberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 01:46:39 PST 2021


massberg marked 2 inline comments as done.
massberg added a comment.

Thanks for the comments!



================
Comment at: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:230
+  explicit FunctionASTVisitor(const bool IgnoreMacros)
+      : RecursiveASTVisitor<FunctionASTVisitor>(), IgnoreMacros(IgnoreMacros){};
+
----------------
alexfh wrote:
> Is a default base class constructor entry necessary in the class initializer list?
You are right, that wasn't needed.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-function-cognitive-complexity.rst:22
+
+   If set to `true`, the check will flag every basic increment. Default
+   is `true`.
----------------
alexfh wrote:
> What does "flag every basic increment" mean? Can you explain in more detail and maybe add an example?
I hope the new description explains now the flag sufficiently.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96281



More information about the cfe-commits mailing list