[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 04:58:11 PST 2021


lebedev.ri 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) {
----------------
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.


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