summaryrefslogtreecommitdiff
path: root/test/SemaCXX/no-wchar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/no-wchar.cpp')
-rw-r--r--test/SemaCXX/no-wchar.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/no-wchar.cpp b/test/SemaCXX/no-wchar.cpp
new file mode 100644
index 000000000000..291b657f51ab
--- /dev/null
+++ b/test/SemaCXX/no-wchar.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple i386-pc-win32 -fsyntax-only -fno-wchar -verify %s
+wchar_t x; // expected-error {{unknown type name 'wchar_t'}}
+
+typedef unsigned short wchar_t;
+void foo(const wchar_t* x);
+
+void bar() {
+ foo(L"wide string literal");
+}