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