[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
Loading
Please sign in to comment