Explicitly default ilistTest::Node's copy constructor
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Mar 2015 17:01:18 +0000 (17:01 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Mar 2015 17:01:18 +0000 (17:01 +0000)
In the presence of a user-declared dtor, calling an implicit copy ctor
is deprecated in C++11.

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

unittests/ADT/ilistTest.cpp

index 44442ebf75adc69bf8c50dff8460a699f631dd0c..9127b05b4b8fdbd8340d10e533778ef9af7228a7 100644 (file)
@@ -21,7 +21,8 @@ struct Node : ilist_node<Node> {
   int Value;
 
   Node() {}
-  Node(int _Value) : Value(_Value) {}
+  Node(int Value) : Value(Value) {}
+  Node(const Node&) = default;
   ~Node() { Value = -1; }
 };