forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang][Sema] Don't set instantiated from function when rewriting ope…
…rator<=> (llvm#91339) The following snippet causes a crash: ``` template<typename T> struct A { bool operator<=>(const A&) const requires true = default; }; bool f(A<int> a) { return a != A<int>(); } ``` This occurs because during the rewrite from `operator<=>` to `operator==`, the "pattern" `operator<=>` function is set as the instantiated from function for the newly created `operator==` function. This is obviously incorrect, and this patch fixes it.
- Loading branch information
1 parent
77c5cea
commit d4cf20c
Showing
5 changed files
with
41 additions
and
21 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