[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 09:11:14 PST 2023
================
@@ -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
More information about the cfe-commits
mailing list