Fixed a bug that caused the AST importer to erroneously

import incomplete definitions for RecordDecls and then
mark the resulting definition as complete.

llvm-svn: 172273
This commit is contained in:
Sean Callanan 2013-01-11 23:17:47 +00:00
parent 037f9d18ae
commit 19dfc93912
1 changed files with 1 additions and 1 deletions

View File

@ -1835,7 +1835,7 @@ void ASTNodeImporter::ImportDefinitionIfNeeded(Decl *FromD, Decl *ToD) {
if (RecordDecl *FromRecord = dyn_cast<RecordDecl>(FromD)) {
if (RecordDecl *ToRecord = cast_or_null<RecordDecl>(ToD)) {
if (FromRecord->getDefinition() && !ToRecord->getDefinition()) {
if (FromRecord->getDefinition() && FromRecord->isCompleteDefinition() && !ToRecord->getDefinition()) {
ImportDefinition(FromRecord, ToRecord);
}
}