[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
Mon Feb 2 01:35:55 PST 2026
================
@@ -224,6 +224,12 @@ void NonConstParameterCheck::markCanNotBeConst(const Expr *E,
} else if (const auto *ILE = dyn_cast<InitListExpr>(E)) {
for (unsigned I = 0U; I < ILE->getNumInits(); ++I)
markCanNotBeConst(ILE->getInit(I), true);
+ } else if (const auto *UCE = dyn_cast<CXXUnresolvedConstructExpr>(E)) {
+ // Template-dependent constructor (e.g., in generic lambdas).
----------------
zeyi2 wrote:
Sorry for the push back, but IMO we'd better remove these unnecessary comments :)
https://github.com/llvm/llvm-project/pull/179051
More information about the cfe-commits
mailing list