<div dir="ltr">Hi Roger,<div><br></div><div>Thanks for your effort. Your example perfectly made clear the quote from the standard.</div><div><br></div><div>I do realize that information for dependent names is limited due to the two phase lookup which needs to take place in order to get a full picture. But I was puzzled by the fact that we can (partially) extract more information by inspecting the AST. I.e. if we stumble upon a dependent-name node which happens to be a child of call-expression node then it certainly encodes an information that dependent-name node comprises of a function call (or a functor which boils down to the operator() call).</div><div><br></div><div>So, it looks like that some additional information without going to the second phase lookup can be made available. It may be a good candidate for libclang interface extension.</div><div><br></div><div>Cheers,</div><div>Adi </div><div><br></div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote">On 24 January 2017 at 11:08, Roger Ferrer Ibanez <span dir="ltr"><<a href="mailto:Roger.FerrerIbanez@arm.com" target="_blank">Roger.FerrerIbanez@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB">
<div class="gmail-m_-9187714444614117539WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">I’m not an expert in clang internals but I can understand why the information it has at this point is much more limited. Consider the following example<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">--example.cc<u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">template <typename T><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">struct A<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">{<br>
   void foo(int);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">};<br>
<br>
template <typename T><br>
struct A<T*><br>
{<br>
  struct B { void operator()(int); };<br>
  B foo;<br>
};<br>
<br>
template <typename T><br>
void foo()<br>
{<br>
  A<T> a;<br>
  a.foo(3);<br>
}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">template void foo<int>(); // first case<br>
template void foo<int*>(); // second case<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">--end of example.cc<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">That “a.foo(3)” will either be “a.foo(3)” in the first case and “a.foo.operator()(3)”  in the second case. In the first case “foo” is a member function and
 in the second one is a data member.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">Hope this helps.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">Kind regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:calibri,sans-serif;color:rgb(31,73,125)">Roger</span></p><div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0cm 0cm 0cm 4pt"><div><div class="gmail-h5"><div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div></div></div>