================
@@ -2116,7 +2116,13 @@ static PredefinedIdentKind
getPredefinedExprKind(tok::TokenKind Kind) {
/// getPredefinedExprDecl - Returns Decl of a given DeclContext that can be
used
/// to determine the value of a PredefinedExpr. This can be either a
/// block, lambda, captured statement, function, otherwise a nullptr.
-static Decl *getPredefinedExprDecl(DeclContext *DC) {
+static Decl *getPredefinedExprDecl(Sema &S, DeclContext *DC) {
+ if (isLambdaCallOperator(DC)) {
+ LambdaScopeInfo *LSI = S.getCurLambda();
+ if (LSI->BeforeCompoundStatement) {
+ DC = DC->getParent();
+ }
+ }
----------------
cor3ntin wrote:
I think if we are for example in a requires block of a lambda expression we
still get the wrong context.
This entiere `if` needs to be in the while loop below
https://github.com/llvm/llvm-project/pull/211811
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits