[cfe-commits] r58285 - /cfe/trunk/Driver/clang.cpp
Daniel Dunbar
daniel at zuster.org
Mon Oct 27 15:10:13 PDT 2008
Author: ddunbar
Date: Mon Oct 27 17:10:13 2008
New Revision: 58285
URL: http://llvm.org/viewvc/llvm-project?rev=58285&view=rev
Log:
With -verify, only exit early on failure.
- Nice if -verify test exercise the various cleanup functions.
Modified:
cfe/trunk/Driver/clang.cpp
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=58285&r1=58284&r2=58285&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Mon Oct 27 17:10:13 2008
@@ -1321,7 +1321,8 @@
ParseAST(PP, Consumer.get(), Stats, !DisableFree);
if (VerifyDiagnostics)
- exit(CheckDiagnostics(PP));
+ if (CheckDiagnostics(PP))
+ exit(1);
if (Stats) {
fprintf(stderr, "\nSTATISTICS FOR '%s':\n", InFile.c_str());
@@ -1529,5 +1530,9 @@
fprintf(stderr, "\n");
}
+ // If verifying diagnostics and we reached here, all is well.
+ if (VerifyDiagnostics)
+ return 0;
+
return HadErrors || (Diags.getNumErrors() != 0);
}
More information about the cfe-commits
mailing list