Silence uninitialized value warning during Release build.

llvm-svn: 52375
This commit is contained in:
Ted Kremenek
2008-06-16 23:45:12 +00:00
parent 56cdea6b3e
commit bba87243aa

View File

@@ -107,10 +107,11 @@ RecordDecl *RecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC,
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);
}