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

Function getFunctionTypeName

lib/checkclass.cpp:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52static const CWE CWE_ONE_DEFINITION_RULE(758U);
53
54static const char * getFunctionTypeName(FunctionType type)
55{
56 switch (type) {
57 case FunctionType::eConstructor:
58 return "constructor";
59 case FunctionType::eCopyConstructor:
60 return "copy constructor";
61 case FunctionType::eMoveConstructor:
62 return "move constructor";
63 case FunctionType::eDestructor:
64 return "destructor";
65 case FunctionType::eFunction:
66 return "function";
67 case FunctionType::eOperatorEqual:
68 return "operator=";
69 case FunctionType::eLambda:
70 return "lambda";
71 }
72 return "";
73}
74
75static bool isVariableCopyNeeded(const Variable &var, FunctionType type)
76{

Calls

no outgoing calls

Tested by

no test coverage detected