================
@@ -2287,6 +2288,15 @@ APValue SourceLocExpr::EvaluateInContext(const
ASTContext &Ctx,
Context = getParentContext();
}
+ // If we are currently parsing a lambda declarator, we might not have a fully
+ // formed call operator declaration yet, and we could not form a function
name
+ // for it. Because we do not have access to Sema/function scopes here, we
+ // detect this case by relying on the fact such method doesn't yet have a
+ // type.
+ if (const auto *D = dyn_cast<CXXMethodDecl>(Context);
+ D && D->getFunctionTypeLoc().isNull() && isLambdaCallOperator(D))
+ Context = D->getParent()->getParent();
----------------
cor3ntin wrote:
ideally yes, I'd assert on it... but we do not have access to that information
in constant evaluation
https://github.com/llvm/llvm-project/pull/107411
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits