<div dir="ltr"><div>FYI, I submitted such issue some time ago:<br></div><a href="http://llvm.org/bugs/show_bug.cgi?id=14100">http://llvm.org/bugs/show_bug.cgi?id=14100</a><div><br><div style>It has been rejected as invalid at that time.</div>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">Tomek<br><br><div class="gmail_quote">On Tue, Jul 16, 2013 at 9:14 PM, Mehdi AMINI <span dir="ltr"><<a href="mailto:mehdi.amini@silkan.com" target="_blank">mehdi.amini@silkan.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I tried to understand the PR15243 and I read the core issue 1310* but the examples given in both the ticket and the description with resolution 1310 focus on the lookup of a class constructor and not a member function, like the example given by Jonathan. How is it applicable here, it seems to me that there is no ambiguity about the fact that "Foo" cannot be the constructor in "Foo::Foo::bar"?<br>

<br>
Thanks,<br>
<br>
Mehdi<br>
<br>
*<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html" target="_blank">http://www.open-std.org/jtc1/<u></u>sc22/wg21/docs/cwg_defects.<u></u>html</a><br>
<br>
On 7/16/13 11:39 AM, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That's a bug: <a href="http://llvm.org/PR15243" target="_blank">llvm.org/PR15243</a> <<a href="http://llvm.org/PR15243" target="_blank">http://llvm.org/PR15243</a>><div class="im"><br>
<br>
The standard wording used to be ambiguous here, the resolution chosen by<br>
the committee didn't match clang's interpretation of the ambiguity, and<br>
no-one has gotten around to fixing it yet. Patches would be welcome ;-)<br>
<br>
On Tue, Jul 16, 2013 at 6:35 AM, Jonathan Sauer <<a href="mailto:jonathan.sauer@gmx.de" target="_blank">jonathan.sauer@gmx.de</a><br></div><div><div class="h5">
<mailto:<a href="mailto:jonathan.sauer@gmx.de" target="_blank">jonathan.sauer@gmx.de</a>><u></u>> wrote:<br>
<br>
    Hello,<br>
<br>
    the following program compiles with clang r186311, and I'm not sure<br>
    if this is a bug<br>
    or correct behavior:<br>
<br>
    struct Foo {<br>
         void bar();<br>
    };<br>
<br>
<br>
    void Foo::Foo::Foo::Foo::Foo::Foo::<u></u>bar()<br>
    {<br>
    }<br>
<br>
<br>
    According to §3.3.7p1 bullet 5 (basic.scope.class), the potential<br>
    scope of a class<br>
    includes "the regions defined by its member definitions [...]<br>
    including the member<br>
    function body and any portion of the declarator part of such<br>
    definitions which follows<br>
    the declarator-id", and §3.4.3.1p1 (class.qual) states that "A class<br>
    member can be<br>
    referred to using a qualified-id at any point in its potential<br>
    scope" while "the name<br>
    [specified after the nested-name-specifier] shall represent one or<br>
    more members of<br>
    that class or of one of its base classes."<br>
<br>
    However in the code above the member function "bar" is referred to<br>
    using a qualified-id<br>
    in its declarator-id, which is not part of the class' potential<br>
    scope, and "Foo" isn't<br>
    a base class of itself, so this shouldn't be allowed.<br>
<br>
    Still, I'm not sure if I got all the subtleties of C++'s name lookup<br>
    rules right, so<br>
    I'd like to make sure if this is a bug in clang or merely the<br>
    somewhat amusing result<br>
    of the way names in C++ can be specified.<br>
<br>
<br>
    With many thanks in advance,<br>
    Jonathan<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    cfe-dev mailing list<br></div></div>
    <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a> <mailto:<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>><br>
    <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><div class="im"><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>