Author: Vlad Serebrennikov Date: 2023-04-07T18:40:35+04:00 New Revision: 4b03869402558d6aa24ce08766825eef34d6aff6
URL: https://github.com/llvm/llvm-project/commit/4b03869402558d6aa24ce08766825eef34d6aff6 DIFF: https://github.com/llvm/llvm-project/commit/4b03869402558d6aa24ce08766825eef34d6aff6.diff LOG: [clang] Add test for CWG607 [[https://wg21.link/p1787 | P1787]]: CWG607 is resolved by looking up unqualified names in a mem-initializer-id from outside the parameter scope. Wording: Lookup for an unqualified name in a mem-initializer-id ignores the constructor’s function parameter scope. ([class.base.init]/2) Reviewed By: #clang-language-wg, shafik Differential Revision: https://reviews.llvm.org/D147590 Added: Modified: clang/test/CXX/drs/dr6xx.cpp clang/www/cxx_dr_status.html Removed: ################################################################################ diff --git a/clang/test/CXX/drs/dr6xx.cpp b/clang/test/CXX/drs/dr6xx.cpp index f9925e22085b..b74e466c62ee 100644 --- a/clang/test/CXX/drs/dr6xx.cpp +++ b/clang/test/CXX/drs/dr6xx.cpp @@ -100,6 +100,34 @@ namespace dr606 { // dr606: yes #endif } +namespace dr607 { // dr607: yes +namespace example1 { +struct Y {}; + +template <typename T> struct X : public virtual Y {}; + +template <typename T> class A : public X<T> { + template <typename S> A(S) : S() {} +}; + +template A<int>::A(Y); +} // namespace example1 + +namespace example2 { +namespace N { +struct B { + B(int); +}; +typedef B typedef_B; +struct D : B { + D(); +}; +} // namespace N + +N::D::D() : typedef_B(0) {} +} // namespace example2 +} // namespace dr607 + namespace dr608 { // dr608: yes struct A { virtual void f(); }; struct B : A {}; diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 7cbb729adb9c..7498753836d6 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -3683,7 +3683,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://wg21.link/cwg607">607</a></td> <td>CD6</td> <td>Lookup of <I>mem-initializer-id</I>s</td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="608"> <td><a href="https://wg21.link/cwg608">608</a></td> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits