Is it possible to get parmvardecl from vardecl of function type when AST is constructed?

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

Is it possible to get parmvardecl from vardecl of function type when AST is constructed?

Jon Chesterfield via cfe-dev
Hi all,

I'm developing a clang-tidy plugin to check whether function decls
have proper prototypes.
Like

    int (* copy)(int src, int dest);

It's not clear what the function does when parameter names are omitted.

For VarDecl of form:

    int (* copy)(int, int);

AST dump gives:

    VarDecl 0x204c1b0 <1.c:1:1, col:21> col:7 copy 'int (*)(int, int)'

is it possible to get parameter info from the constructed AST,
especially whether the params
have ids?

--
Best Regards

Ding Fei
E-mail: [hidden email]
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev