[PATCH] D96281: [clang-tidy] Add options to describe individual core increments to readability-function-cognitive-complexity check.
Jens Massberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 3 08:10:49 PST 2021
massberg marked an inline comment as done.
massberg added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-function-cognitive-complexity-flags.cpp:16
+ // CHECK-NOTES: :[[@LINE-1]]:6: warning: function 'func_of_complexity_4' has cognitive complexity of 4 (threshold 0) [readability-function-cognitive-complexity]
+ // CHECK-NOTES-THRESHOLD5-NOT: :[[@LINE-2]]:6: warning:
+ if (1) {
----------------
lebedev.ri wrote:
> Note that i'm not sure if we need negative checklines, but if we do, only checking for `warning:`
> (without `@LINE` stuff) should be best.
We do not need them, so I have removed them.
If there are unexpected notes, the test fails.
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