Skip to content

Commit ebcc52c

Browse files
committed
Enable diagnostic only for SYCL
ESIMD doesn't yet support function pointers properly.
1 parent 35a7d71 commit ebcc52c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Sema/SemaOverload.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10264,7 +10264,8 @@ static bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD,
1026410264
S.getLangOpts().SYCLAllowFuncPtr) {
1026510265
if (!FD->hasAttr<SYCLDeviceIndirectlyCallableAttr>()) {
1026610266
S.SYCLDiagIfDeviceCode(Loc,
10267-
diag::err_sycl_taking_address_of_wrong_function);
10267+
diag::err_sycl_taking_address_of_wrong_function,
10268+
Sema::DeviceDiagnosticReason::Sycl);
1026810269
}
1026910270
}
1027010271

0 commit comments

Comments
 (0)