diff options
author | Mike Stump <mrs@apple.com> | 2009-04-28 01:19:10 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-04-28 01:19:10 +0000 |
commit | fc0fed3fc7159d17dc6a08e91a4eda413ace3642 (patch) | |
tree | 332448e9466c5890edf7a1dd731ffdc6a4dfcc50 | |
parent | 4eeab84b6527feba5c63b819a74417677c9977a0 (diff) | |
download | clang-fc0fed3fc7159d17dc6a08e91a4eda413ace3642.tar.gz |
We avoid the count of diagnostics when not generating carent
diagnostics to improve gcc compatibility; useful for dejagnu testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70278 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/clang-cc/clang-cc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index afc57f127d..3d5c70d7c9 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -1990,9 +1990,10 @@ int main(int argc, char **argv) { fprintf(stderr, "clang version 1.0 based upon " PACKAGE_STRING " hosted on " LLVM_HOSTTRIPLE "\n"); - if (unsigned NumDiagnostics = Diags.getNumDiagnostics()) - fprintf(stderr, "%d diagnostic%s generated.\n", NumDiagnostics, - (NumDiagnostics == 1 ? "" : "s")); + if (!NoCaretDiagnostics) + if (unsigned NumDiagnostics = Diags.getNumDiagnostics()) + fprintf(stderr, "%d diagnostic%s generated.\n", NumDiagnostics, + (NumDiagnostics == 1 ? "" : "s")); if (Stats) { FileMgr.PrintStats(); |