[cfe-dev] getLocation() for a friend type declaration

Manuel Klimek klimek at google.com
Fri Apr 4 10:50:38 PDT 2014


On Thu, Apr 3, 2014 at 11:41 AM, Дмитрий Борисенков
<stackoverflow at xakep.ru>wrote:

> Hello,
>
> I'm trying to get a source location for a type name identifier in
> FriendDecl, but getLocation() method returns source location of keyword
> 'friend'. Such behavior confused me a bit, because usually getLocation()
> returns an identifier location. I've released I can get location which I
> need through DeclSpec::getTypeSpecTypeNameLoc(). But could you explain me
> why getLocation() behavior differs from expected one (at least expected by
> me) in this case?
>

>From the code this shouldn't be the case. Unless you're calling
getFriendLoc() instead of getLocation().

Cheers,
/Manuel


>
>
> --
> Kind regards, Dmitry Borisenkov
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140404/f187d0d7/attachment.html>


More information about the cfe-dev mailing list