[cfe-commits] r52376 - /cfe/trunk/lib/AST/DeclCXX.cpp

Ted Kremenek kremenek at apple.com
Mon Jun 16 16:46:28 PDT 2008


Author: kremenek
Date: Mon Jun 16 18:46:27 2008
New Revision: 52376

URL: http://llvm.org/viewvc/llvm-project?rev=52376&view=rev
Log:
Silence uninitialized value warning in Release build.

Modified:
    cfe/trunk/lib/AST/DeclCXX.cpp

Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=52376&r1=52375&r2=52376&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Mon Jun 16 18:46:27 2008
@@ -31,10 +31,11 @@
                                      ScopedDecl *PrevDecl) {
   Kind DK;
   switch (TK) {
-  case TK_enum:   assert(0 && "Enum TagKind passed for Record!");
-  case TK_struct: DK = CXXStruct; break;
-  case TK_union:  DK = CXXUnion;  break;
-  case TK_class:  DK = CXXClass;  break;
+    default: assert(0 && "Invalid TagKind!");
+    case TK_enum:   assert(0 && "Enum TagKind passed for Record!");
+    case TK_struct: DK = CXXStruct; break;
+    case TK_union:  DK = CXXUnion;  break;
+    case TK_class:  DK = CXXClass;  break;
   }
   void *Mem = C.getAllocator().Allocate<CXXRecordDecl>();
   return new (Mem) CXXRecordDecl(DK, DC, L, Id, PrevDecl);





More information about the cfe-commits mailing list