Anders Carlsson | 9ca97ba | 2009-06-24 02:00:28 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s -faccess-control |
2 | |||||
3 | struct A { }; | ||||
4 | |||||
5 | void f() { | ||||
6 | struct B : private A {}; // expected-note{{'private' inheritance specifier here}} | ||||
7 | |||||
8 | B b; | ||||
9 | |||||
10 | A *a = &b; // expected-error{{conversion from 'struct B' to inaccessible base class 'struct A'}} \ | ||||
11 | expected-error{{incompatible type initializing 'struct B *', expected 'struct A *'}} | ||||
12 | } |