aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/cc-log-diagnostics.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-05-05 02:12:02 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-05-05 02:12:02 +0000
commit7665ad83d8eff7b8b2c5f3b893b6b7ece38f847c (patch)
treec5cc44786ff065f8c3dd99d7ac6c3737349aa60a /test/Driver/cc-log-diagnostics.c
parent9389ddc29ec60931e4dc418541ba3470b6b9fbe0 (diff)
Frontend: Fix a crash in CC_LOG_DIAGNOSTICS handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/cc-log-diagnostics.c')
-rw-r--r--test/Driver/cc-log-diagnostics.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/Driver/cc-log-diagnostics.c b/test/Driver/cc-log-diagnostics.c
index a70686ad61..6c1b8ed896 100644
--- a/test/Driver/cc-log-diagnostics.c
+++ b/test/Driver/cc-log-diagnostics.c
@@ -1,7 +1,7 @@
+// RUN: rm -f %t.log
// RUN: env RC_DEBUG_OPTIONS=1 \
-// RUN: CC_LOG_DIAGNOSTICS=1 \
-// RUN: CC_LOG_DIAGNOSTICS_FILE=%t.log \
-// RUN: %clang -no-canonical-prefixes -ccc-host-triple x86_64-apple-darwin10 -fsyntax-only %s
+// RUN: CC_LOG_DIAGNOSTICS=1 CC_LOG_DIAGNOSTICS_FILE=%t.log \
+// RUN: %clang -Wfoobar -no-canonical-prefixes -ccc-host-triple x86_64-apple-darwin10 -fsyntax-only %s
// RUN: FileCheck %s < %t.log
int f0() {}
@@ -16,6 +16,12 @@ int f0() {}
// CHECK: <dict>
// CHECK: <key>level</key>
// CHECK: <string>warning</string>
+// CHECK: <key>message</key>
+// CHECK: <string>unknown warning option '-Wfoobar'</string>
+// CHECK: </dict>
+// CHECK: <dict>
+// CHECK: <key>level</key>
+// CHECK: <string>warning</string>
// CHECK: <key>filename</key>
// CHECK: <string>{{.*}}cc-log-diagnostics.c</string>
// CHECK: <key>line</key>