[cfe-commits] r52375 - /cfe/trunk/lib/AST/Decl.cpp
Ted Kremenek
kremenek at apple.com
Mon Jun 16 16:45:12 PDT 2008
Author: kremenek
Date: Mon Jun 16 18:45:12 2008
New Revision: 52375
URL: http://llvm.org/viewvc/llvm-project?rev=52375&view=rev
Log:
Silence uninitialized value warning during Release build.
Modified:
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=52375&r1=52374&r2=52375&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Mon Jun 16 18:45:12 2008
@@ -107,10 +107,11 @@
void *Mem = C.getAllocator().Allocate<RecordDecl>();
Kind DK;
switch (TK) {
- case TK_enum: assert(0 && "Enum TagKind passed for Record!");
- case TK_struct: DK = Struct; break;
- case TK_union: DK = Union; break;
- case TK_class: DK = Class; break;
+ default: assert(0 && "Invalid TagKind!");
+ case TK_enum: assert(0 && "Enum TagKind passed for Record!");
+ case TK_struct: DK = Struct; break;
+ case TK_union: DK = Union; break;
+ case TK_class: DK = Class; break;
}
return new (Mem) RecordDecl(DK, DC, L, Id, PrevDecl);
}
More information about the cfe-commits
mailing list