[cfe-dev] How to get typedef name?

Kenth Eriksson via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 5 01:28:42 PST 2019


On Thu, 2019-11-03 at 12:53, Miklos Vajna wrote:
> How can I get the underlying typedef name for the parameters of
> a FunctionDecl?  
> 
> The following gives the resolved typedef name, but I want the typedef
> name. 
> 
> 
> func->parameters()[i]->getType().getAsString();
> 
>
> Care to share a short, self-contained example?

typedef int my_int_t;

int my_func(my_int_t i);

I would like to get the the typedef name for parameter 0 in the
function decl. I don't want to desugar it, only get the typedef name.








More information about the cfe-dev mailing list