The cppcoreguidelines-special-member-functions check has the AllowSoleDefaultDtor checker option.
It is false by default, and now I'm proposing to change it to true.
Our CodeChecker users frequently find it surprising that the check reports for cases like this by default:
struct A { virtual ~A() = default; };
Quoting from the Cpp CoreGuidelines C.21: If you define or =delete any copy, move, or destructor function, define or =delete them all:
Example, good When a destructor needs to be declared just to make it virtual, it can be defined as defaulted.
class AbstractBase { public: virtual ~AbstractBase() = default; // ... };