Skip to content

Commit 061a2c6

Browse files
committed
[SYCL] Remove explicit sycl_device attribute requirement
Signed-off-by: Vladimir Lazarev <[email protected]>
1 parent cfa3a01 commit 061a2c6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,9 +1439,7 @@ void Sema::finalizeSYCLDelayedAnalysis(const FunctionDecl *Caller,
14391439

14401440
for (const Decl *Redecl : Callee->redecls()) {
14411441
if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(Redecl)) {
1442-
if ((FD->hasAttr<SYCLDeviceAttr>() &&
1443-
!FD->getAttr<SYCLDeviceAttr>()->isImplicit()) ||
1444-
FD->hasAttr<SYCLKernelAttr>()) {
1442+
if (FD->hasAttr<SYCLDeviceAttr>() || FD->hasAttr<SYCLKernelAttr>()) {
14451443
RedeclHasAttr = true;
14461444
break;
14471445
}

0 commit comments

Comments
 (0)