[PATCH] Location and Range unittests for FriendDecl

Nikola Smiljanic popizdeh at gmail.com
Tue Jun 24 16:40:49 PDT 2014


On Wed, Jun 25, 2014 at 2:04 AM, Richard Smith <richard at metafoo.co.uk>
wrote:

>
> This is a C++11 feature:
>
> struct A;
> struct B {
>   friend A; // note, not 'friend struct A;'
> };
>

You're right, not sure how I missed this as I have a test for this case.


> Should be:
>
> template<typename> struct C {};
> struct D {
>   template<> friend struct C<int>;
> };
>
> (That's ill-formed, but our error recovery path treats it as if it didn't
> have the 'template<>'.) If that doesn't hit that codepath, I think it may
> be unreachable.
>

Nope, that one is handled in ActOnClassTemplateSpecialization. I think that
this code is unreachable...

I still need you to OK my changes before I commit them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140625/9cc79a1f/attachment.html>


More information about the cfe-commits mailing list