[cfe-commits] r172273 - /cfe/trunk/lib/AST/ASTImporter.cpp

Sean Callanan scallanan at apple.com
Fri Jan 11 15:17:47 PST 2013


Author: spyffe
Date: Fri Jan 11 17:17:47 2013
New Revision: 172273

URL: http://llvm.org/viewvc/llvm-project?rev=172273&view=rev
Log:
Fixed a bug that caused the AST importer to erroneously
import incomplete definitions for RecordDecls and then
mark the resulting definition as complete.

Modified:
    cfe/trunk/lib/AST/ASTImporter.cpp

Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=172273&r1=172272&r2=172273&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Fri Jan 11 17:17:47 2013
@@ -1835,7 +1835,7 @@
   
   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);
       }
     }





More information about the cfe-commits mailing list