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

Method getTemplateParameters

lib/clangimport.cpp:487–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487std::string clangimport::AstNode::getTemplateParameters() const
488{
489 if (children.empty() || children[0]->nodeType != TemplateArgument)
490 return "";
491 std::string templateParameters;
492 for (const AstNodePtr& child: children) {
493 if (child->nodeType == TemplateArgument) {
494 if (templateParameters.empty())
495 templateParameters = "<";
496 else
497 templateParameters += ",";
498 templateParameters += unquote(child->mExtTokens.back());
499 }
500 }
501 return templateParameters + ">";
502}
503
504// cppcheck-suppress unusedFunction // only used in comment
505void clangimport::AstNode::dumpAst(int num, int indent) const

Callers

nothing calls this directly

Calls 2

unquoteFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected