From 0dabc2adbaffc2cb9b9ab8931e7fe92734c3f342 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 26 Apr 2016 23:37:38 +0000 Subject: Module debugging: Also correctly handle typedef'd foward-declared members. Thanks again to Richard Smith for pointing this out. llvm-svn: 267630 --- clang/lib/CodeGen/CGDebugInfo.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'clang/lib') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e275f060dfd..e794aeeb169 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1520,13 +1520,12 @@ static bool isDefinedInClangModule(const RecordDecl *RD) { return false; if (!RD->isExternallyVisible() && RD->getName().empty()) return false; - if (auto *CTSD = dyn_cast(RD)) { - if (!CTSD->isCompleteDefinition()) - return false; - // Make sure the instantiation is actually in a module. - if (CTSD->field_begin() != CTSD->field_end()) - return CTSD->field_begin()->isFromASTFile(); - } + if (auto *CXXDecl = dyn_cast(RD)) + if (CXXDecl->getTemplateSpecializationKind() != TSK_Undeclared) + // Make sure the instantiation is actually in a module. + if (CXXDecl->field_begin() != CXXDecl->field_end()) + return CXXDecl->field_begin()->isFromASTFile(); + return true; } -- cgit v1.2.3