summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/wchar_size.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/wchar_size.c')
-rw-r--r--clang/test/Sema/wchar_size.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/test/Sema/wchar_size.c b/clang/test/Sema/wchar_size.c
index a4041b976da..b7171fec7a5 100644
--- a/clang/test/Sema/wchar_size.c
+++ b/clang/test/Sema/wchar_size.c
@@ -1,3 +1,12 @@
-// RUN: clang %s -fsyntax-only -verify -triple=i686-apple-darwin9
+// RUN: clang %s -fsyntax-only -verify
+#include <wchar.h>
-int check_wchar_size[sizeof(*L"") == 4 ? 1 : -1];
+int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1];
+
+void foo() {
+ int t1[] = L"x";
+ wchar_t tab[] = L"x";
+
+ int t2[] = "x"; // expected-error {{initialization}}
+ char t3[] = L"x"; // expected-error {{initialization}}
+}
OpenPOWER on IntegriCloud