From: Douglas Gregor Date: Fri, 9 Jan 2009 23:23:35 +0000 (+0000) Subject: Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcde115dc2e9c21a295200c3129619e4bea15924;p=clang Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62016 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 39b9c787cf..5e285b07b9 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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(static_cast(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.