@@ -31,58 +31,58 @@ template<int, int=0> struct KN;
3131__attribute__ ((sycl_kernel_entry_point(KN<1 >)))
3232void skep1() {
3333}
34- // CHECK: |-FunctionDecl {{.*}} skep1 'void ()'
35- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<1>
34+ // CHECK: |-FunctionDecl {{.*}} skep1 'void ()'
35+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<1>
3636
3737using KN2 = KN<2 >;
3838__attribute__ ((sycl_kernel_entry_point(KN2)))
3939void skep2() {
4040}
41- // CHECK: |-FunctionDecl {{.*}} skep2 'void ()'
42- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN2
41+ // CHECK: |-FunctionDecl {{.*}} skep2 'void ()'
42+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN2
4343
4444template <int I> using KNT = KN<I>;
4545__attribute__ ((sycl_kernel_entry_point(KNT<3 >)))
4646void skep3() {
4747}
48- // CHECK: |-FunctionDecl {{.*}} skep3 'void ()'
49- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KNT<3>
48+ // CHECK: |-FunctionDecl {{.*}} skep3 'void ()'
49+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KNT<3>
5050
5151template <typename KNT, typename F>
5252[[clang::sycl_kernel_entry_point(KNT)]]
5353void skep4 (F f) {
5454 f ();
5555}
56- // CHECK: |-FunctionTemplateDecl {{.*}} skep4
57- // CHECK: | |-TemplateTypeParmDecl {{.*}} KNT
58- // CHECK: | |-TemplateTypeParmDecl {{.*}} F
59- // CHECK: | |-FunctionDecl {{.*}} skep4 'void (F)'
60- // CHECK: | | `-SYCLKernelEntryPointAttr {{.*}} KNT
56+ // CHECK: |-FunctionTemplateDecl {{.*}} skep4
57+ // CHECK-NEXT : | |-TemplateTypeParmDecl {{.*}} KNT
58+ // CHECK-NEXT : | |-TemplateTypeParmDecl {{.*}} F
59+ // CHECK-NEXT : | |-FunctionDecl {{.*}} skep4 'void (F)'
60+ // CHECK: | | `-SYCLKernelEntryPointAttr {{.*}} KNT
6161
6262void test_skep4 () {
6363 skep4<KNT<4 >>([]{});
6464}
65- // CHECK: | `-FunctionDecl {{.*}} used skep4 'void ((lambda at {{.*}}))' implicit_instantiation
66- // CHECK: | |-TemplateArgument type 'KN<4>'
67- // CHECK: | |-TemplateArgument type '(lambda at {{.*}})'
68- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} struct KN<4>
69- // CHECK: |-FunctionDecl {{.*}} test_skep4 'void ()'
65+ // CHECK: | `-FunctionDecl {{.*}} used skep4 'void ((lambda at {{.*}}))' implicit_instantiation
66+ // CHECK-NEXT : | |-TemplateArgument type 'KN<4>'
67+ // CHECK: | |-TemplateArgument type '(lambda at {{.*}})'
68+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} struct KN<4>
69+ // CHECK-NEXT : |-FunctionDecl {{.*}} test_skep4 'void ()'
7070
7171template <typename KNT, typename T>
7272[[clang::sycl_kernel_entry_point(KNT)]]
7373void skep5 (T) {
7474}
75- // CHECK: |-FunctionTemplateDecl {{.*}} skep5
76- // CHECK: | |-TemplateTypeParmDecl {{.*}} KNT
77- // CHECK: | |-TemplateTypeParmDecl {{.*}} T
78- // CHECK: | |-FunctionDecl {{.*}} skep5 'void (T)'
79- // CHECK: | | `-SYCLKernelEntryPointAttr {{.*}} KNT
75+ // CHECK: |-FunctionTemplateDecl {{.*}} skep5
76+ // CHECK-NEXT : | |-TemplateTypeParmDecl {{.*}} KNT
77+ // CHECK-NEXT : | |-TemplateTypeParmDecl {{.*}} T
78+ // CHECK-NEXT : | |-FunctionDecl {{.*}} skep5 'void (T)'
79+ // CHECK: | | `-SYCLKernelEntryPointAttr {{.*}} KNT
8080
8181// Checks for the explicit template instantiation declaration below.
82- // CHECK: | `-FunctionDecl {{.*}} skep5 'void (int)' explicit_instantiation_definition
83- // CHECK: | |-TemplateArgument type 'KN<5, 4>'
84- // CHECK: | |-TemplateArgument type 'int'
85- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 4>
82+ // CHECK: | `-FunctionDecl {{.*}} skep5 'void (int)' explicit_instantiation_definition
83+ // CHECK-NEXT : | |-TemplateArgument type 'KN<5, 4>'
84+ // CHECK: | |-TemplateArgument type 'int'
85+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 4>
8686
8787// FIXME: C++23 [temp.expl.spec]p12 states:
8888// FIXME: ... Similarly, attributes appearing in the declaration of a template
@@ -93,28 +93,28 @@ void skep5(T) {
9393template <>
9494void skep5<KN<5 ,1 >>(short ) {
9595}
96- // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (short)' explicit_specialization
97- // CHECK: | |-TemplateArgument type 'KN<5, 1>'
98- // CHECK: | |-TemplateArgument type 'short'
99- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} Inherited struct KN<5, 1>
96+ // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (short)' explicit_specialization
97+ // CHECK-NEXT : | |-TemplateArgument type 'KN<5, 1>'
98+ // CHECK: | |-TemplateArgument type 'short'
99+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} Inherited struct KN<5, 1>
100100
101101template <>
102102[[clang::sycl_kernel_entry_point(KN<5 ,2 >)]]
103103void skep5<KN<5 ,2 >>(long ) {
104104}
105- // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long)' explicit_specialization
106- // CHECK: | |-TemplateArgument type 'KN<5, 2>'
107- // CHECK: | |-TemplateArgument type 'long'
108- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 2>
105+ // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long)' explicit_specialization
106+ // CHECK-NEXT : | |-TemplateArgument type 'KN<5, 2>'
107+ // CHECK: | |-TemplateArgument type 'long'
108+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 2>
109109
110110template <>
111111[[clang::sycl_kernel_entry_point(KN<5 ,3 >)]]
112112void skep5<KN<5 ,-1 >>(long long ) {
113113}
114- // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long long)' explicit_specialization
115- // CHECK: | |-TemplateArgument type 'KN<5, -1>'
116- // CHECK: | |-TemplateArgument type 'long long'
117- // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 3>
114+ // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long long)' explicit_specialization
115+ // CHECK-NEXT : | |-TemplateArgument type 'KN<5, -1>'
116+ // CHECK: | |-TemplateArgument type 'long long'
117+ // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 3>
118118
119119template void skep5<KN<5 ,4 >>(int );
120120// Checks are located with the primary template declaration above.
@@ -127,18 +127,18 @@ void skep6() {
127127}
128128// CHECK: |-FunctionDecl {{.*}} skep6 'void ()'
129129// CHECK-NEXT: | `-SYCLKernelEntryPointAttr {{.*}} KN<6>
130- // CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep6 'void ()'
131- // CHECK: | |-CompoundStmt {{.*}}
130+ // CHECK-NEXT: |-FunctionDecl {{.*}} prev {{.*}} skep6 'void ()'
131+ // CHECK-NEXT: | |-CompoundStmt {{.*}}
132132// CHECK-NEXT: | `-SYCLKernelEntryPointAttr {{.*}} KN<6>
133133
134134// Ensure that matching attributes from the same declaration are ok.
135135[[clang::sycl_kernel_entry_point(KN<7 >), clang::sycl_kernel_entry_point(KN<7 >)]]
136136void skep7 () {
137137}
138138// CHECK: |-FunctionDecl {{.*}} skep7 'void ()'
139- // CHECK: | |-CompoundStmt {{.*}}
139+ // CHECK-NEXT: | |-CompoundStmt {{.*}}
140140// CHECK-NEXT: | |-SYCLKernelEntryPointAttr {{.*}} KN<7>
141141// CHECK-NEXT: | `-SYCLKernelEntryPointAttr {{.*}} KN<7>
142142
143143void the_end () {}
144- // CHECK: `-FunctionDecl {{.*}} the_end 'void ()'
144+ // CHECK: `-FunctionDecl {{.*}} the_end 'void ()'
0 commit comments