diff --git a/clang/test/CXX/drs/cwg11xx.cpp b/clang/test/CXX/drs/cwg11xx.cpp index 8d187041400a6..d33ff060d2d39 100644 --- a/clang/test/CXX/drs/cwg11xx.cpp +++ b/clang/test/CXX/drs/cwg11xx.cpp @@ -19,7 +19,7 @@ decltype(return_T>())* b; #endif } // namespace cwg1110 -namespace cwg1111 { // cwg1111: 3.2 +namespace cwg1111 { // cwg1111: partial namespace example1 { template struct set; // #cwg1111-struct-set @@ -57,6 +57,48 @@ void baz() { a.operator A(); } } // namespace example2 + +namespace example3 { +struct A { + operator int(); +} a; +void foo() { + typedef int T; + a.operator T(); // T is found using unqualified lookup + // after qualified lookup in A fails. +} +} // namespace example3 + +namespace example4 { +struct A { + typedef int T; // #cwg1111-A-T + operator T(); +}; +struct B : A { + operator T(); +} b; +void foo() { + b.A::operator T(); // FIXME: qualified lookup should find T in A. + // expected-error@-1 {{unknown type name 'T'}} + // expected-note@#cwg1111-A-T {{'A::T' declared here}} +} +} // namespace example4 + +namespace example5 { +template struct A { + operator T1(); +}; +template struct B : A { + operator T2(); + void foo() { + // In both cases, during instantiation, qualified lookup for T2 wouldn't be able + // to find anything, so T2 has to be found by unqualified lookup. + // After that, 'operator T2()' is found in A by qualfied lookup. + T2 a = A::operator T2(); + T2 b = ((A *)this)->operator T2(); + } +}; +} // namespace example5 } // namespace cwg1111 namespace cwg1113 { // cwg1113: partial diff --git a/clang/test/CXX/drs/cwg1xx.cpp b/clang/test/CXX/drs/cwg1xx.cpp index 6aec8b65c91f1..6a26857bb8028 100644 --- a/clang/test/CXX/drs/cwg1xx.cpp +++ b/clang/test/CXX/drs/cwg1xx.cpp @@ -922,6 +922,7 @@ namespace cwg155 { // cwg155: dup 632 // expected-warning@-1 {{braces around scalar initializer}} } +// cwg156: sup 1111 // cwg158 is in cwg158.cpp namespace cwg159 { // cwg159: 3.5 diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index c069e155fd547..e00f5a09fc220 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -981,7 +981,7 @@

C++ defect report implementation status

156 NAD Name lookup for conversion functions - Unknown + Superseded by 1111 157 @@ -6485,7 +6485,7 @@

C++ defect report implementation status

1111 C++11 Remove dual-scope lookup of member template names - Clang 3.2 + Partial 1112