]> granicus.if.org Git - clang/commitdiff
Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used
authorDouglas Gregor <dgregor@apple.com>
Fri, 9 Jan 2009 23:23:35 +0000 (23:23 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 9 Jan 2009 23:23:35 +0000 (23:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62016 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 39b9c787cf8cc047c778fb4c4a284478bc7e566a..5e285b07b91644dc73e42465d5e4695f97b5fd91 100644 (file)
@@ -3616,7 +3616,6 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
   // Keep track of whether all elements have type int.
   bool AllElementsInt = true;
   
-  EnumConstantDecl *EltList = 0;
   for (unsigned i = 0; i != NumElements; ++i) {
     EnumConstantDecl *ECD =
       cast_or_null<EnumConstantDecl>(static_cast<Decl*>(Elements[i]));
@@ -3646,9 +3645,6 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
     // Keep track of whether every enum element has type int (very commmon).
     if (AllElementsInt)
       AllElementsInt = ECD->getType() == Context.IntTy; 
-    
-    ECD->setNextDeclarator(EltList);
-    EltList = ECD;
   }
   
   // Figure out the type that should be used for this enum.