Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -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]; |