[cfe-commits] r127672 - /cfe/trunk/lib/Analysis/UninitializedValues.cpp

Ted Kremenek kremenek at apple.com
Mon Mar 14 22:30:12 PDT 2011


Author: kremenek
Date: Tue Mar 15 00:30:12 2011
New Revision: 127672

URL: http://llvm.org/viewvc/llvm-project?rev=127672&view=rev
Log:
Appease GCC.  I'm surprised Clang accepted this.

Modified:
    cfe/trunk/lib/Analysis/UninitializedValues.cpp

Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UninitializedValues.cpp?rev=127672&r1=127671&r2=127672&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/UninitializedValues.cpp (original)
+++ cfe/trunk/lib/Analysis/UninitializedValues.cpp Tue Mar 15 00:30:12 2011
@@ -116,10 +116,6 @@
       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 @@
   const CFG &cfg;
   BVPair *vals;
   ValueVector scratch;
-  DeclToIndex DeclToIndex;
+  DeclToIndex declToIndex;
   
   ValueVector &lazyCreate(ValueVector *&bv);
 public:
@@ -150,7 +146,7 @@
   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 @@
 }
 
 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 @@
 }
 
 ValueVector::reference CFGBlockValues::operator[](const VarDecl *vd) {
-  const llvm::Optional<unsigned> &idx = DeclToIndex.getValueIndex(vd);
+  const llvm::Optional<unsigned> &idx = declToIndex.getValueIndex(vd);
   assert(idx.hasValue());
   return scratch[idx.getValue()];
 }





More information about the cfe-commits mailing list