================
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const 
MultiLevelTemplateArgumentList &TemplateArgs) {
   TemplateInstantiator Instantiator(*this, TemplateArgs,
                                     SourceLocation(),
                                     DeclarationName());
+  Instantiator.setEvaluateConstraints(false);
----------------
ilya-biryukov wrote:

I will sanity-check some call sites and try to break it with tests to 
understand this better.
The reason why I went with this change, is because of this comment on the 
`SubstConstraintExpr`:
```cpp
  // Unlike the above, this evaluates constraints, which should only happen at
  // 'constraint checking' time.
```
The 'above' mentioned here is `SubstExpr`. If we don't update this function, I 
think we should update the comment (and remove `SubstConstraintExpr` as both 
functions are exactly the same right now).

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

Reply via email to