diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-30 22:10:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-30 22:10:22 +0000 |
commit | 634785ca8423b6dd6c15e80714a076c3aaa5a047 (patch) | |
tree | 7bcd47c7e67fc60ef176c6959e813c33afa1fb59 /test/Sema/builtins.c | |
parent | 551f7087786d1a5e257f4e2a0999da8c709437fd (diff) |
testcase for previous patch!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/builtins.c')
-rw-r--r-- | test/Sema/builtins.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c index a23273740c..7b2f2afbd9 100644 --- a/test/Sema/builtins.c +++ b/test/Sema/builtins.c @@ -25,10 +25,11 @@ int test6(float a, long double b) { #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}} } |