diff options
Diffstat (limited to 'test/CXX/class.derived/class.member.lookup/p7.cpp')
-rw-r--r-- | test/CXX/class.derived/class.member.lookup/p7.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/CXX/class.derived/class.member.lookup/p7.cpp b/test/CXX/class.derived/class.member.lookup/p7.cpp index a785e0f90e57..775057792c5c 100644 --- a/test/CXX/class.derived/class.member.lookup/p7.cpp +++ b/test/CXX/class.derived/class.member.lookup/p7.cpp @@ -1,11 +1,9 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify %s -Wshadow-field -// expected-no-diagnostics - -struct A { int n; }; -struct B { float n; }; +struct A { int n; }; // expected-note {{declared here}} +struct B { float n; }; // expected-note {{declared here}} struct C : A, B {}; struct D : virtual C {}; -struct E : virtual C { char n; }; +struct E : virtual C { char n; }; // expected-warning {{non-static data member 'n' of 'E' shadows member inherited from type 'A'}} expected-warning {{non-static data member 'n' of 'E' shadows member inherited from type 'B'}} struct F : D, E {} f; char &k = f.n; |