diff options
| author | Krystian Stasiowski <sdkrystian@gmail.com> | 2024-05-07 20:09:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-07 20:09:19 -0400 |
| commit | d4cf20ca37160cb062a9db773d0e6255d6bbc31a (patch) | |
| tree | 451a8f768ce9bbbf56b2de87dec1cfb441203ee5 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 77c5cea78eac3f20d0ba79f5892235e5aac82603 (diff) | |
[Clang][Sema] Don't set instantiated from function when rewriting operator<=> (#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.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
