blob: f9d7b614329ccf4920c1131becb1a7ace002c0c8 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
Argyrios Kyrtzidis64c438a2008-08-09 16:51:54 +00002wchar_t x;
3
4void f(wchar_t p) {
5 wchar_t x;
6 unsigned wchar_t y; // expected-warning {{'wchar_t' cannot be signed or unsigned}}
7 signed wchar_t z; // expected-warning {{'wchar_t' cannot be signed or unsigned}}
Argyrios Kyrtzidis2ff9b4c2008-08-17 13:24:01 +00008 ++x;
Argyrios Kyrtzidis64c438a2008-08-09 16:51:54 +00009}
Eli Friedmana3426752009-07-05 23:44:27 +000010
11// PR4502
12wchar_t const c = L'c';
13int a[c == L'c' ? 1 : -1];
Chris Lattnere8337df2009-12-30 21:19:39 +000014
15
16// PR5917
17template<typename _CharT>
18struct basic_string {
19};
20
21template<typename _CharT>
22basic_string<_CharT> operator+ (const basic_string<_CharT>&, _CharT);
23
24int t(void) {
25 basic_string<wchar_t>() + L'-';
26 return (0);
27}
Chris Lattner37dd3ec2010-06-15 18:06:43 +000028
29
30// rdar://8040728
31wchar_t in[] = L"\x434" "\x434"; // No warning
32