summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/wchar_t.cpp
blob: cb85bc3ae729a09f7f699a3d06ec29f6fff9cdde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: clang-cc -fsyntax-only -pedantic -verify %s 
wchar_t x;

void f(wchar_t p) {
  wchar_t x;
  unsigned wchar_t y; // expected-warning {{'wchar_t' cannot be signed or unsigned}}
  signed wchar_t z; // expected-warning {{'wchar_t' cannot be signed or unsigned}}
  ++x;
}

// PR4502
wchar_t const c = L'c';
int a[c == L'c' ? 1 : -1];