blob: 2d20a4d26978dc16e8f6f5f96e64820c3ee06fbe [file] [log] [blame]
Argyrios Kyrtzidis74d28bd2010-06-29 22:47:00 +00001// Header for PCH test cxx-friends.cpp
2
3class A {
4 int x;
5 friend class F;
6};
Richard Smithe85e1762012-04-22 02:13:50 +00007
8namespace PR12585 {
9 struct future_base {
10 template<typename> class setter;
11 };
12 template<typename> class promise {
13 // We used to inject this into future_base with no access specifier,
14 // then crash during AST writing.
15 template<typename> friend class future_base::setter;
16 int k;
17 };
18}
Richard Smith68ad0e72013-06-26 02:41:25 +000019
20namespace Lazy {
21 struct S {
22 friend void doNotDeserialize();
23 };
24}
25
26// Reduced testcase from libc++'s <valarray>. Used to crash with modules
27// enabled.
28namespace std {
29
30template <class T> struct valarray;
31
32template <class T> struct valarray {
33 valarray();
34 template <class U> friend struct valarray;
35 template <class U> friend U *begin(valarray<U> &v);
36};
37
38struct gslice {
39 valarray<int> size;
40 gslice() {}
41};
42
43}