diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-06-16 23:45:12 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-06-16 23:45:12 +0000 |
commit | 9bcf44aeef91e4cf2615efdebd9d541ba567b635 (patch) | |
tree | 23c15a5aa0b8a83aa0b952927312fd97d0a615e4 /lib/AST/Decl.cpp | |
parent | 23cfca3760c482f8543daab62051f5eaa1f98fb4 (diff) |
Silence uninitialized value warning during Release build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<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); } |