Hello,
I can't receive typedef type from function template. For example, I have such code for analyze:
//////cpp code////////////////////////
typedef float templatedTypedef;
template <typename TfT> void funcTempl(int a);
int testTemplatedTypedef() {
funcTempl<templatedTypedef>(10);
}
//////end code/////////////////////////
When I try to receive type of template parameter in this way:
//////cpp code////////////////////////
const FunctionDecl *FD = ... ; // Pointer to declaration funcTempl.
const TemplateArgumentList *TAL = FD->getDescribedFunctionTemplate()->getTemplateSpecializationArgs();
for (const TemplateArgument &TA : TAL->asArray()) {
TA.dump(); // It print's that type is float.
}
//////end code/////////////////////////
So I see type, but this type is type of typedef, but I can get typedef itself. I guess for template function it unpack type of typedef and throw out it. Or maybe I can get this typedef in another way? can anybody help me?