llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang <details> <summary>Changes</summary> https://cplusplus.github.io/CWG/issues/472.html It has drafting status, but I think CWG has reached consesus on the behavior. --- Full diff: https://github.com/llvm/llvm-project/pull/67948.diff 2 Files Affected: - (modified) clang/test/CXX/drs/dr4xx.cpp (+17) - (modified) clang/www/cxx_dr_status.html (+1-1) ``````````diff diff --git a/clang/test/CXX/drs/dr4xx.cpp b/clang/test/CXX/drs/dr4xx.cpp index d8bdf49d0b2dde7..cc12e9f158061f8 100644 --- a/clang/test/CXX/drs/dr4xx.cpp +++ b/clang/test/CXX/drs/dr4xx.cpp @@ -924,6 +924,23 @@ namespace dr471 { // dr471: yes struct H : B, G { int f() { return n; } }; // expected-error {{private}} } +namespace dr472 { // dr472: no drafting +struct B { + int i; // #dr472-i-decl +}; +struct I : protected B {}; // #dr472-inheritance +struct D : public I { + void f(I *ip) { + ip->i = 0; + // expected-error@-1 {{'i' is a protected member of 'dr472::B'}} + // expected-note@#dr472-inheritance {{constrained by protected inheritance here}} + // expected-note@#dr472-i-decl {{member is declared here}} + B *bp = ip; + bp->i = 5; + } +}; +} + namespace dr474 { // dr474: yes namespace N { struct S { diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index ee9712e9bab9949..b02f7ccfd371411 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -2871,7 +2871,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://cplusplus.github.io/CWG/issues/472.html">472</a></td> <td>drafting</td> <td>Casting across protected inheritance</td> - <td align="center">Not resolved</td> + <td class="none" align="center">No</td> </tr> <tr id="473"> <td><a href="https://cplusplus.github.io/CWG/issues/473.html">473</a></td> `````````` </details> https://github.com/llvm/llvm-project/pull/67948 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits