Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46941 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/i-c-e2.c b/test/Sema/i-c-e2.c
index 1fd4c21..1afb7c9 100644
--- a/test/Sema/i-c-e2.c
+++ b/test/Sema/i-c-e2.c
@@ -1,6 +1,16 @@
-// RUN: clang %s -fsyntax-only
+// RUN: clang %s -fsyntax-only -fpascal-strings
char array[1024/(sizeof (long))];
int x['\xBb' == (char) 187 ? 1: -1];
+// PR1992
+void func(int x)
+{
+ switch (x) {
+ case sizeof("abc"): break;
+ case sizeof("loooong"): func(4);
+ case sizeof("\ploooong"): func(4);
+ }
+}
+