[PATCH] D120629: [clang] Remove unused variable AllElementsInt. NFC.
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd3db74eadbfc: [clang] Remove unused variable AllElementsInt. (authored by arthur.j.odwyer). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120629/new/ https://reviews.llvm.org/D120629 Files: clang/lib/Sema/SemaDecl.cpp Index: clang/lib/Sema/SemaDecl.cpp === --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -18474,9 +18474,6 @@ 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(Elements[i]); @@ -18491,10 +18488,6 @@ 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. Index: clang/lib/Sema/SemaDecl.cpp === --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -18474,9 +18474,6 @@ 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(Elements[i]); @@ -18491,10 +18488,6 @@ 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. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D120629: [clang] Remove unused variable AllElementsInt. NFC.
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120629/new/ https://reviews.llvm.org/D120629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D120629: [clang] Remove unused variable AllElementsInt. NFC.
Quuxplusone created this revision. Quuxplusone added reviewers: rnk, rsmith, sammccall. Quuxplusone added a project: clang. Quuxplusone requested review of this revision. Herald added a subscriber: cfe-commits. This has been unused ever since it was committed in b8a501ccf1. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120629 Files: clang/lib/Sema/SemaDecl.cpp Index: clang/lib/Sema/SemaDecl.cpp === --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -18474,9 +18474,6 @@ 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(Elements[i]); @@ -18491,10 +18488,6 @@ 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. Index: clang/lib/Sema/SemaDecl.cpp === --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -18474,9 +18474,6 @@ 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(Elements[i]); @@ -18491,10 +18488,6 @@ 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. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits