Silence uninitialized value warning in Release build.
llvm-svn: 52376
This commit is contained in:
parent
bba87243aa
commit
1c77e8f26b
|
@ -31,10 +31,11 @@ CXXRecordDecl *CXXRecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue