The rule of three check should ignore trivial destructors - eg empty destructors
why do you have an empty dtor ?
I'm honestly not sure if there's any good reason for them, but the codebase I'm working on is littered with them. Of course, if feel free to close this if you also think there's absolutely no good reason why an empty destructor should be left in a project.
for virtual classes it's important to have a non-inline dtor, even if empty, for value classes no. but ok, it reduces the amount of noise, and if it's empty it wouldn't be hiding a bug anyway
I wonder if allowing any const calls might work too. This would allow destructors with debugging and other non dangerous code.
Contributions welcome for Utils::isDangerous(CXXMethodDecl) :)
Git commit 7947f1ab62801f978557e6ea2f193f07276042a9 by Sergio Martins. Committed on 25/01/2016 at 23:25. Pushed by smartins into branch 'master'. rule-of-three: Allow empty user dtors, for the sake of less noise If: - No user copy ctor - No user copy-assign operator - User dtor but empty then we don't warn. Although it violates the rule of the big three it's harmless. M +6 -0 checks/ruleofthree.cpp M +1 -1 tests/rule-of-three/main.cpp M +7 -2 tests/rule-of-three/main.h http://commits.kde.org/clazy/7947f1ab62801f978557e6ea2f193f07276042a9