diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-06 07:17:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-06 07:17:58 +0000 |
commit | 4f3b8f8ac2f8c89028a2f8793df0a7887df809d4 (patch) | |
tree | 817f79029a48b35164b9b82e1a3d4b313c33a16e /lib/Sema/SemaDecl.cpp | |
parent | d62fdc448b3ace606c8c9c9f13e43218fa204dbf (diff) |
Minor tweaks to the transparent declcontext patch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
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, |