Chris Lattner | 19753cf | 2009-02-26 23:36:02 +0000 | [diff] [blame] | 1 | // RUN: clang %s -fsyntax-only -verify |
2 | #include <wchar.h> | ||||
Eli Friedman | 8ef1f26 | 2008-05-27 07:57:14 +0000 | [diff] [blame] | 3 | |
Chris Lattner | 19753cf | 2009-02-26 23:36:02 +0000 | [diff] [blame] | 4 | int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1]; |
5 | |||||
6 | void foo() { | ||||
7 | int t1[] = L"x"; | ||||
8 | wchar_t tab[] = L"x"; | ||||
9 | |||||
10 | int t2[] = "x"; // expected-error {{initialization}} | ||||
11 | char t3[] = L"x"; // expected-error {{initialization}} | ||||
12 | } |