21#include <clang/Lex/Lexer.h>
27 const clang::ClassTemplateSpecializationDecl *decl,
const std::string &tp)
29 const auto [depth0, index0, qualifier0] =
32 for (
auto i = 0U; i < decl->getDescribedTemplateParams()->size(); i++) {
33 const auto *param = decl->getDescribedTemplateParams()->getParam(i);
36 return param->getNameAsString();
44 const clang::TypeAliasTemplateDecl *decl,
const std::string &tp)
46 const auto [depth0, index0, qualifier0] =
49 for (
auto i = 0U; i < decl->getTemplateParameters()->size(); i++) {
50 const auto *param = decl->getTemplateParameters()->getParam(i);
53 return param->getNameAsString();
63 const clang::Decl *decl,
const std::string &type_parameter)
65 if (type_parameter.find(
"type-parameter-") != 0)
66 return type_parameter;
68 if (
const auto *template_decl =
69 llvm::dyn_cast<clang::ClassTemplateSpecializationDecl>(decl);
70 template_decl !=
nullptr) {
72 template_decl, type_parameter);
75 if (
const auto *alias_decl =
76 llvm::dyn_cast<clang::TypeAliasTemplateDecl>(decl);
77 alias_decl !=
nullptr) {
79 alias_decl, type_parameter);
83 return type_parameter;