summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2017-01-04 22:49:55 +0000
committerJustin Lebar <jlebar@google.com>2017-01-04 22:49:55 +0000
commit57184446f96829ba50798458b49b5a7175516a27 (patch)
treece6fdc08be609f6ff0cede502375d293347be6b0 /llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
parent3bdd75d01ef147e2a4f596bb53ab5f5957f734df (diff)
downloadbcm5719-llvm-57184446f96829ba50798458b49b5a7175516a27.tar.gz
bcm5719-llvm-57184446f96829ba50798458b49b5a7175516a27.zip
[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. llvm-svn: 291023
Diffstat (limited to 'llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp')
-rw-r--r--llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp b/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
index 143a8cc4910..83dc1376649 100644
--- a/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
+++ b/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
@@ -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;
OpenPOWER on IntegriCloud