forked from OSchip/llvm-project
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:
parent
037f9d18ae
commit
19dfc93912
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue