Skip to content

Commit df0e2a5

Browse files
RKSimonlravenclaw
authored andcommitted
[Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (llvm#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 llvm#65193 Noticed by static analyser (I have no specific test case).
1 parent f2b8e4d commit df0e2a5

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)