diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-19 08:11:05 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-19 08:11:05 +0000 |
commit | cfdc81a83467973b14e4ea5e9e9af1690f135415 (patch) | |
tree | 4bd3d011b2bad5d5dd69b054903a68d784dbea92 /test/SemaCXX/access-base-class.cpp | |
parent | 2d48e7811216b2a2d15dcf7e4be8f73ad48cc60a (diff) |
Initialization improvements: addition of string initialization and a few
small bug fixes in SemaInit, switch over SemaDecl to use it more often, and
change a bunch of diagnostics which are different with the new initialization
code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/access-base-class.cpp')
-rw-r--r-- | test/SemaCXX/access-base-class.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/SemaCXX/access-base-class.cpp b/test/SemaCXX/access-base-class.cpp index 6956553f83..f4c58d940b 100644 --- a/test/SemaCXX/access-base-class.cpp +++ b/test/SemaCXX/access-base-class.cpp @@ -5,8 +5,7 @@ class A { }; class B : private A { }; // expected-note {{'private' inheritance specifier here}} void f(B* b) { - A *a = b; // expected-error{{conversion from 'class T1::B' to inaccessible base class 'class T1::A'}} \ - expected-error{{incompatible type initializing 'class T1::B *', expected 'class T1::A *'}} + A *a = b; // expected-error{{conversion from 'class T1::B' to inaccessible base class 'class T1::A'}} } } @@ -17,8 +16,7 @@ class A { }; class B : A { }; // expected-note {{inheritance is implicitly 'private'}} void f(B* b) { - A *a = b; // expected-error {{conversion from 'class T2::B' to inaccessible base class 'class T2::A'}} \ - expected-error {{incompatible type initializing 'class T2::B *', expected 'class T2::A *'}} + A *a = b; // expected-error {{conversion from 'class T2::B' to inaccessible base class 'class T2::A'}} } } @@ -71,8 +69,7 @@ namespace T6 { class C : public B { void f(C *c) { - A* a = c; // expected-error {{conversion from 'class T6::C' to inaccessible base class 'class T6::A'}} \ - expected-error {{incompatible type initializing 'class T6::C *', expected 'class T6::A *'}} + A* a = c; // expected-error {{conversion from 'class T6::C' to inaccessible base class 'class T6::A'}} } }; |