MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / InsertTemplateSpecializationHeader

Method InsertTemplateSpecializationHeader

CodeGenerator.cpp:1255–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1253//-----------------------------------------------------------------------------
1254
1255void CodeGenerator::InsertTemplateSpecializationHeader(const Decl& decl)
1256{
1257 if(const auto* fd = dyn_cast_or_null<FunctionDecl>(&decl)) {
1258 if(const auto* specArgs = fd->getTemplateSpecializationArgs()) {
1259 InsertTemplateArgsObjectParam(specArgs->asArray());
1260 }
1261 } else if(const auto* vd = dyn_cast_or_null<VarTemplateSpecializationDecl>(&decl)) {
1262 InsertTemplateArgsObjectParam(vd->getTemplateArgs().asArray());
1263 } else if(const auto* clsTemplateSpe = dyn_cast_or_null<ClassTemplateSpecializationDecl>(&decl)) {
1264 InsertTemplateArgsObjectParam(clsTemplateSpe->getTemplateArgs().asArray());
1265 }
1266
1267 mOutputFormatHelper.AppendNewLine(kwTemplate, "<>"sv);
1268}
1269//-----------------------------------------------------------------------------
1270
1271void CodeGenerator::InsertArg(const VarDecl* stmt)

Callers

nothing calls this directly

Calls 1

AppendNewLineMethod · 0.80

Tested by

no test coverage detected