1*207e7b1fSGabor Horvath // RUN: %clang_cc1 -std=c++14 -templight-dump %s 2>&1 | FileCheck %s 2*207e7b1fSGabor Horvath template <class T> foo(T b=0)3*207e7b1fSGabor Horvathvoid foo(T b = 0) {}; 4*207e7b1fSGabor Horvath main()5*207e7b1fSGabor Horvathint main() 6*207e7b1fSGabor Horvath { 7*207e7b1fSGabor Horvath 8*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 9*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+foo$}} 10*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} 11*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}} 12*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 13*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 14*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 15*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+foo$}} 16*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+ExplicitTemplateArgumentSubstitution$}} 17*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}} 18*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 19*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 20*207e7b1fSGabor Horvath // 21*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 22*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+foo$}} 23*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} 24*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}} 25*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 26*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 27*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 28*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+foo$}} 29*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+DeducedTemplateArgumentSubstitution$}} 30*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}} 31*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 32*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 33*207e7b1fSGabor Horvath // 34*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 35*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}} 36*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+TemplateInstantiation$}} 37*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}} 38*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 39*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 40*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 41*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}} 42*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+TemplateInstantiation$}} 43*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}} 44*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 45*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 46*207e7b1fSGabor Horvath // 47*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 48*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+b$}} 49*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+DefaultFunctionArgumentInstantiation$}} 50*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}} 51*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:12'}} 52*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 53*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 54*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+b$}} 55*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+DefaultFunctionArgumentInstantiation$}} 56*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}} 57*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:12'}} 58*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 59*207e7b1fSGabor Horvath // 60*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 61*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}} 62*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+TemplateInstantiation$}} 63*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+Begin$}} 64*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 65*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 66*207e7b1fSGabor Horvath // CHECK-LABEL: {{^---$}} 67*207e7b1fSGabor Horvath // CHECK: {{^name:[ ]+'foo<int>'$}} 68*207e7b1fSGabor Horvath // CHECK: {{^kind:[ ]+TemplateInstantiation$}} 69*207e7b1fSGabor Horvath // CHECK: {{^event:[ ]+End$}} 70*207e7b1fSGabor Horvath // CHECK: {{^orig:[ ]+'.*templight-default-func-arg.cpp:3:6'}} 71*207e7b1fSGabor Horvath // CHECK: {{^poi:[ ]+'.*templight-default-func-arg.cpp:72:3'$}} 72*207e7b1fSGabor Horvath foo<int>(); 73*207e7b1fSGabor Horvath } 74