Are there any static analysis tools that check for Rule of 3 (or Rule of 5 C++11)

妖精的绣舞 提交于 2019-12-05 16:07:30

Coverity has. We use version 6.5. There is a checker MISSING_COPY_OR_ASSIGN.

C++test from Parasoft (commercial tool) has a rule (MRM-40) that covers "copy and destroy consistently" that looks like it would help you. Basically it says if you define any of the copy constructor, copy assignment operator, or destructor, you might need to define one or both of the others.

More info at http://www.parasoft.com/jsp/products/cpptest.jsp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!