Endill created this revision. Endill added a reviewer: clang-language-wg. Herald added a project: All. Endill requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
P1787 <https://reviews.llvm.org/P1787>: "CWG1960 (currently closed as NAD) is resolved by removing the rule in question (which is widely ignored by implementations and gives subtle interactions between using-declarations)." Wording: "In a using-declarator that does not name a constructor, every declaration named shall be accessible." Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D142381 Files: clang/test/CXX/drs/dr19xx.cpp clang/www/cxx_dr_status.html Index: clang/www/cxx_dr_status.html =================================================================== --- clang/www/cxx_dr_status.html +++ clang/www/cxx_dr_status.html @@ -11567,7 +11567,7 @@ <td><a href="https://wg21.link/cwg1960">1960</a></td> <td>NAD</td> <td>Visibility of entity named in class-scope <I>using-declaration</I></td> - <td class="none" align="center">Unknown</td> + <td class="none" align="center">No</td> </tr> <tr id="1961"> <td><a href="https://wg21.link/cwg1961">1961</a></td> Index: clang/test/CXX/drs/dr19xx.cpp =================================================================== --- clang/test/CXX/drs/dr19xx.cpp +++ clang/test/CXX/drs/dr19xx.cpp @@ -167,6 +167,27 @@ #endif } +namespace dr1960 { // dr1960: no +struct A { +void f() {} +protected: +void g() {} +}; + +struct B: A { +private: +using A::f; +using A::g; +}; + +struct C : B { +// FIXME: both declarations are ill-formed, because A::f and A::g +// are not accessible. +using A::f; +using A::g; +}; +} + namespace dr1966 { // dr1966: 11 #if __cplusplus >= 201103L struct A {
Index: clang/www/cxx_dr_status.html =================================================================== --- clang/www/cxx_dr_status.html +++ clang/www/cxx_dr_status.html @@ -11567,7 +11567,7 @@ <td><a href="https://wg21.link/cwg1960">1960</a></td> <td>NAD</td> <td>Visibility of entity named in class-scope <I>using-declaration</I></td> - <td class="none" align="center">Unknown</td> + <td class="none" align="center">No</td> </tr> <tr id="1961"> <td><a href="https://wg21.link/cwg1961">1961</a></td> Index: clang/test/CXX/drs/dr19xx.cpp =================================================================== --- clang/test/CXX/drs/dr19xx.cpp +++ clang/test/CXX/drs/dr19xx.cpp @@ -167,6 +167,27 @@ #endif } +namespace dr1960 { // dr1960: no +struct A { +void f() {} +protected: +void g() {} +}; + +struct B: A { +private: +using A::f; +using A::g; +}; + +struct C : B { +// FIXME: both declarations are ill-formed, because A::f and A::g +// are not accessible. +using A::f; +using A::g; +}; +} + namespace dr1966 { // dr1966: 11 #if __cplusplus >= 201103L struct A {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits