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

Function isTemplateInstantion

lib/templatesimplifier.cpp:778–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776}
777
778static bool isTemplateInstantion(const Token* tok)
779{
780 if (!tok->isName() || (tok->isKeyword() && !tok->isOperatorKeyword()))
781 return false;
782 if (Token::Match(tok->tokAt(-1), "%type% %name% ::|<"))
783 return true;
784 if (Token::Match(tok->tokAt(-2), "[,:] private|protected|public %name% ::|<"))
785 return true;
786 if (Token::Match(tok->tokAt(-1), "(|{|}|;|=|>|<<|:|.|*|&|return|<|,|!|[ %name% ::|<|("))
787 return true;
788 return Token::Match(tok->tokAt(-2), "(|{|}|;|=|<<|:|.|*|&|return|<|,|!|[ :: %name% ::|<|(");
789}
790
791void TemplateSimplifier::getTemplateInstantiations()
792{

Callers 1

Calls 2

isKeywordMethod · 0.45
tokAtMethod · 0.45

Tested by

no test coverage detected