[clang] [Clang][Sema] Reject invalid member using-declaration whose nested-name-specifier doesn't refer to a base class of the current class in C++98 mode (PR #143492)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 09:05:25 PDT 2025
================
@@ -36,6 +36,13 @@ namespace cwg400 { // cwg400: 2.7
// expected-error at -1 {{member 'a' found in multiple base classes of different types}}
// expected-note@#cwg400-A {{member type 'cwg400::A::a' found by ambiguous name lookup}}
// expected-note@#cwg400-B {{member type 'cwg400::B::a' found by ambiguous name lookup}}
+ struct F : A {};
+ struct G : A {
+ using G::A;
----------------
Endilll wrote:
```suggestion
using G::a;
```
Did you mean lowercase `a`?
https://github.com/llvm/llvm-project/pull/143492
More information about the cfe-commits
mailing list