1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3struct B0;
4
5class A {
6  friend class B {}; // expected-error {{cannot define a type in a friend declaration}}
7  friend int; // expected-warning {{non-class friend type 'int' is a C++11 extension}}
8  friend B0; // expected-warning {{specify 'struct' to befriend 'B0'}}
9  friend class C; // okay
10};
11