From 4ddb3871307376d27d0f276c9da0ecce0384f01f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 15 Mar 2011 05:30:12 +0000 Subject: [PATCH] Appease GCC. I'm surprised Clang accepted this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127672 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/UninitializedValues.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/Analysis/UninitializedValues.cpp b/lib/Analysis/UninitializedValues.cpp index 31ee412815..ae0dbf10e8 100644 --- a/lib/Analysis/UninitializedValues.cpp +++ b/lib/Analysis/UninitializedValues.cpp @@ -116,10 +116,6 @@ public: unsigned x = (vv.vec[idx << 1] ? 1 : 0) | (vv.vec[(idx << 1) | 1] ? 2 :0); return (Value) x; } - - bool operator==(Value v) { - return v = operator Value(); - } }; reference operator[](unsigned idx) { return reference(*this, idx); } @@ -132,7 +128,7 @@ class CFGBlockValues { const CFG &cfg; BVPair *vals; ValueVector scratch; - DeclToIndex DeclToIndex; + DeclToIndex declToIndex; ValueVector &lazyCreate(ValueVector *&bv); public: @@ -150,7 +146,7 @@ public: bool updateValueVectors(const CFGBlock *block, const BVPair &newVals); bool hasNoDeclarations() const { - return DeclToIndex.size() == 0; + return declToIndex.size() == 0; } void resetScratch(); @@ -180,13 +176,13 @@ CFGBlockValues::~CFGBlockValues() { } void CFGBlockValues::computeSetOfDeclarations(const DeclContext &dc) { - DeclToIndex.computeMap(dc); - scratch.resize(DeclToIndex.size()); + declToIndex.computeMap(dc); + scratch.resize(declToIndex.size()); } ValueVector &CFGBlockValues::lazyCreate(ValueVector *&bv) { if (!bv) - bv = new ValueVector(DeclToIndex.size()); + bv = new ValueVector(declToIndex.size()); return *bv; } @@ -286,7 +282,7 @@ void CFGBlockValues::resetScratch() { } ValueVector::reference CFGBlockValues::operator[](const VarDecl *vd) { - const llvm::Optional &idx = DeclToIndex.getValueIndex(vd); + const llvm::Optional &idx = declToIndex.getValueIndex(vd); assert(idx.hasValue()); return scratch[idx.getValue()]; } -- 2.40.0