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 | 220b6369d7717bfe6894b46cef055d3e763827f2 (patch) | |
tree | 06bffa6a0d691e969ff3a591ad889130298913d1 /lib/Sema/SemaInit.cpp | |
parent | 3cc729235221c9af79ea8f9b6c04785a08dd968f (diff) |
fix a bozobug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 1f4ab078ef..c4edbba751 100644 --- a/lib/Sema/SemaInit.cpp +++ b/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"; |