Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for pointing this out

llvm-svn: 61942
This commit is contained in:
Douglas Gregor 2009-01-08 20:48:26 +00:00
parent 48ed48212d
commit c8938e09ca
1 changed files with 0 additions and 5 deletions

View File

@ -3530,11 +3530,6 @@ Sema::DeclTy *Sema::ActOnEnumConstant(Scope *S, DeclTy *theEnumDecl,
// Register this decl in the current scope stack.
PushOnScopeChains(New, S);
// Add this enumerator into the enum itself.
// FIXME: This means that the enumerator is stored in two
// DeclContexts. This is not a long-term solution.
New->setLexicalDeclContext(TheEnumDecl);
TheEnumDecl->addDecl(Context, New, true);
return New;
}