diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-26 23:42:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-26 23:42:47 +0000 |
commit | 012b339693986c825a5ba9cc63ce966628756236 (patch) | |
tree | c4bc50e56567b2f3af7df8724b6f3b71257c3eba | |
parent | 09e592ea3301cd75fe0325118b7db1034d5d1b68 (diff) | |
download | bcm5719-llvm-012b339693986c825a5ba9cc63ce966628756236.tar.gz bcm5719-llvm-012b339693986c825a5ba9cc63ce966628756236.zip |
fix a bozobug.
llvm-svn: 65589
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 1f4ab078efa..c4edbba751b 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -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"; |