Unverified Commit f5efa749 authored by Ilya Biryukov's avatar Ilya Biryukov Committed by GitHub
Browse files

[Sema] When checking for constraint equivalence, do not calculate satisfaction (#74490)

... and only look at equivalence of substituted expressions, not results
of constraint satisfaction.
This is required by the standard when matching redeclarations.

Fixes #74314.

There is already some existing machinery for that in
`TemplateInstantiator` and `Sema` exposed separate functions for
substituting expressions with intention to do that:
- `Sema::SubstExpr` should not evaluate constraints.
- `Sema::SubstConstraintExpr` should.

However, both functions used to be equivalent. Introduce a new function
that does not evaluate constraint and use it when matching declarations.

Also change implementation of `SubstConstraintExpr` to call `SubstExpr`
directly so it's obvious they behave in the same way and add a FIXME to
call out that we might need to revamp this approach in the future.
parent f45b7594
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment