[llvm-commits] [llvm] r158685 - /llvm/trunk/include/llvm/ADT/DenseMap.h
David Blaikie
dblaikie at gmail.com
Mon Jun 18 15:31:28 PDT 2012
Author: dblaikie
Date: Mon Jun 18 17:31:28 2012
New Revision: 158685
URL: http://llvm.org/viewvc/llvm-project?rev=158685&view=rev
Log:
Don't copy a potentially-uninitialized variable.
Based on review discussion of r158638 with Chandler Carruth, Tobias von Koch, and Duncan Sands and a -Wmaybe-uninitialized warning from GCC.
Modified:
llvm/trunk/include/llvm/ADT/DenseMap.h
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=158685&r1=158684&r2=158685&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Mon Jun 18 17:31:28 2012
@@ -490,7 +490,7 @@
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);
More information about the llvm-commits
mailing list