Added verbose message for "memsetClass" error. (#5183)

This commit is contained in:
PKEuS 2014-03-17 13:23:23 +01:00
parent e0b34de090
commit b6b374cf3d
1 changed files with 5 additions and 1 deletions

View File

@ -1091,7 +1091,11 @@ void CheckClass::mallocOnClassError(const Token* tok, const std::string &memfunc
void CheckClass::memsetError(const Token *tok, const std::string &memfunc, const std::string &classname, const std::string &type)
{
reportError(tok, Severity::error, "memsetClass", "Using '" + memfunc + "' on " + type + " that contains a " + classname + ".");
reportError(tok, Severity::error, "memsetClass",
"Using '" + memfunc + "' on " + type + " that contains a " + classname + ".\n"
"Using '" + memfunc + "' on " + type + " that contains a " + classname + " is unsafe, because constructor, destructor "
"and copy operator calls are omitted. These are necessary for this non-POD type to ensure that a valid object "
"is created.");
}
void CheckClass::memsetErrorReference(const Token *tok, const std::string &memfunc, const std::string &type)