xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/rdar10830559.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // Test this without pch.
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -emit-llvm-only %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // Test with pch.
5*f4a2713aSLionel Sambuc // RUN: touch %t.empty.cpp
6*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-pch -o %t %s
7*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -include-pch %t -emit-llvm-only %t.empty.cpp
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc // rdar://10830559
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc //#pragma ms_struct on
12*f4a2713aSLionel Sambuc 
13*f4a2713aSLionel Sambuc template< typename T >
14*f4a2713aSLionel Sambuc class Templated
15*f4a2713aSLionel Sambuc {
16*f4a2713aSLionel Sambuc public:
17*f4a2713aSLionel Sambuc    struct s;
18*f4a2713aSLionel Sambuc };
19*f4a2713aSLionel Sambuc 
20*f4a2713aSLionel Sambuc 
21*f4a2713aSLionel Sambuc class Foo
22*f4a2713aSLionel Sambuc {
23*f4a2713aSLionel Sambuc private:
24*f4a2713aSLionel Sambuc 
25*f4a2713aSLionel Sambuc    class Bar
26*f4a2713aSLionel Sambuc    {
27*f4a2713aSLionel Sambuc    private:
28*f4a2713aSLionel Sambuc       class BarTypes { public: virtual void Func(); };
29*f4a2713aSLionel Sambuc       class BarImpl {};
30*f4a2713aSLionel Sambuc       friend class Foo;
31*f4a2713aSLionel Sambuc    };
32*f4a2713aSLionel Sambuc 
33*f4a2713aSLionel Sambuc 
34*f4a2713aSLionel Sambuc    friend class Templated< Bar::BarImpl >::s;
35*f4a2713aSLionel Sambuc };
36