diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-22 22:08:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-22 22:08:47 +0000 |
commit | f17b58c98b57537e9abfaaa8b5f19ea7e6de01ee (patch) | |
tree | d1a16675d8b8941a63157390ff83c623faa74d6c /test | |
parent | f50595df931bde89e3acd3ec18e4c7e41aa80852 (diff) |
In the presence of using declarations, we can find the same class
members in class subobjects of different types. So long as the
underlying declaration sets are the same, and the declaration sets
involve non-instance members, this is not an ambiguity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/class.derived/class.member.lookup/p9.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CXX/class.derived/class.member.lookup/p9.cpp b/test/CXX/class.derived/class.member.lookup/p9.cpp new file mode 100644 index 0000000000..ba7bd21f86 --- /dev/null +++ b/test/CXX/class.derived/class.member.lookup/p9.cpp @@ -0,0 +1,28 @@ +// 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}} + } + }; +} |