Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s |
Argyrios Kyrtzidis | 64c438a | 2008-08-09 16:51:54 +0000 | [diff] [blame] | 2 | wchar_t x; |
| 3 | |
| 4 | void 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 Kyrtzidis | 2ff9b4c | 2008-08-17 13:24:01 +0000 | [diff] [blame] | 8 | ++x; |
Argyrios Kyrtzidis | 64c438a | 2008-08-09 16:51:54 +0000 | [diff] [blame] | 9 | } |
Eli Friedman | a342675 | 2009-07-05 23:44:27 +0000 | [diff] [blame] | 10 | |
| 11 | // PR4502 |
| 12 | wchar_t const c = L'c'; |
| 13 | int a[c == L'c' ? 1 : -1]; |
Chris Lattner | e8337df | 2009-12-30 21:19:39 +0000 | [diff] [blame] | 14 | |
| 15 | |
| 16 | // PR5917 |
| 17 | template<typename _CharT> |
| 18 | struct basic_string { |
| 19 | }; |
| 20 | |
| 21 | template<typename _CharT> |
| 22 | basic_string<_CharT> operator+ (const basic_string<_CharT>&, _CharT); |
| 23 | |
| 24 | int t(void) { |
| 25 | basic_string<wchar_t>() + L'-'; |
| 26 | return (0); |
| 27 | } |
Chris Lattner | 37dd3ec | 2010-06-15 18:06:43 +0000 | [diff] [blame] | 28 | |
| 29 | |
| 30 | // rdar://8040728 |
| 31 | wchar_t in[] = L"\x434" "\x434"; // No warning |
| 32 | |