[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
Sat Jan 31 09:52:23 PST 2026
https://github.com/zeyi2 requested changes to this pull request.
Thanks for working on the issue!
However the current fix looks too broad, it completely skips generic lambdas. This can lead to False Negatives (valid non-const parameters in generic lambdas won't be flagged).
I think the current `markCanNotBeConst` does not handle `CXXUnresolvedConstructExpr`, a more accurate fix would be to explicitly handle that in the implementation.
There is a very similar PR that you can use as a reference: https://github.com/llvm/llvm-project/pull/177345
https://github.com/llvm/llvm-project/pull/179051
More information about the cfe-commits
mailing list