[clang] [Clang] Avoid numbering lambdas with invalid types (PR #232606)
Kunal Dubey via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 17 01:26:39 PDT 2026
================
@@ -1531,7 +1531,8 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Method);
- handleLambdaNumbering(Class, Method);
+ if (!Method->getType()->containsErrors())
+ handleLambdaNumbering(Class, Method);
----------------
xakep8 wrote:
I did try that but that did not fix the issue I tried
```cpp
if (Param->isInvalidDecl())
continue;
```
but even if I do this the params stay in the paraminfo and numbering will still happen which would be broken and crash.
https://github.com/llvm/llvm-project/pull/232606
More information about the cfe-commits
mailing list