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

Douglas Gregor dgregor at apple.com
Thu Dec 2 11:33:37 PST 2010


Author: dgregor
Date: Thu Dec  2 13:33:37 2010
New Revision: 120727

URL: http://llvm.org/viewvc/llvm-project?rev=120727&view=rev
Log:
Fix inverted return value in the ASTImporter. No matter how much LLVM
code I wrote, returning "true" on error is still unnatural.

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=120727&r1=120726&r2=120727&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Thu Dec  2 13:33:37 2010
@@ -1694,7 +1694,7 @@
          ++Base1) {
       QualType T = Importer.Import(Base1->getType());
       if (T.isNull())
-        return false;
+        return true;
       
       Bases.push_back(
                     new (Importer.getToContext()) 
@@ -1710,7 +1710,7 @@
   
   ImportDeclContext(From);
   To->completeDefinition();
-  return true;
+  return false;
 }
 
 TemplateParameterList *ASTNodeImporter::ImportTemplateParameterList(





More information about the cfe-commits mailing list