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

Method getTypeName

lib/symboldatabase.cpp:2710–2720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2708}
2709
2710std::string Variable::getTypeName() const
2711{
2712 std::string ret;
2713 // TODO: For known types, generate the full type name
2714 for (const Token *typeTok = mTypeStartToken; Token::Match(typeTok, "%name%|::") && typeTok->varId() == 0; typeTok = typeTok->next()) {
2715 ret += typeTok->str();
2716 if (Token::simpleMatch(typeTok->next(), "<") && typeTok->linkAt(1)) // skip template arguments
2717 typeTok = typeTok->linkAt(1);
2718 }
2719 return ret;
2720}
2721
2722static bool isOperator(const Token *tokenDef)
2723{

Callers 6

string_c_strMethod · 0.80
isInitializedMethod · 0.80
constructorsMethod · 0.80
checkMemsetMethod · 0.80

Calls 4

nextMethod · 0.80
linkAtMethod · 0.80
simpleMatchFunction · 0.70
strMethod · 0.45

Tested by

no test coverage detected