[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Templight / templight-nested-template-instantiation.cpp
bloba064c16d59181c510c7acfdd512852b96455577d
1 // RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s
3 template <int N>
4 struct foo : foo<N - 1> {};
6 template <>
7 struct foo<0> {};
9 // CHECK-LABEL: {{^---$}}
10 // CHECK: {{^name:[ ]+'foo<2>'$}}
11 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
12 // CHECK: {{^event:[ ]+Begin$}}
13 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
14 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}}
15 // CHECK-LABEL: {{^---$}}
16 // CHECK: {{^name:[ ]+'foo<2>'$}}
17 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
18 // CHECK: {{^event:[ ]+End$}}
19 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
20 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}}
21 // CHECK-LABEL: {{^---$}}
22 // CHECK: {{^name:[ ]+'foo<2>'$}}
23 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
24 // CHECK: {{^event:[ ]+Begin$}}
25 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
26 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}}
28 // CHECK-LABEL: {{^---$}}
29 // CHECK: {{^name:[ ]+'foo<1>'$}}
30 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
31 // CHECK: {{^event:[ ]+Begin$}}
32 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
33 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
34 // CHECK-LABEL: {{^---$}}
35 // CHECK: {{^name:[ ]+'foo<1>'$}}
36 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
37 // CHECK: {{^event:[ ]+End$}}
38 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
39 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
40 // CHECK-LABEL: {{^---$}}
41 // CHECK: {{^name:[ ]+'foo<1>'$}}
42 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
43 // CHECK: {{^event:[ ]+Begin$}}
44 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
45 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
47 // CHECK-LABEL: {{^---$}}
48 // CHECK: {{^name:[ ]+'foo<0>'$}}
49 // CHECK: {{^kind:[ ]+Memoization$}}
50 // CHECK: {{^event:[ ]+Begin$}}
51 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:7:8'}}
52 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
53 // CHECK-LABEL: {{^---$}}
54 // CHECK: {{^name:[ ]+'foo<0>'$}}
55 // CHECK: {{^kind:[ ]+Memoization$}}
56 // CHECK: {{^event:[ ]+End$}}
57 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:7:8'}}
58 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
60 // CHECK-LABEL: {{^---$}}
61 // CHECK: {{^name:[ ]+'foo<1>'$}}
62 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
63 // CHECK: {{^event:[ ]+End$}}
64 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
65 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
66 // CHECK-LABEL: {{^---$}}
67 // CHECK: {{^name:[ ]+'foo<1>'$}}
68 // CHECK: {{^kind:[ ]+Memoization$}}
69 // CHECK: {{^event:[ ]+Begin$}}
70 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
71 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
72 // CHECK-LABEL: {{^---$}}
73 // CHECK: {{^name:[ ]+'foo<1>'$}}
74 // CHECK: {{^kind:[ ]+Memoization$}}
75 // CHECK: {{^event:[ ]+End$}}
76 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
77 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:4:14'$}}
78 // CHECK-LABEL: {{^---$}}
79 // CHECK: {{^name:[ ]+'foo<2>'$}}
80 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
81 // CHECK: {{^event:[ ]+End$}}
82 // CHECK: {{^orig:[ ]+'.*templight-nested-template-instantiation.cpp:4:8'}}
83 // CHECK: {{^poi:[ ]+'.*templight-nested-template-instantiation.cpp:84:8'$}}
84 foo<2> x;