From e4080e7f2ab886dbe3c03777e1573be66c8bb07a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 3 Mar 2015 19:53:04 +0000 Subject: 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. llvm-svn: 231114 --- llvm/unittests/ADT/DeltaAlgorithmTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/unittests/ADT/DeltaAlgorithmTest.cpp') diff --git a/llvm/unittests/ADT/DeltaAlgorithmTest.cpp b/llvm/unittests/ADT/DeltaAlgorithmTest.cpp index a1884cd8f3a..a33f2b4bc1a 100644 --- a/llvm/unittests/ADT/DeltaAlgorithmTest.cpp +++ b/llvm/unittests/ADT/DeltaAlgorithmTest.cpp @@ -32,7 +32,7 @@ std::ostream &operator<<(std::ostream &OS, namespace { -class FixedDeltaAlgorithm : public DeltaAlgorithm { +class FixedDeltaAlgorithm final : public DeltaAlgorithm { changeset_ty FailingSet; unsigned NumTests; -- cgit v1.2.3