1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
8 friend class B
{}; // expected-error {{cannot define a type in a friend declaration}}
10 #if __cplusplus <= 199711L
11 // expected-warning@-2 {{non-class friend type 'int' is a C++11 extension}}
14 #if __cplusplus <= 199711L
15 // expected-warning@-2 {{unelaborated friend declaration is a C++11 extension; specify 'struct' to befriend 'B0'}}
17 friend class C
; // okay