[PATCH] D96281: [clang-tidy] Add options to describe individual core increments to readability-function-cognitive-complexity check.
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 3 08:12:57 PST 2021
lebedev.ri added a comment.
In D96281#2599951 <https://reviews.llvm.org/D96281#2599951>, @lebedev.ri wrote:
> If you need help committing this, please specify `name <e at ma.il>` to be used for git commit author field.
================
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) {
----------------
massberg wrote:
> 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.
Great, thanks for checking!
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