-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sema] When checking for constraint equivalence, do not calculate sat…
…isfaction (#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.
- Loading branch information
1 parent
f45b759
commit f5efa74
Showing
5 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters