2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-08-06 10:15:43 +08:00
|
|
|
|
2009-09-26 14:47:28 +08:00
|
|
|
struct B0;
|
|
|
|
|
2009-08-06 10:15:43 +08:00
|
|
|
class A {
|
|
|
|
friend class B {}; // expected-error {{cannot define a type in a friend declaration}}
|
2011-10-13 03:26:40 +08:00
|
|
|
friend int; // expected-warning {{non-class friend type 'int' is a C++11 extension}}
|
2011-05-11 05:23:31 +08:00
|
|
|
friend B0; // expected-warning {{specify 'struct' to befriend 'B0'}}
|
2009-08-06 10:15:43 +08:00
|
|
|
friend class C; // okay
|
|
|
|
};
|