35 switch(parm->getKind()) {
36 case clang::TemplateArgument::ArgKind::Type: {
37 out.
names[0] = parm->getAsType().getAsString(pp);
39 spdlog::debug(
"type: {}", out.
names[0]);
42 case clang::TemplateArgument::ArgKind::Integral: {
43 llvm::SmallString<10> tmp_name;
44 parm->getAsIntegral().toString(tmp_name);
45 out.
names[0] = tmp_name.str().str();
47 spdlog::debug(
"integral: {}", out.
names[0]);
50 case clang::TemplateArgument::ArgKind::Pack: {
51 out.
names.resize(parm->pack_size());
52 for(
auto pack_it = parm->pack_begin(); pack_it != parm->pack_end(); pack_it++) {
53 switch(pack_it->getKind()) {
54 case clang::TemplateArgument::ArgKind::Type: {
55 out.
names[std::distance(parm->pack_begin(), pack_it)] = pack_it->getAsType().getAsString(pp);
58 case clang::TemplateArgument::ArgKind::Integral: {
59 llvm::SmallString<10>
name;
60 pack_it->getAsIntegral().toString(
name);
61 out.
names[std::distance(parm->pack_begin(), pack_it)] =
name.str().str();
72 case clang::TemplateArgument::ArgKind::Template: {
73 llvm::raw_string_ostream OS(out.
names[0]);
74#if INSTANTIATOR_LLVM_MAJOR > 13
75 parm->getAsTemplate().print(OS, pp, clang::TemplateName::Qualified::AsWritten);
77 parm->getAsTemplate().print(OS, pp,
false);
83#if INSTANTIATOR_LLVM_MAJOR > 17
84 case clang::TemplateArgument::ArgKind::StructuralValue: {
85 spdlog::critical(
"NTTP are not implemented correctly. Param={}", parm->getAsStructuralValue().isStruct());
89 case clang::TemplateArgument::ArgKind::Expression: {
90 spdlog::critical(
"Expression TA are not implemented correctly. Param={}", parm->getAsExpr()->getType().getAsString(pp));
94 spdlog::critical(
"Unhandled clang::TemplateArgument::ArgKind={}, isExpression={}",
95 static_cast<int>(parm->getKind()),
96 parm->getKind() == clang::TemplateArgument::ArgKind::Expression);