MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / copyCtorAndEqOperatorError

Method copyCtorAndEqOperatorError

lib/checkclass.cpp:3305–3313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3303}
3304
3305void CheckClassImpl::copyCtorAndEqOperatorError(const Token *tok, const std::string &classname, bool isStruct, bool hasCopyCtor)
3306{
3307 const std::string message = "$symbol:" + classname + "\n"
3308 "The " + std::string(isStruct ? "struct" : "class") + " '$symbol' has '" +
3309 getFunctionTypeName(hasCopyCtor ? FunctionType::eCopyConstructor : FunctionType::eOperatorEqual) +
3310 "' but lack of '" + getFunctionTypeName(hasCopyCtor ? FunctionType::eOperatorEqual : FunctionType::eCopyConstructor) +
3311 "'.";
3312 reportError(tok, Severity::warning, "copyCtorAndEqOperator", message);
3313}
3314
3315void CheckClassImpl::checkOverride()
3316{

Callers 1

getErrorMessagesMethod · 0.80

Calls 2

getFunctionTypeNameFunction · 0.85
reportErrorFunction · 0.70

Tested by

no test coverage detected