@@ -70,10 +70,10 @@ bool isa_B(A *a) {
7070 Check_VLA_Restriction::restriction (7 );
7171 int *ip = new int ; // expected-error 2{{SYCL kernel cannot allocate storage}}
7272 int i;
73- int *p3 = new (&i) int ; // no error on placement new
73+ int *p3 = new (&i) int ; // no error on placement new
7474 OverloadedNewDelete *x = new (struct OverloadedNewDelete ); // expected-note 2{{called by 'isa_B'}}
7575 auto y = new struct OverloadedNewDelete [5 ];
76- (void )typeid (int ); // expected-error {{SYCL kernel cannot use rtti}}
76+ (void )typeid (int ); // expected-error {{SYCL kernel cannot use rtti}}
7777 return dynamic_cast <B *>(a) != 0 ; // expected-error {{SYCL kernel cannot use rtti}}
7878}
7979
@@ -106,18 +106,18 @@ using myFuncDef = int(int, int);
106106#define int128Def __int128
107107#define int128tDef __int128_t
108108#define intDef int
109-
109+
110110// typedefs (late )
111111typedef const __uint128_t megeType;
112112typedef const __float128 trickyFloatType;
113113typedef const __int128 tricky128Type;
114114
115115// templated type (late)
116- template <typename T>
117- T bar (){ return T (); };
116+ template <typename T>
117+ T bar () { return T (); };
118118
119119// false positive. early incorrectly catches
120- template <typename t>
120+ template <typename t>
121121void foo (){};
122122
123123void eh_ok (void ) {
@@ -152,8 +152,9 @@ void usage(myFuncDef functionPtr) {
152152 b.f (); // expected-error {{SYCL kernel cannot call a virtual function}}
153153
154154 Check_RTTI_Restriction::kernel1<class kernel_name >([]() { // expected-note 3{{called by 'usage'}}
155- Check_RTTI_Restriction::A *a;
156- Check_RTTI_Restriction::isa_B (a); }); // expected-note 6{{called by 'operator()'}}
155+ Check_RTTI_Restriction::A *a;
156+ Check_RTTI_Restriction::isa_B (a);
157+ }); // expected-note 6{{called by 'operator()'}}
157158
158159 // ======= Float128 Not Allowed in Kernel ==========
159160 // expected-error@+1 {{__float128 is not supported on this target}}
@@ -181,15 +182,15 @@ void usage(myFuncDef functionPtr) {
181182 intDef MalArrayDef[0 ];
182183 // ---- false positive tests. These should not generate any errors.
183184 foo<int [0 ]>();
184- std::size_t arrSz = sizeof (int [0 ]);
185+ std::size_t arrSz = sizeof (int [0 ]);
185186
186187 // ======= __int128 Not Allowed in Kernel ==========
187188 // expected-error@+1 {{__int128 is not supported on this target}}
188- __int128 malIntent = 2 ;
189+ __int128 malIntent = 2 ;
189190 // expected-error@+1 {{__int128 is not supported on this target}}
190191 tricky128Type mal128Trick = 2 ;
191192 // expected-error@+1 {{__int128 is not supported on this target}}
192- int128Def malIntDef = 9 ;
193+ int128Def malIntDef = 9 ;
193194 // expected-error@+1 {{__int128 is not supported on this target}}
194195 auto whatInt128 = malIntent;
195196 // expected-error@+1 {{__int128 is not supported on this target}}
@@ -200,13 +201,13 @@ void usage(myFuncDef functionPtr) {
200201 decltype (malIntent) malDeclInt = 2 ;
201202
202203 // expected-error@+1 {{__int128 is not supported on this target}}
203- __int128_t malInt128 = 2 ;
204+ __int128_t malInt128 = 2 ;
204205 // expected-error@+1 {{unsigned __int128 is not supported on this target}}
205206 __uint128_t malUInt128 = 3 ;
206207 // expected-error@+1 {{unsigned __int128 is not supported on this target}}
207- megeType malTypeDefTrick = 4 ;
208+ megeType malTypeDefTrick = 4 ;
208209 // expected-error@+1 {{__int128 is not supported on this target}}
209- int128tDef malInt2Def = 6 ;
210+ int128tDef malInt2Def = 6 ;
210211 // expected-error@+1 {{unsigned __int128 is not supported on this target}}
211212 auto whatUInt = malUInt128;
212213 // expected-error@+1 {{__int128 is not supported on this target}}
@@ -220,8 +221,7 @@ void usage(myFuncDef functionPtr) {
220221 std::size_t i128Sz = sizeof (__int128);
221222 foo<__int128>();
222223 std::size_t u128Sz = sizeof (__uint128_t );
223- foo<__int128_t >();
224-
224+ foo<__int128_t >();
225225}
226226
227227namespace ns {
@@ -244,7 +244,7 @@ int use2(a_type ab, a_type *abp) {
244244 return 2 ;
245245 if (ab.const_stat_member )
246246 return 1 ;
247- if (ab.stat_member ) // expected-error {{SYCL kernel cannot use a non-const static data variable}}
247+ if (ab.stat_member ) // expected-error {{SYCL kernel cannot use a non-const static data variable}}
248248 return 0 ;
249249 if (abp->stat_member ) // expected-error {{SYCL kernel cannot use a non-const static data variable}}
250250 return 0 ;
@@ -253,7 +253,7 @@ int use2(a_type ab, a_type *abp) {
253253
254254 return another_global; // expected-error {{SYCL kernel cannot use a non-const global variable}}
255255
256- return ns::glob + // expected-error {{SYCL kernel cannot use a non-const global variable}}
256+ return ns::glob + // expected-error {{SYCL kernel cannot use a non-const global variable}}
257257 AnotherNS::moar_globals; // expected-error {{SYCL kernel cannot use a non-const global variable}}
258258}
259259
@@ -265,7 +265,7 @@ __attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
265265int main () {
266266 // Outside Kernel, these should not generate errors.
267267 a_type ab;
268-
268+
269269 int PassOver[0 ];
270270 __float128 okFloat = 40 ;
271271 __int128 fineInt = 20 ;
0 commit comments