aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/class.derived/class.member.lookup/p6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/class.derived/class.member.lookup/p6.cpp')
-rw-r--r--test/CXX/class.derived/class.member.lookup/p6.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/CXX/class.derived/class.member.lookup/p6.cpp b/test/CXX/class.derived/class.member.lookup/p6.cpp
index 72398819263f..0a400a2405e9 100644
--- a/test/CXX/class.derived/class.member.lookup/p6.cpp
+++ b/test/CXX/class.derived/class.member.lookup/p6.cpp
@@ -1,24 +1,24 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -Wshadow-field
class V {
public:
int f();
- int x;
+ int x; // expected-note {{declared here}}
};
class W {
public:
int g(); // expected-note{{member found by ambiguous name lookup}}
- int y; // expected-note{{member found by ambiguous name lookup}}
+ int y; // expected-note{{member found by ambiguous name lookup}} expected-note {{declared here}}
};
class B : public virtual V, public W
{
public:
int f();
- int x;
+ int x; // expected-warning {{non-static data member 'x' of 'B' shadows member inherited from type 'V'}}
int g(); // expected-note{{member found by ambiguous name lookup}}
- int y; // expected-note{{member found by ambiguous name lookup}}
+ int y; // expected-note{{member found by ambiguous name lookup}} expected-warning {{non-static data member 'y' of 'B' shadows member inherited from type 'W'}}
};
class C : public virtual V, public W { };