[cfe-commits] r92317 - in /cfe/trunk/test/Sema: builtins.c unused-expr.c

Chris Lattner sabre at nondot.org
Wed Dec 30 14:10:22 PST 2009


Author: lattner
Date: Wed Dec 30 16:10:22 2009
New Revision: 92317

URL: http://llvm.org/viewvc/llvm-project?rev=92317&view=rev
Log:
testcase for previous patch!

Modified:
    cfe/trunk/test/Sema/builtins.c
    cfe/trunk/test/Sema/unused-expr.c

Modified: cfe/trunk/test/Sema/builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtins.c?rev=92317&r1=92316&r2=92317&view=diff

==============================================================================
--- cfe/trunk/test/Sema/builtins.c (original)
+++ cfe/trunk/test/Sema/builtins.c Wed Dec 30 16:10:22 2009
@@ -25,10 +25,11 @@
 
 #define CFSTR __builtin___CFStringMakeConstantString
 void test7() {
-  CFSTR("\242");
-  CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }}
-  CFSTR(242); // expected-error {{ CFString literal is not a string constant }} expected-warning {{incompatible integer to pointer conversion}}
-  CFSTR("foo", "bar"); // expected-error {{too many arguments to function call}}
+  const void *X;
+  X = CFSTR("\242");
+  X = CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }}
+  X = CFSTR(242); // expected-error {{ CFString literal is not a string constant }} expected-warning {{incompatible integer to pointer conversion}}
+  X = CFSTR("foo", "bar"); // expected-error {{too many arguments to function call}}
 }
 
 

Modified: cfe/trunk/test/Sema/unused-expr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/unused-expr.c?rev=92317&r1=92316&r2=92317&view=diff

==============================================================================
--- cfe/trunk/test/Sema/unused-expr.c (original)
+++ cfe/trunk/test/Sema/unused-expr.c Wed Dec 30 16:10:22 2009
@@ -91,6 +91,7 @@
   fn1();  // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}}
   fn2(92, 21);  // expected-warning {{ignoring return value of function declared with pure attribute}}
   fn3(42);  // expected-warning {{ignoring return value of function declared with const attribute}}
+  __builtin_fabsf(0); // expected-warning {{ignoring return value of function declared with const attribute}}
   return 0;
 }
 





More information about the cfe-commits mailing list