diff --git a/src/checkclass.cpp b/src/checkclass.cpp index ee3d8f67b..3f483e423 100644 --- a/src/checkclass.cpp +++ b/src/checkclass.cpp @@ -878,7 +878,7 @@ void CheckClass::thisSubtraction() void CheckClass::noConstructorError(const Token *tok, const std::string &classname) { - reportError(tok, Severity::style, "noConstructor", "The class '" + classname + "' has no constructor"); + reportError(tok, Severity::style, "noConstructor", "The class '" + classname + "' has no constructor. Member variables not initialized."); } void CheckClass::uninitVarError(const Token *tok, const std::string &classname, const std::string &varname) diff --git a/test/testclass.cpp b/test/testclass.cpp index 04631de0a..5670a1e9b 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -641,7 +641,7 @@ private: "{\n" " int i;\n" "};\n"); - ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor. Member variables not initialized.\n", errout.str()); } void noConstructor2() diff --git a/test/testconstructors.cpp b/test/testconstructors.cpp index 6414488e1..4b561d375 100644 --- a/test/testconstructors.cpp +++ b/test/testconstructors.cpp @@ -86,7 +86,7 @@ private: "public:\n" " int i;\n" "};\n"); - ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) The class 'Fred' has no constructor. Member variables not initialized.\n", errout.str()); }