@@ -2070,9 +2070,7 @@ class SyclKernelFieldChecker : public SyclKernelFieldHandler {
20702070 }
20712071
20722072 bool handleSyclSpecialType (ParmVarDecl *PD, QualType ParamTy) final {
2073- if (SemaSYCL::isSyclType (ParamTy, SYCLTypeAttr::work_group_memory))
2074- IsInvalid = false ;
2075- else {
2073+ if (!SemaSYCL::isSyclType (ParamTy, SYCLTypeAttr::work_group_memory)) {
20762074 Diag.Report (PD->getLocation (), diag::err_bad_kernel_param_type)
20772075 << ParamTy;
20782076 IsInvalid = true ;
@@ -2081,9 +2079,9 @@ class SyclKernelFieldChecker : public SyclKernelFieldHandler {
20812079 }
20822080
20832081 bool handleArrayType (FieldDecl *FD, QualType FieldTy) final {
2084- IsInvalid |= checkNotCopyableToKernel (FD, FieldTy);
2085- return isValid ();
2086- }
2082+ IsInvalid |= checkNotCopyableToKernel (FD, FieldTy);
2083+ return isValid ();
2084+ }
20872085
20882086 bool handleArrayType (ParmVarDecl *PD, QualType ParamTy) final {
20892087 Diag.Report (PD->getLocation (), diag::err_bad_kernel_param_type) << ParamTy;
@@ -2228,9 +2226,7 @@ class SyclKernelUnionChecker : public SyclKernelFieldHandler {
22282226 }
22292227
22302228 bool handleSyclSpecialType (ParmVarDecl *PD, QualType ParamTy) final {
2231- if (SemaSYCL::isSyclType (ParamTy, SYCLTypeAttr::work_group_memory))
2232- IsInvalid = false ;
2233- else
2229+ if (!SemaSYCL::isSyclType (ParamTy, SYCLTypeAttr::work_group_memory))
22342230 unsupportedFreeFunctionParamType (); // TODO
22352231 return true ;
22362232 }
@@ -3015,7 +3011,7 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
30153011 return handleSpecialType (FD, FieldTy);
30163012 }
30173013
3018- bool handleSyclSpecialType (ParmVarDecl * PD, QualType ParamTy) final {
3014+ bool handleSyclSpecialType (ParmVarDecl *PD, QualType ParamTy) final {
30193015 if (SemaSYCL::isSyclType (ParamTy, SYCLTypeAttr::work_group_memory)) {
30203016 const auto *RecordDecl = ParamTy->getAsCXXRecordDecl ();
30213017 assert (RecordDecl && " The type must be a RecordDecl" );
@@ -6294,7 +6290,8 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
62946290 // work_group_memory<int> where the hidden second parameter has a default
62956291 // value. To circumvent this, we include the correct forward declaration
62966292 // ourselves.
6297- O << " #include <sycl/ext/oneapi/experimental/work_group_memory_forward_decl.hpp>\n " ;
6293+ O << " #include "
6294+ " <sycl/ext/oneapi/experimental/work_group_memory_forward_decl.hpp>\n " ;
62986295 O << " \n " ;
62996296
63006297 LangOptions LO;
0 commit comments