Hi,
I'm trying to find a way to construct a string which uniquely identify a class such that different template instantiations yields a different string. Say thay I have a class template A:
template<class T> class A;
A *a = new A<int>();
then if I start from the CXXConstructExpr:
ctorExpr->getConstructor()->getQualifiedNameAsString()
it will get be "A<int>::A".
But say that I have another class B which inherits from A:
class B : public A<int> {
};
B *b = new B;
How do I find out how A is templatized? Ideally I would like to get out a string such as "A<int>", but the closest I get is to do
CXXBaseSpecifier base = ;
base.getType()->getAsCXXRecordDecl()->getQualifiedNameAsString();
but this will only give me "A". How do I find out the template parameters used when instantiating A?