[clang-tools-extra] [clang-tidy] Fix false positive for generic lambda parameters in readability-non-const-parameter (PR #179051)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 12 19:59:15 PST 2026
================
@@ -216,7 +216,8 @@ Changes in existing checks
- Improved :doc:`readability-non-const-parameter
<clang-tidy/checks/readability/non-const-parameter>` check by avoiding false
- positives on parameters used in dependent expressions.
+ positives for pointer parameters in generic lambdas (C++20 lambdas with
----------------
zeyi2 wrote:
nit: `in dependent expressions (e.g. inside generic lambdas).` WDYT?
rationale: we introduced these lines
```c++
if (T->isDependentType())
markCanNotBeConst(VD->getInit(), false);
```
that are meant to support `DependentType`
https://github.com/llvm/llvm-project/pull/179051
More information about the cfe-commits
mailing list