Endill updated this revision to Diff 479818. Endill added a comment. Add a comment per @shafik request
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139173/new/ https://reviews.llvm.org/D139173 Files: clang/test/CXX/drs/dr6xx.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 @@ -3642,7 +3642,7 @@ <td><a href="https://wg21.link/cwg600">600</a></td> <td>CD6</td> <td>Does access control apply to members or to names?</td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="601"> <td><a href="https://wg21.link/cwg601">601</a></td> Index: clang/test/CXX/drs/dr6xx.cpp =================================================================== --- clang/test/CXX/drs/dr6xx.cpp +++ clang/test/CXX/drs/dr6xx.cpp @@ -3,6 +3,22 @@ // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking // RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking // RUN: %clang_cc1 -std=c++20 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking +// RUN: %clang_cc1 -std=c++2b %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking + +namespace dr600 { // dr600: yes +struct S { + void f(int); + +private: + void f(double); // expected-note {{declared private here}} +}; + +void g(S *sp) { + sp->f(2); + // access control is applied after overload resolution + sp->f(2.2); // expected-error {{is a private member}} +} +} // namespace dr600 namespace std { struct type_info {};
Index: clang/www/cxx_dr_status.html =================================================================== --- clang/www/cxx_dr_status.html +++ clang/www/cxx_dr_status.html @@ -3642,7 +3642,7 @@ <td><a href="https://wg21.link/cwg600">600</a></td> <td>CD6</td> <td>Does access control apply to members or to names?</td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="601"> <td><a href="https://wg21.link/cwg601">601</a></td> Index: clang/test/CXX/drs/dr6xx.cpp =================================================================== --- clang/test/CXX/drs/dr6xx.cpp +++ clang/test/CXX/drs/dr6xx.cpp @@ -3,6 +3,22 @@ // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking // RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking // RUN: %clang_cc1 -std=c++20 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking +// RUN: %clang_cc1 -std=c++2b %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -fno-spell-checking + +namespace dr600 { // dr600: yes +struct S { + void f(int); + +private: + void f(double); // expected-note {{declared private here}} +}; + +void g(S *sp) { + sp->f(2); + // access control is applied after overload resolution + sp->f(2.2); // expected-error {{is a private member}} +} +} // namespace dr600 namespace std { struct type_info {};
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits