[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] How to differenciate a calltoafunctionfromareferencingits address?
|
> The problem here is that there is no way to get macro
> expansion for nested macro name: 'nested' array contains only
> ASTMacroReferenceName which seem cannot be mapped into macro
> expansion.
All the nested macro-references belong to the one explicit macro
expansion, the ast does not track any other relationships among
the nested macros.
> Moreover, AST unit seem do not contain macro expansion for X,
> there is only MY_FUNC macro expansion.
Expansion of X is nested in expansion of MY_FUNC (it is expanded
or not, depending of the definition of MY_FUNC, it may be used
both in the expanded and the non-expanded version, also)
> I was just trying to find a solution for my problem. Is it
> possible somehow to figure out the macro expansion location
> for nested macro reference? I did yet not find any way.
In the simplified model CDT uses, a nested macro reference does
not have a location within the expansion, however as stated before
you do have image-locations for those. So you do know that 'X' has
been passed as part of a parameter to the explicit macro expansion of
'MY_FUNC'.
> It looks the best way is to parse the raw signature manually...
I would think you should use your computer to do that, :-) and it
may be the right approach for you.
Markus.