forked from OSchip/llvm-project
Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for pointing this out
llvm-svn: 61942
This commit is contained in:
parent
48ed48212d
commit
c8938e09ca
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue