Skip to content

Commit

Permalink
[clang] Remove unused variable AllElementsInt.
Browse files Browse the repository at this point in the history
This has been unused ever since it was committed in b8a501c.

Differential Revision: https://reviews.llvm.org/D120629
  • Loading branch information
Arthur O'Dwyer committed Feb 28, 2022
1 parent f422c5d commit d3db74e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions clang/lib/Sema/SemaDecl.cpp
Expand Up @@ -18474,9 +18474,6 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
unsigned NumNegativeBits = 0;
unsigned NumPositiveBits = 0;

// Keep track of whether all elements have type int.
bool AllElementsInt = true;

for (unsigned i = 0, e = Elements.size(); i != e; ++i) {
EnumConstantDecl *ECD =
cast_or_null<EnumConstantDecl>(Elements[i]);
Expand All @@ -18491,10 +18488,6 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
else
NumNegativeBits = std::max(NumNegativeBits,
(unsigned)InitVal.getMinSignedBits());

// Keep track of whether every enum element has type int (very common).
if (AllElementsInt)
AllElementsInt = ECD->getType() == Context.IntTy;
}

// Figure out the type that should be used for this enum.
Expand Down

0 comments on commit d3db74e

Please sign in to comment.