aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2013-01-11 23:17:47 +0000
committerSean Callanan <scallanan@apple.com>2013-01-11 23:17:47 +0000
commit2246823e207a4846c842a27cf99d99920cd2b178 (patch)
treeaa7891feb5a1f0f6affa8905ada60dccccd5d82c
parente358fd50a9b56e36f3f0f1a8f85bbb6d869cd117 (diff)
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
-rw-r--r--lib/AST/ASTImporter.cpp2
1 files changed, 1 insertions, 1 deletions
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<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);
}
}