Skip to content

Commit 6e83ddc

Browse files
authored
[NFC][SYCL] Remove unnecessary if condition (#2585)
This if condition duplicates logic of outer if.
1 parent 787af47 commit 6e83ddc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8310,10 +8310,8 @@ void Sema::ProcessDeclAttributeList(Scope *S, Decl *D,
83108310
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
83118311
D->setInvalidDecl();
83128312
} else if (const auto *A = D->getAttr<IntelReqdSubGroupSizeAttr>()) {
8313-
if (!getLangOpts().SYCLIsDevice) {
8314-
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
8315-
D->setInvalidDecl();
8316-
}
8313+
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
8314+
D->setInvalidDecl();
83178315
} else if (!D->hasAttr<CUDAGlobalAttr>()) {
83188316
if (const auto *A = D->getAttr<AMDGPUFlatWorkGroupSizeAttr>()) {
83198317
Diag(D->getLocation(), diag::err_attribute_wrong_decl_type)

0 commit comments

Comments
 (0)