MitalAshok wrote:

Example of the incompatibility: https://godbolt.org/z/Mn1T57WGb

```c++
struct unspecified_inheritance;
template<int I>
struct X {
    static_assert(I == sizeof(int unspecified_inheritance::*), "");
};

struct Y : X<sizeof(int Y::*)> {};
```

Currently, the `sizeof(int Y::*)` locks down the inheritance model of `Y` as 
single, when MSVC marks it as unspecified.

It was the intent that it should have been unspecified:

https://github.com/llvm/llvm-project/blob/89a080cb79972abae240c226090af9a3094e2269/clang/lib/AST/MicrosoftCXXABI.cpp#L223-L224

But `isParsingBaseSpecifiers()` was set after parsing instead of before.

https://github.com/llvm/llvm-project/pull/91990
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to