From: Sean Callanan Date: Fri, 11 Jan 2013 23:17:47 +0000 (+0000) Subject: Fixed a bug that caused the AST importer to erroneously X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2246823e207a4846c842a27cf99d99920cd2b178;p=clang Fixed a bug that caused the AST importer to erroneously import incomplete definitions for RecordDecls and then mark the resulting definition as complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172273 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 33935c3b32..933375b129 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -1835,7 +1835,7 @@ void ASTNodeImporter::ImportDefinitionIfNeeded(Decl *FromD, Decl *ToD) { if (RecordDecl *FromRecord = dyn_cast(FromD)) { if (RecordDecl *ToRecord = cast_or_null(ToD)) { - if (FromRecord->getDefinition() && !ToRecord->getDefinition()) { + if (FromRecord->getDefinition() && FromRecord->isCompleteDefinition() && !ToRecord->getDefinition()) { ImportDefinition(FromRecord, ToRecord); } }