[cfe-dev] function-like-macro expansion info

Xing GUO via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 13 02:31:56 PDT 2018


Hi
I am new to this community and start to play with clang... I have a little
when tracing arguments of function-like macro... Is there any way to get
the position of expanded arguments? For example

"""
#define test(a, b) ((void)(a + b))

int x, y;

test(x, y);

"""

I know there is a function isMacroArgExpansion() to test if the expr is
expanded from macro arguments. I want to know if there is something like
getIndexOfMacroArgExpansion() to get the argument position of expr.
For example, x is expanded from 0th argument and y is expected from 1st
argument

Regards
Xing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180613/a136f6e5/attachment.html>


More information about the cfe-dev mailing list