[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / rdar10830559.cpp
blob8a5571a6d6fb456759ca12db7e5a99f4ceb1f1e2
1 // Test this without pch.
2 // RUN: %clang_cc1 -emit-llvm-only %s
4 // Test with pch.
5 // RUN: touch %t.empty.cpp
6 // RUN: %clang_cc1 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -include-pch %t -emit-llvm-only %t.empty.cpp
9 // RUN: %clang_cc1 -emit-pch -fpch-instantiate-templates -o %t %s
10 // RUN: %clang_cc1 -include-pch %t -emit-llvm-only %t.empty.cpp
12 //#pragma ms_struct on
14 template< typename T >
15 class Templated
17 public:
18 struct s;
22 class Foo
24 private:
26 class Bar
28 private:
29 class BarTypes { public: virtual void Func(); };
30 class BarImpl {};
31 friend class Foo;
35 friend class Templated< Bar::BarImpl >::s;