]> granicus.if.org Git - clang/commitdiff
Allow -verify to be used with -rewrite-macros.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 5 Oct 2008 01:38:39 +0000 (01:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 5 Oct 2008 01:38:39 +0000 (01:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57093 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp

index 4b0af8dac180ff02608b9f5f21d3149e9e4ccfb5..8e5bca22f81b2f5562f30c354707e1f7acf207a4 100644 (file)
@@ -1020,9 +1020,6 @@ static void ParseFile(Preprocessor &PP, MinimalAction *PA) {
   // Parsing the specified input file.
   P.ParseTranslationUnit();
   delete PA;
-
-  if (VerifyDiagnostics)
-    exit(CheckDiagnostics(PP));
 }
 
 //===----------------------------------------------------------------------===//
@@ -1157,6 +1154,9 @@ static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF,
       exit(CheckASTConsumer(PP, Consumer.get()));
     
     ParseAST(PP, Consumer.get(), Stats);
+  } else {
+    if (VerifyDiagnostics)
+      exit(CheckDiagnostics(PP));
   }
 
   if (Stats) {