]> granicus.if.org Git - clang/commitdiff
Fix const-init test case
authorDaniel Dunbar <daniel@zuster.org>
Tue, 5 Aug 2008 06:30:41 +0000 (06:30 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 5 Aug 2008 06:30:41 +0000 (06:30 +0000)
 - Use -verify and added expected warnings for EXTWARN change.

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

test/CodeGen/const-init.c

index ccc34cf136843f6435f6b1825830b3c934b7d8d4..0efab6f903676a2bf3bb95f2bb868d8e8a5b1ae6 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s 2>&1 | not grep warning
+// RUN: clang -verify -emit-llvm -o %t %s
 
 #include <stdint.h>
 
@@ -7,9 +7,9 @@ char a[] = { "asdf" };
 
 // Double-implicit-conversions of array/functions (not legal C, but
 // clang accepts it for gcc compat).
-intptr_t b = a;
+intptr_t b = a; // expected-warning {{incompatible pointer to integer conversion}}
 int c();
 void *d = c;
-intptr_t e = c;
+intptr_t e = c; // expected-warning {{incompatible pointer to integer conversion}}
 
 int f, *g = __extension__ &f, *h = (1 != 1) ? &f : &f;