]> granicus.if.org Git - clang/commitdiff
Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for pointing...
authorDouglas Gregor <dgregor@apple.com>
Thu, 8 Jan 2009 20:48:26 +0000 (20:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 8 Jan 2009 20:48:26 +0000 (20:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61942 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index c6e4336a3dc8f246d11001866817dca01cbe9fab..d9436ebdc7f11499b66526bbc640e71cdb8d12da 100644 (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;
 }