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

Method TokenAndName

lib/templatesimplifier.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98TemplateSimplifier::TokenAndName::TokenAndName(Token *token, std::string scope) :
99 mToken(token), mScope(std::move(scope)), mName(mToken ? mToken->str() : ""),
100 mFullName(mScope.empty() ? mName : (mScope + " :: " + mName)),
101 mNameToken(nullptr), mParamEnd(nullptr), mFlags(0)
102{
103 if (mToken) {
104 if (mToken->strAt(1) == "<") {
105 const Token *end = mToken->next()->findClosingBracket();
106 if (end && end->strAt(1) == "(") {
107 isFunction(true);
108 }
109 }
110 mToken->templateSimplifierPointer(this);
111 }
112}
113
114TemplateSimplifier::TokenAndName::TokenAndName(Token *token, std::string scope, const Token *nameToken, const Token *paramEnd) :
115 mToken(token), mScope(std::move(scope)), mName(nameToken->str()),

Callers

nothing calls this directly

Calls 11

isFriendFunction · 0.85
isClassFunction · 0.85
isVariadicFunction · 0.85
isVariableFunction · 0.85
nextMethod · 0.80
findOpeningBracketMethod · 0.80
simpleMatchFunction · 0.70
strMethod · 0.45
emptyMethod · 0.45
findClosingBracketMethod · 0.45
tokAtMethod · 0.45

Tested by

no test coverage detected