[cfe-dev] libtooling: source location vs nested macros

Miklos Vajna vmiklos at vmiklos.hu
Fri May 8 01:02:30 PDT 2015


Hi Manuel,

On Fri, May 08, 2015 at 07:58:40AM +0000, Manuel Klimek <klimek at google.com> wrote:
> > If you replace the call to OUTER() to INNER() in test.cxx, then the
> > rename is performed correctly. I guess it's something around how I call
> > the source manager's getImmediateSpellingLoc(), but I'm not sure what's
> 
> I think the immediate spelling location is only one level - have you tried
> just using the spelling location instead?

Ah, indeed -- using getSpellingLoc() instead of
getImmediateSpellingLoc() gives the correct location for nested macros,
too.

Thanks!

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150508/e70996ac/attachment.sig>


More information about the cfe-dev mailing list