[cfe-dev] Function Rewriting

Makslane Araújo Rodrigues makslane at hotmail.com
Tue Aug 11 07:41:00 PDT 2009


I will, thanks !

> Date: Tue, 11 Aug 2009 16:16:18 +0200
> From: cedric.venet at laposte.net
> To: makslane at hotmail.com
> CC: cfe-dev at cs.uiuc.edu
> Subject: Re: [cfe-dev] Function Rewriting
> 
> 
> >
> > "loc" is the location of the start of the identifier, not the location 
> > of the end of the parameter declaration;  thus when you insert at that 
> > point, it inserts before the variable name.  You want to insert after 
> > the end of the variable declaration;  unfortunately, it looks like 
> > that location just isn't preserved in the AST.  That's definitely 
> > worth filing a bug about.
> 
> I didn't respond earlier because I do not remember exactly the function 
> to use. I do not think this is a bug, but a design decision. it is 
> always only the start which is in the AST (for single token construct at 
> least), to get the end of the token, use a Lex function lextoken or 
> something like this. However, this is just my understanding. you can 
> check how the caret diagnostic are generated, it will show you the good 
> way to do what you want.
> 
> regards,
> 
> Cédric.

_________________________________________________________________
Novo Internet Explorer 8. Baixe agora, é grátis!
http://brasil.microsoft.com.br/IE8/mergulhe/?utm_source=MSN%3BHotmail&utm_medium=Tagline&utm_campaign=IE8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090811/d901bf73/attachment.html>


More information about the cfe-dev mailing list