r209511 - PR19352 - getLocation() points to the wrong position for FriendDecls

Nikola Smiljanic popizdeh at gmail.com
Fri Aug 29 18:02:28 PDT 2014


>
> > This seems wrong to me.
> >
> > Did you mean to write getLocEnd() instead? (Under the assumption that
> > identifier should comes last in class type)
>

This was done so that 'friend struct A' and 'friend A' (C++11) have
different location since former is also a forward declaration. Does that
make sense or have I misunderstood your question?

It is useful to know that currently for:
>
> template <class U> class C {
>   template<class T> friend struct A<T>::B;
> };
>

Not really sure what A is supposed to be here but this code is
ill-formed: explicit specialization of non-template struct 'A'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140830/0cc470d5/attachment.html>


More information about the cfe-commits mailing list