Skip to content

Commit dac3661

Browse files
authored
[Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (#96888)
We should be checking for a failed dyn_cast on the ParentFD result - not the loop invariant FD root value. Seems to have been introduced in #65193 Noticed by static analyser (I have no specific test case).
1 parent c6e2649 commit dac3661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaLambda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII::
23912391
Pattern =
23922392
dyn_cast<FunctionDecl>(getLambdaAwareParentOfDeclContext(Pattern));
23932393

2394-
if (!FD || !Pattern)
2394+
if (!ParentFD || !Pattern)
23952395
break;
23962396

23972397
SemaRef.addInstantiatedParametersToScope(ParentFD, Pattern, Scope, MLTAL);

0 commit comments

Comments
 (0)