xref: /llvm-project/clang/test/Templight/templight-memoization.cpp (revision 207e7b1fa179c359182c25f76dfc18bb757166e5)
1*207e7b1fSGabor Horvath // RUN: %clang_cc1 -templight-dump %s 2>&1 | FileCheck %s
2*207e7b1fSGabor Horvath 
3*207e7b1fSGabor Horvath template <class T>
4*207e7b1fSGabor Horvath struct foo {};
5*207e7b1fSGabor Horvath 
6*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
7*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}}
8*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
9*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}}
10*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}}
11*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:18:10'$}}
12*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
13*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}}
14*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+TemplateInstantiation$}}
15*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}}
16*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}}
17*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:18:10'$}}
18*207e7b1fSGabor Horvath foo<int> x;
19*207e7b1fSGabor Horvath 
20*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
21*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
22*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
23*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
24*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
25*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
26*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
27*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
28*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
29*207e7b1fSGabor Horvath 
30*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}}
31*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+Memoization$}}
32*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}}
33*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}}
34*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:41:10'$}}
35*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}}
36*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}}
37*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+Memoization$}}
38*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}}
39*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-memoization.cpp:4:8'}}
40*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-memoization.cpp:41:10'$}}
41*207e7b1fSGabor Horvath foo<int> y;
42*207e7b1fSGabor Horvath 
43