[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

Matheus Izvekov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 10:23:25 PDT 2024


================
@@ -17257,8 +17258,11 @@ void
 Sema::PushExpressionEvaluationContext(
     ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t,
     ExpressionEvaluationContextRecord::ExpressionKind ExprContext) {
-  Decl *ClosureContextDecl = ExprEvalContexts.back().ManglingContextDecl;
-  PushExpressionEvaluationContext(NewContext, ClosureContextDecl, ExprContext);
+  const auto &PrevRec = ExprEvalContexts.back();
+  PushExpressionEvaluationContext(NewContext, PrevRec.ContextDecl,
+                                  PrevRec.ContextArgs, ExprContext);
+  ExprEvalContexts.back().HasReusedDeclContext = true;
+  ExprEvalContexts.back().LazyContextDeclPos = PrevRec.LazyContextDeclPos;
----------------
mizvekov wrote:

Yeah, I saw this failure on CI, but not on my machine (MacOS).

Thanks for taking a look.

https://github.com/llvm/llvm-project/pull/107942


More information about the llvm-commits mailing list