<p dir="ltr">LGTM</p>
<p dir="ltr">On 4 Aug 2013 00:31, "David Majnemer" <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:<br>
><br>
> Sema::PerformObjectMemberConversion assumed that the Qualifier it was<br>
> given holds a type.  However, the specifier could hold just a namespace.<br>
> In this case, we should ignore the qualifier and not attempt to cast to<br>
> it.<br>
><br>
> <a href="http://llvm-reviews.chandlerc.com/D1283">http://llvm-reviews.chandlerc.com/D1283</a><br>
><br>
> Files:<br>
>   lib/Sema/SemaExpr.cpp<br>
>   test/SemaCXX/PR16709.cpp<br>
><br>
> Index: lib/Sema/SemaExpr.cpp<br>
> ===================================================================<br>
> --- lib/Sema/SemaExpr.cpp<br>
> +++ lib/Sema/SemaExpr.cpp<br>
> @@ -2311,7 +2311,7 @@<br>
>    //     x = 17; // error: ambiguous base subobjects<br>
>    //     Derived1::x = 17; // okay, pick the Base subobject of Derived1<br>
>    //   }<br>
> -  if (Qualifier) {<br>
> +  if (Qualifier && Qualifier->getAsType()) {<br>
>      QualType QType = QualType(Qualifier->getAsType(), 0);<br>
>      assert(!QType.isNull() && "lookup done with dependent qualifier?");</p>
<p dir="ltr">This assert looks trivially impossible now. Remove?</p>
<p dir="ltr">>      assert(QType->isRecordType() && "lookup done with non-record type");<br>
> Index: test/SemaCXX/PR16709.cpp<br>
> ===================================================================<br>
> --- /dev/null<br>
> +++ test/SemaCXX/PR16709.cpp</p>
<p dir="ltr">Please fold this into an existing test file.</p>
<p dir="ltr">> @@ -0,0 +1,13 @@<br>
> +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s<br>
> +<br>
> +namespace Foo {<br>
> +struct Base {<br>
> +  void Bar() {} // expected-note{{'Bar' declared here}}<br>
> +};<br>
> +}<br>
> +<br>
> +struct Derived : public Foo::Base {<br>
> +  void test() {<br>
> +    Foo::Bar(); // expected-error{{no member named 'Bar' in namespace 'Foo'; did you mean simply 'Bar'?}}<br>
> +  }<br>
> +};<br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</p>