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