diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-07 19:38:13 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-07 19:38:13 +0000 |
commit | 7da71020b97c69b95831bd03d35e8e8404bfdea0 (patch) | |
tree | 4be9be364a6c54b743bbcb015427e4b84ae5ff88 /test | |
parent | 0f048a44b5280f5fae28b9363ed4eab618bb1083 (diff) |
Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/illegal-UTF8.m | 4 | ||||
-rw-r--r-- | test/Sema/builtins.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/test/CodeGen/illegal-UTF8.m b/test/CodeGen/illegal-UTF8.m index 871e6e5956..4762e80025 100644 --- a/test/CodeGen/illegal-UTF8.m +++ b/test/CodeGen/illegal-UTF8.m @@ -2,7 +2,5 @@ @class NSString; -// FIXME: GCC emits the following warning: -// CodeGen/illegal-UTF8.m:4: warning: input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -NSString *S = @"\xff\xff___WAIT___"; +NSString *S = @"\xff\xff___WAIT___"; // expected-warning {{input conversion stopped due to an input byte that does not belong to the input codeset UTF-8}} diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c index 787630c1a8..21a1f72e1d 100644 --- a/test/Sema/builtins.c +++ b/test/Sema/builtins.c @@ -26,7 +26,7 @@ int test6(float a, long double b) { #define CFSTR __builtin___CFStringMakeConstantString void test7() { const void *X; - X = CFSTR("\242"); + X = CFSTR("\242"); // expected-warning {{input conversion stopped}} 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}} |