Print the type of a parameter (ParmVarDecl) with clang API

Viewed 3904

I need to print the type of a parameter in a C++ source file using the clang API.

If I have a parameter representation in clang (ParmVarDecl* param) I can print the name of the parameter using param->getNameAsString(). I would need a method param->getTypeAsString(), but there is no such method. So is there another way to do this task?

2 Answers
Related