================
@@ -2122,8 +2122,7 @@ static Decl *getPredefinedExprDecl(Sema &S, DeclContext 
*DC) {
   auto tryAdjustLambdaContext = [&S, &LSI](DeclContext *&DC) {
     if (isLambdaCallOperator(DC)) {
       auto E = S.FunctionScopes.rend();
-      while (LSI != E && isa<CapturingScopeInfo>(*LSI) &&
-             !isa<LambdaScopeInfo>(*LSI))
+      while (LSI != E && !isa<LambdaScopeInfo>(*LSI))
         ++LSI;
       assert(LSI != E && "Should be in a lambda scope info");
       if (dyn_cast<LambdaScopeInfo>(*LSI)->BeforeCompoundStatement)
----------------
StefanPaulet wrote:

Sorry for the mistake, the analyzer is right and my assumption that a 
`LambdaScopeInfo` always exists was wrong. I created a PR to fix this #246670

https://github.com/llvm/llvm-project/pull/217021
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to