================
@@ -337,3 +337,15 @@ template <typename... T>
void h(int i = 0, T ...args, int j = 1) {}
#endif
}
+
+namespace cwg794 { // cwg794: 2.7
+struct B {};
+struct D : B {};
+struct X {
+ D d;
+};
+struct Y : X {};
+B Y::*pm = &X::d;
+// expected-error@-1 {{cannot initialize a variable of type 'B Y::*' with an
rvalue of type 'D cwg794::X::*': different classes ('Y' vs 'cwg794::X')}}
+// FIXME: why diagnostic says just `Y` and not `cwg794::Y`, like `cwg794::X`?
----------------
cor3ntin wrote:
That seems to occur in `HandleFunctionTypeMismatch` - my best guess is that one
is a canonical type and the other isn't? Not sure though
https://github.com/llvm/llvm-project/pull/121660
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits