[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CXX / class.access / class.friend / p2-cxx03.cpp
blob88b2ea3a9b73216eb9479963c8ae6715f573d006
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
4 template<typename T>
5 class X0 {
6 friend T;
7 #if __cplusplus <= 199711L // C++03 or earlier modes
8 // expected-warning@-2{{non-class friend type 'T' is a C++11 extension}}
9 #else
10 // expected-no-diagnostics
11 #endif
14 class X1 { };
15 enum E1 { };
16 X0<X1> x0a;
17 X0<X1 *> x0b;
18 X0<int> x0c;
19 X0<E1> x0d;