[llvm] r188528 - Calling the base class constructor from the derived class' initializer list. This matches DenseMap's behavior, and silences some warnings.

Aaron Ballman aaron at aaronballman.com
Thu Aug 15 19:56:44 PDT 2013


Author: aaronballman
Date: Thu Aug 15 21:56:43 2013
New Revision: 188528

URL: http://llvm.org/viewvc/llvm-project?rev=188528&view=rev
Log:
Calling the base class constructor from the derived class' initializer list.  This matches DenseMap's behavior, and silences some warnings.

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=188528&r1=188527&r2=188528&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Thu Aug 15 21:56:43 2013
@@ -713,13 +713,13 @@ public:
     init(NumInitBuckets);
   }
 
-  SmallDenseMap(const SmallDenseMap &other) {
+  SmallDenseMap(const SmallDenseMap &other) : BaseT() {
     init(0);
     copyFrom(other);
   }
 
 #if LLVM_HAS_RVALUE_REFERENCES
-  SmallDenseMap(SmallDenseMap &&other) {
+  SmallDenseMap(SmallDenseMap &&other) : BaseT() {
     init(0);
     swap(other);
   }





More information about the llvm-commits mailing list