[cfe-dev] how to determine a parameter has a type declarator in clang

Nikola Smiljanic popizdeh at gmail.com
Tue Jan 1 03:56:30 PST 2013


Have a look at ArgInfo member of FunctionTypeInfo, the comment for
ParamInfo structure has the relevant part:

/// ParamInfo - An array of paraminfo objects is allocated whenever a
function
/// declarator is parsed.  There are two interesting styles of arguments
here:
/// K&R-style identifier lists and parameter type lists.  K&R-style
identifier
/// lists will have information about the identifier,* but no type
information.*
/// Parameter type lists will have type info (if the actions module provides
/// it), but may have null identifier info: e.g. for 'void foo(int X, int)'.

On Mon, Dec 31, 2012 at 6:40 PM, kevinlynx <kevinlynx at gmail.com> wrote:

>
> I use clang to do some code analyse. And now i have a function below
>
>     void func(p)
>
> some compilers will process p as an integer. And i want to know how to
> determine whether p has a type declarator ?
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130101/de9c58f6/attachment.html>


More information about the cfe-dev mailing list