================
@@ -7815,8 +7812,15 @@ ExprResult Sema::ActOnFinishFullExpr(Expr *FE,
SourceLocation CC,
while (isa_and_nonnull<CapturedDecl>(DC))
DC = DC->getParent();
const bool IsInLambdaDeclContext = isLambdaCallOperator(DC);
+
+ // Do not check for potential captures if the function in which the lambda
+ // is defined does not have a valid decl. (GH187183)
+ FunctionDecl *FD = getCurFunctionDecl();
+ bool IsValidParentFunc = !FD || !FD->isInvalidDecl();
----------------
hax0kartik wrote:
Hi, thanks for the suggestion. What would we return if we early exit?
ExprError()?
https://github.com/llvm/llvm-project/pull/187676
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits