[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

Max Winkler via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 17:03:07 PDT 2024


MaxEW707 wrote:

> Maybe we should just be testing if the copy-assignment operator is deleted? For reference, MSVC also returns the following indirectly:
> 
> ```
> struct Test
> {
>     int x;
>     Test& operator=(const Test&) = delete;
> };
> Test foo();
> Test test(Test x)
> {
>   return x;
> }
> ```

Argh, I didn't even consider trying an explicitly deleted copy assignment operator.
That should have been obvious considering the copy assignment operator is implicitly delete since we have a non-static data member of a reference type.

I'll give this a try.

https://github.com/llvm/llvm-project/pull/90547


More information about the cfe-commits mailing list