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

Method removeTemplate

lib/templatesimplifier.cpp:638–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636}
637
638bool TemplateSimplifier::removeTemplate(Token *tok, std::map<Token*, Token*>* forwardDecls)
639{
640 if (!Token::simpleMatch(tok, "template <"))
641 return false;
642
643 Token *end = findTemplateDeclarationEnd(tok);
644 if (end && end->next()) {
645 invalidateForwardDecls(tok, end->next(), forwardDecls);
646 eraseTokens(tok, end->next());
647 deleteToken(tok);
648 return true;
649 }
650
651 return false;
652}
653
654bool TemplateSimplifier::getTemplateDeclarations()
655{

Callers

nothing calls this directly

Calls 4

invalidateForwardDeclsFunction · 0.85
deleteTokenFunction · 0.85
nextMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected