aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index dce1e129a5..5a7d07b86f 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3138,12 +3138,10 @@ void Sema::ActOnFields(Scope* S,
}
void Sema::ActOnEnumStartDefinition(Scope *S, DeclTy *EnumD) {
- EnumDecl *Enum = cast_or_null<EnumDecl>((Decl *)EnumD);
+ EnumDecl *Enum = cast<EnumDecl>((Decl *)EnumD);
- if (Enum) {
- // Enter the enumeration context.
- PushDeclContext(S, Enum);
- }
+ // Enter the enumeration context.
+ PushDeclContext(S, Enum);
}
Sema::DeclTy *Sema::ActOnEnumConstant(Scope *S, DeclTy *theEnumDecl,