[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 17 10:00:20 PDT 2024


================
@@ -9015,11 +9015,20 @@ bool Sema::RequireCompleteTypeImpl(SourceLocation Loc, QualType T,
 
   if (const MemberPointerType *MPTy = T->getAs<MemberPointerType>()) {
     if (!MPTy->getClass()->isDependentType()) {
-      if (getLangOpts().CompleteMemberPointers &&
-          !MPTy->getClass()->getAsCXXRecordDecl()->isBeingDefined() &&
-          RequireCompleteType(Loc, QualType(MPTy->getClass(), 0), Kind,
-                              diag::err_memptr_incomplete))
-        return true;
+      if (getLangOpts().CompleteMemberPointers) {
+        const CXXRecordDecl *RD = MPTy->getClass()->getAsCXXRecordDecl();
+        if (RD->isBeingDefined()) {
+          if (RD->isParsingBaseSpecifiers()) {
----------------
AaronBallman wrote:

Combine these into a single statement?

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


More information about the cfe-commits mailing list