]> granicus.if.org Git - clang/commitdiff
-C mode doesn't return comments on "#" lines, so the diag checker doesn't pick them up.
authorChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 06:38:49 +0000 (06:38 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 06:38:49 +0000 (06:38 +0000)
Test this the hard way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41605 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/c89-2.c [new file with mode: 0644]
test/Sema/c89.c

diff --git a/test/Sema/c89-2.c b/test/Sema/c89-2.c
new file mode 100644 (file)
index 0000000..128046f
--- /dev/null
@@ -0,0 +1,7 @@
+/* RUN: not clang %s -std=c89 -pedantic-errors
+ */
+
+/* We can't put expected-warning lines on #if lines. */
+
+#if 1LL                                /* expected-warning {{long long}} */
+#endif
index 2c1adcf959d08f467eb3f51346eedcb08f0869da..fc38909a51cee3d9b777e610ed876c97869fabd7 100644 (file)
@@ -27,5 +27,3 @@ void test3(int i) {
 
 int test4 = 0LL;               /* expected-warning {{long long}} */
 
-#if 1LL                                /* expected-warning {{long long}} */
-#endif