Retrieving names from function type decl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Retrieving names from function type decl

Nathan Ridge via cfe-dev
Hello,

I am writing a clang tool, using a build of clang from March ish.
I have some input code like the following:

using handler = void(*)(int a);

I seem to be unable to retrieve the name "a" from the TypeAliasDecl. dump()ing it seems to give all the correct hierarchy information except for the missing names.

I believe that I need a ValueDecl in order for this to work, since these parameter names are obviously not part of the type, but so far I haven't been able to find one.

The same issue appears when using templates, like:
std::function<void(int a)>

Any information that could point me in the right direction or help me to reconstitute the missing information would be appreciated.
Thank you,
Brittany

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev