[all-commits] [llvm/llvm-project] 5b22c5: [clang] Add test for CWG952

Vlad Serebrennikov via All-commits all-commits at lists.llvm.org
Tue Dec 6 01:27:50 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b22c5129c11f5c762c5092d7c52e1ac3d536903
      https://github.com/llvm/llvm-project/commit/5b22c5129c11f5c762c5092d7c52e1ac3d536903
  Author: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M clang/test/CXX/drs/dr9xx.cpp
    M clang/www/cxx_dr_status.html

  Log Message:
  -----------
  [clang] Add test for CWG952

P1787: // [[ https://wg21.link/cwg952 | CWG952 ]] is resolved by refining the definition of “naming class” per Richard’s suggestion in [[ https://lists.isocpp.org/core/2020/09/9963.php | “CWG1621 and [class.static/2”]].//
Wording:
- [class.static]/2 removed;
- [class.access.base]/5 rephrased.

Currently behavior is the following: unqualified names undergo //unqualified name lookup// [1], which perform //unqualified search// in immediate scope [2]. This scope is the scope the definition of //naming class// [3] refers to. `A::I` is not //accessible// when named in classes `C` and `D` per [3]. In particular, the last item regarding base class ([class.access.base]/5.4) is not applicable, because class `A` is not //accessible// in both classes `C` and `D` per [4].

References:
1. [[ https://eel.is/c++draft/basic.lookup#unqual-4.sentence-2 | basic.lookup.unqual/4 ]]
2. [[ https://eel.is/c++draft/basic.lookup#unqual-3 | basic.lookup.unqual/3 ]]
3. [[ https://eel.is/c++draft/class.access#base-5.sentence-4 | class.access.base/5 ]]
4. [[ https://eel.is/c++draft/class.access#base-4 | class.access.base/4 ]]

Reviewed By: #clang-language-wg, erichkeane, aaron.ballman

Differential Revision: https://reviews.llvm.org/D139326




More information about the All-commits mailing list