summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-09-07 19:38:13 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-09-07 19:38:13 +0000
commit56603ef7b2799a8036efb9d6755d30e44951e6a3 (patch)
tree64adf8df845a35af0c05ff87f1c71682661b0f2d /clang/test
parenta74fa15f320fe999a682eb81fd902478aea3351b (diff)
downloadbcm5719-llvm-56603ef7b2799a8036efb9d6755d30e44951e6a3.tar.gz
bcm5719-llvm-56603ef7b2799a8036efb9d6755d30e44951e6a3.zip
Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459. llvm-svn: 113253
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/illegal-UTF8.m4
-rw-r--r--clang/test/Sema/builtins.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/clang/test/CodeGen/illegal-UTF8.m b/clang/test/CodeGen/illegal-UTF8.m
index 871e6e5956a..4762e800259 100644
--- a/clang/test/CodeGen/illegal-UTF8.m
+++ b/clang/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/clang/test/Sema/builtins.c b/clang/test/Sema/builtins.c
index 787630c1a8c..21a1f72e1d5 100644
--- a/clang/test/Sema/builtins.c
+++ b/clang/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}}
OpenPOWER on IntegriCloud