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

Method name

lib/symboldatabase.cpp:3826–3848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3824}
3825
3826std::string Type::name() const
3827{
3828 const Token* start = classDef->next();
3829 if (classScope && classScope->enumClass && isEnumType())
3830 start = start->tokAt(1);
3831 else if (start->str() == "class")
3832 start = start->tokAt(1);
3833 else if (!start->isName())
3834 return "";
3835 const Token* next = start;
3836 while (Token::Match(next, "::|<|>|(|)|[|]|*|&|&&|%name%")) {
3837 if (Token::Match(next, "<|(|[") && next->link())
3838 next = next->link();
3839 next = next->next();
3840 }
3841 std::string result;
3842 for (const Token* tok = start; tok != next; tok = tok->next()) {
3843 if (!result.empty())
3844 result += ' ';
3845 result += tok->str();
3846 }
3847 return result;
3848}
3849
3850void SymbolDatabase::debugMessage(const Token *tok, const std::string &type, const std::string &msg) const
3851{

Callers 15

createMethod · 0.45
argumentSizeErrorMethod · 0.45
assertWithSideEffectsMethod · 0.45
isStdVectorOrStringMethod · 0.45
va_start_argumentMethod · 0.45
va_list_usageMethod · 0.45
checkStructVariableMethod · 0.45
nothrowThrowsMethod · 0.45

Calls 5

nextMethod · 0.80
isEnumTypeFunction · 0.70
tokAtMethod · 0.45
strMethod · 0.45
emptyMethod · 0.45

Tested by 15

unique_errorsMethod · 0.36
VariableValueType1Method · 0.36
VariableValueType2Method · 0.36
VariableValueType3Method · 0.36
findVariableType1Method · 0.36
findVariableType2Method · 0.36
isVariableDecltypeMethod · 0.36
hasGlobalVariables1Method · 0.36
hasGlobalVariables2Method · 0.36