[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Finding Macro Argument Value
From:       Richard Smith <richard () metafoo ! co ! uk>
Date:       2015-07-31 5:39:07
Message-ID: CAOfiQqmwvVKRFnZOc0oJd5bi0CztjvmHeBCkcLZvT3hrc==_Sw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Jul 30, 2015 at 10:29 PM, Uri Mann <umann@symantec.com> wrote:

> I'm trying to find the value of an argument for function type macro.
> Example:
>
> #define DCLR_INT( x ) int x
> DCLR_INT( I ) = 5;
>
> I have a chained  PPCallbacks class which overrides
> PPCallbacks::MacroExpands(). Enumerating tokens for the MacroInfo class
> representing DCLR_INT allows me to see the token 'x'. How do I find the
> value of 'x' (i.e. 'i')?
>

That should be in the MacroArgs parameter to MacroExpands.


> Thanks in advance.
> -Uri
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 30, 2015 \
at 10:29 PM, Uri Mann <span dir="ltr">&lt;<a href="mailto:umann@symantec.com" \
target="_blank">umann@symantec.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">I&#39;m trying to find the value of an argument for function \
type macro. Example:<br> <br>
#define DCLR_INT( x ) int x<br>
DCLR_INT( I ) = 5;<br>
<br>
I have a chained   PPCallbacks class which overrides PPCallbacks::MacroExpands(). \
Enumerating tokens for the MacroInfo class representing DCLR_INT allows me to see the \
token &#39;x&#39;. How do I find the value of &#39;x&#39; (i.e. \
&#39;i&#39;)?<br></blockquote><div><br></div><div>That should be in the MacroArgs \
parameter to MacroExpands.</div><div>  </div><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Thanks in \
                advance.<br>
-Uri<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" \
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br> \
</blockquote></div><br></div></div>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic