fix PR7192 by defining wchar_t in a more conventional way. The

type of L"x" can change based on command line arguments.

llvm-svn: 113127
This commit is contained in:
Chris Lattner 2010-09-05 23:29:49 +00:00
parent 2ba828f36d
commit ee8df8f167
2 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,7 @@ typedef __typeof__(sizeof(int)) size_t;
#ifndef __cplusplus
#ifndef _WCHAR_T
#define _WCHAR_T
typedef __typeof__(*L"") wchar_t;
typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif

View File

@ -2,3 +2,9 @@
// PR4804
char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'const char [4]' discards qualifiers}}
// PR7192
#include <stddef.h>
void test(wchar_t *dst) {
dst[0] = 0; // Ok.
}