... 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.
66 KiB
66 KiB