[clang-tools-extra] [clang-tidy] Add IgnoreAboveThreshold option to readability-function-cognitive-complexity (PR #178965)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 31 07:14:43 PST 2026
================
@@ -177,6 +177,13 @@ Changes in existing checks
now uses separate note diagnostics for each uninitialized enumerator, making
it easier to see which specific enumerators need explicit initialization.
+- Improved :doc:`readability-function-cognitive-complexity
+ <clang-tidy/checks/readability/function-cognitive-complexity>` check:
+
+ - Added `IgnoreAboveThreshold` option to skip functions with complexity
+ at or above a certain threshold, allowing users to ignore "hopelessly"
+ complex functions.
----------------
EugeneZelenko wrote:
```suggestion
- Improved :doc:`readability-function-cognitive-complexity
<clang-tidy/checks/readability/function-cognitive-complexity>` check by
adding `IgnoreAboveThreshold` option to skip functions with complexity at or
above a certain threshold, allowing users to ignore "hopelessly" complex
functions.
```
https://github.com/llvm/llvm-project/pull/178965
More information about the cfe-commits
mailing list