9 : declaration_{declaration},
10 template_parameters_{nullptr},
11 template_args_{nullptr} {
12 if (declaration->hasDefinition() ==
true) {
13 TraverseDecl(declaration);
18 if (IdentifierInfo *info =
declaration_->getIdentifier()) {
19 auto module_name = info->getNameStart();
26 if (
const auto tdecl =
27 dyn_cast<ClassTemplateSpecializationDecl>(declaration)) {
29 LLVM_DEBUG(llvm::dbgs()
30 <<
"@@ template specialization args: " << module_name
35 case TemplateArgument::ArgKind::Integral: {
38 LLVM_DEBUG(llvm::dbgs() <<
"@@ Integral: " << q <<
"\n";);
40 case TemplateArgument::ArgKind::Type: {
42 auto name{q.getAsString()};
43 LLVM_DEBUG(llvm::dbgs() <<
"@@ arg: " << name <<
"\n";);
54 auto template_args{declaration->getDescribedClassTemplate()};
55 if (template_args !=
nullptr) {
56 LLVM_DEBUG(llvm::dbgs() <<
"@@ template described class args: "
57 << module_name <<
"\n";);
81 std::vector<std::string> arg_list;
88 switch (arg.getKind()) {
89 case TemplateArgument::ArgKind::Integral: {
91 auto number{arg.getAsIntegral()};
92 SmallString<10> small_str;
93 number.toString(small_str);
94 arg_list.push_back(std::string(small_str.c_str()));
95 LLVM_DEBUG(llvm::dbgs() <<
"Arg: " << small_str <<
"\n";);
97 case TemplateArgument::ArgKind::Type: {
98 auto q{arg.getAsType()};
99 name = q.getAsString();
100 arg_list.push_back(name);
101 LLVM_DEBUG(llvm::dbgs() <<
"Arg: " << name <<
"\n";);