[llvm] r291023 - [ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 14:49:55 PST 2017
Author: jlebar
Date: Wed Jan 4 16:49:55 2017
New Revision: 291023
URL: http://llvm.org/viewvc/llvm-project?rev=291023&view=rev
Log:
[ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest.
Our copy constructor doesn't explicitly invoke the base class's
constructor, and GCC is (rightly) concerned.
Modified:
llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp
Modified: llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp?rev=291023&r1=291022&r2=291023&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp (original)
+++ llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp Wed Jan 4 16:49:55 2017
@@ -15,7 +15,9 @@ namespace llvm {
namespace {
struct SimpleRefCounted : public RefCountedBase<SimpleRefCounted> {
SimpleRefCounted() { ++NumInstances; }
- SimpleRefCounted(const SimpleRefCounted &) { ++NumInstances; }
+ SimpleRefCounted(const SimpleRefCounted &) : RefCountedBase() {
+ ++NumInstances;
+ }
~SimpleRefCounted() { --NumInstances; }
static int NumInstances;
More information about the llvm-commits
mailing list