[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 12:21:57 PDT 2024
================
@@ -13,3 +15,18 @@ template <typename T>
struct S3 {
int T::*foo;
};
+
+template<int I> struct Base {};
+struct
+S5 // #S5
+:
+Base<sizeof(int S5::*)>
+// expected-error at -1 {{member pointer has incomplete base type 'S5'}}
----------------
rnk wrote:
I agree on the desired behavior, but doesn't this test show that, in the MS ABI mode, clang emits a hard error about an incomplete type? That's my reading of what the code does, and what the test shows.
https://github.com/llvm/llvm-project/pull/91990
More information about the cfe-commits
mailing list