llvm-for-llvmta/tools/clang/test/CXX/class.derived/class.member.lookup/p9.cpp

29 lines
613 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
namespace rdar8436162 {
class ClsA {
public:
static void f();
void g();
};
class ClsB : virtual private ClsA {
public:
using ClsA::f;
using ClsA::g; // expected-note{{member found by ambiguous name lookup}}
};
class ClsF : virtual private ClsA {
public:
using ClsA::f;
using ClsA::g; // expected-note{{member found by ambiguous name lookup}}
};
class ClsE : public ClsB, public ClsF {
void test() {
f();
g(); // expected-error{{member 'g' found in multiple base classes of different types}}
}
};
}