[clang] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 29 06:12:06 PST 2024
================
@@ -797,6 +797,15 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction(
if (Inst.isInvalid())
return nullptr;
+ // Set up a dummy 'instantiation' scope in the case of reference to function
+ // parameters that the surrounding function hasn't been instantiated yet. Note
+ // this may happen while we're comparing two templates' constraint
+ // equivalence.
+ LocalInstantiationScope ScopeForParameters(S);
----------------
erichkeane wrote:
I could swear I did this at one point and it caused significant problems... I don't have a problem with it as-is, but we need to make sure this passes all the CI (including the libcxx tests)
https://github.com/llvm/llvm-project/pull/79698
More information about the cfe-commits
mailing list