<div dir="ltr">On Sat, Oct 19, 2013 at 10:04 PM, Rambo <span dir="ltr"><<a href="mailto:hunanlwm@sina.cn" target="_blank">hunanlwm@sina.cn</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
There is a sample program as follows:<br>
#include<stdio.h><br>
#define *(1)*uchar char<br>
void retrans(int *p,*(2)*uchar *q)<br>
{<br>
<br>
}<br>
int main()<br>
{<br>
int a=1;<br>
char b='c';<br>
retrans(&a,&b);<br>
return 0;<br>
}<br>
Now,I want to get the location about (2) with followed codes and I get<br>
location of (1) actually.<br>
for (FunctionDecl::param_iterator b = f->param_begin(), e = f->param_end();<br>
b != e; ++b)<br>
if(ParmVarDecl *Body3=dyn_cast<ParmVarDecl>(*b))<br>
SourceLocation begin=Body3->getLocStart();<br>
How I obtain the location (2)£¿thank you very much!<br>
<br><br></blockquote><div> </div><div>Try SourceManager::getExpansionLoc </div></div><br></div><div class="gmail_extra">-Eli<br></div></div>