File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1648,6 +1648,10 @@ class SyclKernelFieldChecker : public SyclKernelFieldHandler {
1648
1648
assert (Util::isSyclSpecialType (Ty) &&
1649
1649
" Should only be called on sycl special class types." );
1650
1650
const RecordDecl *RecD = Ty->getAsRecordDecl ();
1651
+ if (IsSIMD && !Util::isSyclType (Ty, " accessor" , true /* Tmp*/ ))
1652
+ return SemaRef.Diag (Loc.getBegin (),
1653
+ diag::err_sycl_esimd_not_supported_for_type)
1654
+ << RecD;
1651
1655
if (const ClassTemplateSpecializationDecl *CTSD =
1652
1656
dyn_cast<ClassTemplateSpecializationDecl>(RecD)) {
1653
1657
const TemplateArgumentList &TAL = CTSD->getTemplateArgs ();
@@ -1658,10 +1662,6 @@ class SyclKernelFieldChecker : public SyclKernelFieldHandler {
1658
1662
if (TAL.size () > 5 )
1659
1663
return checkPropertyListType (TAL.get (5 ), Loc.getBegin ());
1660
1664
}
1661
- if (IsSIMD && !Util::isSyclType (Ty, " accessor" , true /* Tmp*/ ))
1662
- return SemaRef.Diag (Loc.getBegin (),
1663
- diag::err_sycl_esimd_not_supported_for_type)
1664
- << RecD;
1665
1665
return false ;
1666
1666
}
1667
1667
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ void test() {
13
13
queue q;
14
14
15
15
q.submit ([&](handler &h) {
16
- cl::sycl::sampler smplr ;
16
+ cl::sycl::sampler Smplr ;
17
17
cl::sycl::stream Stream (1024 , 128 , h);
18
18
// expected-note@+1{{in instantiation of function template specialization}}
19
19
h.single_task <class esimd_kernel >(
20
20
// expected-error@+1{{type 'sampler' is not supported in 'esimd' context}}
21
- [=]() [[intel::sycl_explicit_simd]] { smplr .use (); });
21
+ [=]() [[intel::sycl_explicit_simd]] { Smplr .use (); });
22
22
23
23
// expected-note@+1{{in instantiation of function template specialization}}
24
24
h.single_task <class StreamTester >(
You can’t perform that action at this time.
0 commit comments