Adding -fshort-wchar option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/wchar.c b/test/Sema/wchar.c
index 1637600..bf1996b 100644
--- a/test/Sema/wchar.c
+++ b/test/Sema/wchar.c
@@ -1,12 +1,20 @@
-// RUN: clang-cc %s -fsyntax-only -verify 
+// RUN: clang-cc %s -fsyntax-only -verify &&
+// RUN: clang-cc %s -fsyntax-only -fshort-wchar -verify -DSHORT_WCHAR
+ 
 #include <wchar.h>
-
+ 
+#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
+ || defined(_M_X64) || defined(SHORT_WCHAR)
+  #define WCHAR_T_TYPE unsigned short
+#else
+  #define WCHAR_T_TYPE int
+#endif
+ 
 int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1];
-
+ 
 void foo() {
-  int t1[] = L"x";
+  WCHAR_T_TYPE t1[] = L"x";
   wchar_t tab[] = L"x";
-
-  int t2[] = "x";     // expected-error {{initialization}}
+  WCHAR_T_TYPE t2[] = "x";     // expected-error {{initialization}}
   char t3[] = L"x";   // expected-error {{initialization}}
 }