================
@@ -3636,18 +3644,23 @@ ExprResult Parser::ParseRequiresExpression() {
   // Start of requirement list
   llvm::SmallVector<concepts::Requirement *, 2> Requirements;
 
-  // C++2a [expr.prim.req]p2
-  //   Expressions appearing within a requirement-body are unevaluated 
operands.
-  EnterExpressionEvaluationContext Ctx(
-      Actions, Sema::ExpressionEvaluationContext::Unevaluated);
-
   ParseScope BodyScope(this, Scope::DeclScope);
   // Create a separate diagnostic pool for RequiresExprBodyDecl.
   // Dependent diagnostics are attached to this Decl and non-depenedent
   // diagnostics are surfaced after this parse.
   ParsingDeclRAIIObject ParsingBodyDecl(*this, 
ParsingDeclRAIIObject::NoParent);
-  RequiresExprBodyDecl *Body = Actions.ActOnStartRequiresExpr(
-      RequiresKWLoc, LocalParameterDecls, getCurScope());
+  RequiresExprBodyDecl *Body =
+      Actions.ActOnStartRequiresExpr(RequiresKWLoc, LocalParameterDecls,
+                                     getCurScope(), TemplateParameterDepth);
+
+  LocalInstantiationScope InstScope(getActions());
+  for (ParmVarDecl *D : LocalParameterDecls)
+    InstScope.InstantiatedLocal(D, D);
----------------
zyn0217 wrote:

Where would we use that?

https://github.com/llvm/llvm-project/pull/107942
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to