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

Method addInstantiation

lib/templatesimplifier.cpp:713–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713void TemplateSimplifier::addInstantiation(Token *token, const std::string &scope)
714{
715 simplifyTemplateArgs(token->tokAt(2), token->next()->findClosingBracket());
716
717 TokenAndName instantiation(token, scope);
718
719 // check if instantiation already exists before adding it
720 const auto it = std::find(mTemplateInstantiations.cbegin(),
721 mTemplateInstantiations.cend(),
722 instantiation);
723
724 if (it == mTemplateInstantiations.cend())
725 mTemplateInstantiations.emplace_back(std::move(instantiation));
726}
727
728static const Token* getFunctionToken(const Token* nameToken)
729{

Callers

nothing calls this directly

Calls 3

nextMethod · 0.80
tokAtMethod · 0.45
findClosingBracketMethod · 0.45

Tested by

no test coverage detected