[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Templight / templight-deduced-func.cpp
blob779fb5f45228dcc12a18fb5b2f0395bd668e6669
1 // RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s
3 template <class T>
4 int foo(T){return 0;}
6 // CHECK-LABEL: {{^---$}}
7 // CHECK: {{^name:[ ]+foo$}}
8 // CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}}
9 // CHECK: {{^event:[ ]+Begin$}}
10 // CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}}
11 // CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}}
12 // CHECK-LABEL: {{^---$}}
13 // CHECK: {{^name:[ ]+foo$}}
14 // CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}}
15 // CHECK: {{^event:[ ]+End$}}
16 // CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}}
17 // CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}}
19 // CHECK-LABEL: {{^---$}}
20 // CHECK: {{^name:[ ]+'foo<int>'$}}
21 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
22 // CHECK: {{^event:[ ]+Begin$}}
23 // CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}}
24 // CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}}
25 // CHECK-LABEL: {{^---$}}
26 // CHECK: {{^name:[ ]+'foo<int>'$}}
27 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
28 // CHECK: {{^event:[ ]+End$}}
29 // CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}}
30 // CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}}
32 // CHECK-LABEL: {{^---$}}
33 // CHECK: {{^name:[ ]+'foo<int>'$}}
34 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
35 // CHECK: {{^event:[ ]+Begin$}}
36 // CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}}
37 // CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}}
38 // CHECK-LABEL: {{^---$}}
39 // CHECK: {{^name:[ ]+'foo<int>'$}}
40 // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
41 // CHECK: {{^event:[ ]+End$}}
42 // CHECK: {{^orig:[ ]+'.*templight-deduced-func.cpp:4:5'}}
43 // CHECK: {{^poi:[ ]+'.*templight-deduced-func.cpp:44:12'$}}
44 int gvar = foo(0);