[Lldb-commits] [lldb] [lldb] Infer MSInheritanceAttr for CXXRecordDecl with DWARF on Windows (PR #115177)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 8 04:20:36 PST 2024


Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/115177 at github.com>


================
@@ -2771,8 +2771,14 @@ static bool GetCompleteQualType(clang::ASTContext *ast,
         ast, llvm::cast<clang::AttributedType>(qual_type)->getModifiedType(),
         allow_completion);
 
-  case clang::Type::MemberPointer:
+  case clang::Type::MemberPointer: {
+    auto *MPT = qual_type.getTypePtr()->castAs<clang::MemberPointerType>();
+    if (MPT->getClass()->isRecordType())
+      GetCompleteRecordType(ast, clang::QualType(MPT->getClass(), 0),
+                            allow_completion);
----------------
Michael137 wrote:

Technically we need to run the completion only on MS-ABI. Though I *think* this shouldn't be too expensive since member pointers aren't a very common code path, so probably not worth guarding this on the target ABI. But should we add a comment here saying we need this type to be completed because of MS-ABI?

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


More information about the lldb-commits mailing list