<div dir="ltr">Nudge nudge :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 29, 2014 at 5:35 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">+richard<div><br></div><div>This makes sense to me, but I don't understand the code well enough to approve... Looping in Richard for an expert opinion ;)</div>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Apr 29, 2014 at 5:13 AM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">Ping.<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 8:38 PM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">LocStart in CheckFriendTypeDecl is the start of DeclSpec range. This is OK for checking that declaration starts with 'friend' keyword but is redundant when it comes to FriendDecl creation. Location of the keyword is already passed as FriendLoc.<div>






<br></div><div>I've added another parameter to this function that points to location of the type from the declaration. The call to CheckFriendTypeDecl from SemaTemplateInstantiateDecl now isn't technically correct because it's passing the the type location as LocStart. But the error that's checked for using this parameter can only happen inside class declaration, not instantiated template, I think :)</div>






<div><br></div><div>Is there a way to test this? I'm not seeing any regressions.</div><div><br></div><div>struct A{};</div><div>typedef A Atypedef;</div><div><br></div><div>namespace ns { struct B{}; }</div><div><br>





</div>
<div>template <typename T></div><div>class C</div><div>{</div><div>friend class A; // points to A</div><div>friend Atypedef; // points to Atypedef</div><div>friend T; //  points to T</div><div>friend decltype(whatever); // points to decltype</div>






<div>friend ns::B; // points to B</div><div>friend typename T::something; // points to something</div><div>}</div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>