[cfe-commits] r65589 - /cfe/trunk/lib/Sema/SemaInit.cpp

Chris Lattner sabre at nondot.org
Thu Feb 26 15:42:47 PST 2009


Author: lattner
Date: Thu Feb 26 17:42:47 2009
New Revision: 65589

URL: http://llvm.org/viewvc/llvm-project?rev=65589&view=rev
Log:
fix a bozobug.

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=65589&r1=65588&r2=65589&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Thu Feb 26 17:42:47 2009
@@ -39,6 +39,7 @@
 
   // 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";





More information about the cfe-commits mailing list