fix a bozobug.

llvm-svn: 65589
This commit is contained in:
Chris Lattner 2009-02-26 23:42:47 +00:00
parent 09e592ea33
commit 012b339693
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ static Expr *IsStringInit(Expr *Init, QualType DeclType, ASTContext &Context) {
// Otherwise we can only handle string literals.
StringLiteral *SL = dyn_cast<StringLiteral>(Init);
if (SL == 0) return 0;
// char array can be initialized with a narrow string.
// Only allow char x[] = "foo"; not char x[] = L"foo";