Don't copy a potentially-uninitialized variable.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 18 Jun 2012 22:31:28 +0000 (22:31 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 18 Jun 2012 22:31:28 +0000 (22:31 +0000)
Based on review discussion of r158638 with Chandler Carruth, Tobias von Koch, and Duncan Sands and a -Wmaybe-uninitialized warning from GCC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158685 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/DenseMap.h

index 045b5c6a442092a0f9193e56ec9cf9acf4c3f528..0166228a74db2c573c1ed539b4282b5f02670220 100644 (file)
@@ -490,7 +490,7 @@ private:
 
   template <typename LookupKeyT>
   bool LookupBucketFor(const LookupKeyT &Val, BucketT *&FoundBucket) {
-    const BucketT *ConstFoundBucket = FoundBucket;
+    const BucketT *ConstFoundBucket;
     bool Result = const_cast<const DenseMapBase *>(this)
       ->LookupBucketFor(Val, ConstFoundBucket);
     FoundBucket = const_cast<BucketT *>(ConstFoundBucket);