DeltaAlgorithm: Provide protected default copy ctor for use by test derived class.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 3 Mar 2015 19:53:04 +0000 (19:53 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 3 Mar 2015 19:53:04 +0000 (19:53 +0000)
commit7462aeac16aba76d06276c18fa1342407fb14833
tree75d40700f55ee550a0661896612b396e3258c2cf
parent394b3ac916da02c96727dca81997106e47980d09
DeltaAlgorithm: Provide protected default copy ctor for use by test derived class.

Without this, use of this copy ctor is deprecated in C++11 due to the
presence of a user-declared dtor.

Marking the class final is just a little extra security that there are
no further derived classes that may then end up using the intermediate
base class's copy assignment operator and cause slicing to occur.

I didn't bother marking the other (non-test) base class final, since it
has reference members so it won't have any implicit assignment operators
anyway. Open to ideas on that, though.

We probably want a warning about use of a slicing assignment operator,
then I wouldn't worry so much about marking the class as final.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231114 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/DeltaAlgorithm.h
unittests/ADT/DeltaAlgorithmTest.cpp