From: Ted Kremenek Date: Mon, 16 Jun 2008 23:45:12 +0000 (+0000) Subject: Silence uninitialized value warning during Release build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bcf44aeef91e4cf2615efdebd9d541ba567b635;p=clang Silence uninitialized value warning during Release build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52375 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 949d10072e..dbe476db1f 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -107,10 +107,11 @@ RecordDecl *RecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC, void *Mem = C.getAllocator().Allocate(); 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); }