banditcpp / bandit

Human-friendly unit testing for C++11
https://banditcpp.github.io/bandit/
Other
260 stars 37 forks source link

Missing virtual dtor in `failure_formatter` #131

Closed OpatrilPeter closed 6 years ago

OpatrilPeter commented 6 years ago

Hello, compiling with clang++ 6.0 triggers a warning about not having virtual destructor in failure_formatter while also having virtual functions. Despite the fact that it currently shouldn't result in any bugs, it could lead to obscure problems later once any type inheriting from failure_formatter would contain any data member requiring destructor. Even aside from that, this is also a problem for all people treating warnings as errors.

Thus, my recommendation is simple addition of following line virtual void ~failure_formatter() {}

sbeyer commented 6 years ago

Thanks for reporting! I will fix this soon.