[all-commits] [llvm/llvm-project] 7a3e55: [Clang][Sema] Require `BaseClass::` (not other cla...

Yanzuo Liu via All-commits all-commits at lists.llvm.org
Mon Jun 30 04:01:13 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a3e555353c5a5efd3978f731e7f98fbf75f53d7
      https://github.com/llvm/llvm-project/commit/7a3e555353c5a5efd3978f731e7f98fbf75f53d7
  Author: Yanzuo Liu <zwuis at outlook.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/CXX/class.access/class.access.dcl/p1.cpp
    M clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p3.cpp
    M clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp
    M clang/test/CXX/drs/cwg4xx.cpp

  Log Message:
  -----------
  [Clang][Sema] Require `BaseClass::` (not other classes) in member using-declaration in C++98 mode (#143492)

[CWG400](https://wg21.link/cwg400) rejects member using-declaration
whose nested-name-specifier doesn't refer to a base class of the current
class.

```cpp
struct A {};
struct B {
  using B::A; // error
};
```

Clang didn't reject this case in C++98 mode. This patch fixes this
issue.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list