Chris Lattner 36fc8790b7 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.

llvm-svn: 46941
2008-02-11 00:02:17 +00:00

17 lines
269 B
C

// 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);
}
}