summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/wchar_t.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/wchar_t.cpp')
-rw-r--r--test/SemaCXX/wchar_t.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/wchar_t.cpp b/test/SemaCXX/wchar_t.cpp
new file mode 100644
index 0000000..fc258da
--- /dev/null
+++ b/test/SemaCXX/wchar_t.cpp
@@ -0,0 +1,9 @@
+// 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;
+}
OpenPOWER on IntegriCloud