diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index e63c97ec3..68643ef3f 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -345,8 +345,9 @@ void CheckClass::copyconstructors() } if (!hasOperatorEq) noOperatorEqError(scope); - if (!hasDestructor) - noDestructorError(scope); + if (!hasDestructor) { + // TODO: how are pointers allocated? noDestructorError(scope); + } } std::set copiedVars; diff --git a/test/testclass.cpp b/test/testclass.cpp index 463014dc1..4b2b2ba76 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -824,7 +824,7 @@ private: " F(const F &f);\n" " F&operator=(const F&);" "};"); - ASSERT_EQUALS("[test.cpp:1]: (style) struct 'F' does not have a destructor which is recommended since the class contains a pointer to allocated memory.\n", errout.str()); + // TODO ASSERT_EQUALS("[test.cpp:1]: (style) struct 'F' does not have a destructor which is recommended since the class contains a pointer to allocated memory.\n", errout.str()); } // Check the operator Equal