Silence uninitialized value warning during Release build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2008-06-16 23:45:12 +00:00
Родитель 23cfca3760
Коммит 9bcf44aeef
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -107,10 +107,11 @@ RecordDecl *RecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC,
void *Mem = C.getAllocator().Allocate<RecordDecl>(); void *Mem = C.getAllocator().Allocate<RecordDecl>();
Kind DK; Kind DK;
switch (TK) { switch (TK) {
case TK_enum: assert(0 && "Enum TagKind passed for Record!"); default: assert(0 && "Invalid TagKind!");
case TK_struct: DK = Struct; break; case TK_enum: assert(0 && "Enum TagKind passed for Record!");
case TK_union: DK = Union; break; case TK_struct: DK = Struct; break;
case TK_class: DK = Class; break; case TK_union: DK = Union; break;
case TK_class: DK = Class; break;
} }
return new (Mem) RecordDecl(DK, DC, L, Id, PrevDecl); return new (Mem) RecordDecl(DK, DC, L, Id, PrevDecl);
} }