From 9e2d6f0c4d19e1ae1652071ea783ad577ea93e28 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Mon, 27 Jun 2016 22:46:25 +0200 Subject: [PATCH] CM_OVERRIDE: mark destructor overridden in the feature test. This is important for two reasons: 1. A compiler might warn about a class that has a virtual member function but no virtual destructor. We don't want to treat the feature as incomplete in this case. 2. MSVC10 supports the override identifier except on destructors. In this case, the feature really is incomplete and we want to detect it as such. --- Source/Checks/cm_cxx_override.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Checks/cm_cxx_override.cxx b/Source/Checks/cm_cxx_override.cxx index 9395a0a23..e1969684d 100644 --- a/Source/Checks/cm_cxx_override.cxx +++ b/Source/Checks/cm_cxx_override.cxx @@ -1,10 +1,12 @@ struct Foo { + virtual ~Foo() {} virtual int test() const = 0; }; struct Bar : Foo { + ~Bar() override {} int test() const override { return 0; } };