From 9710e819be33e6d1c6a93d12876b3687fa75fc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 1 May 2018 09:26:03 +0200 Subject: [PATCH] CheckClass: Disable noDestructor for now, we need to handle new better --- lib/checkclass.cpp | 5 +++-- test/testclass.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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