From: Chris Lattner Date: Thu, 30 Aug 2007 06:38:49 +0000 (+0000) Subject: -C mode doesn't return comments on "#" lines, so the diag checker doesn't pick them up. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=054fad5a89c3543ea79fed08599ed3bf54cf7570;p=clang -C mode doesn't return comments on "#" lines, so the diag checker doesn't pick them up. Test this the hard way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41605 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/c89-2.c b/test/Sema/c89-2.c new file mode 100644 index 0000000000..128046f6d2 --- /dev/null +++ b/test/Sema/c89-2.c @@ -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 diff --git a/test/Sema/c89.c b/test/Sema/c89.c index 2c1adcf959..fc38909a51 100644 --- a/test/Sema/c89.c +++ b/test/Sema/c89.c @@ -27,5 +27,3 @@ void test3(int i) { int test4 = 0LL; /* expected-warning {{long long}} */ -#if 1LL /* expected-warning {{long long}} */ -#endif