@@ -4833,7 +4833,7 @@ static void handleOptimizeNoneAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
4833
4833
static void handleSYCLDeviceAttr (Sema &S, Decl *D, const ParsedAttr &AL) {
4834
4834
auto *FD = cast<FunctionDecl>(D);
4835
4835
if (!FD->isExternallyVisible ()) {
4836
- S.Diag (AL.getLoc (), diag::err_sycl_attibute_cannot_be_applied_here ) << AL;
4836
+ S.Diag (AL.getLoc (), diag::err_sycl_attribute_internal_function ) << AL;
4837
4837
return ;
4838
4838
}
4839
4839
@@ -4844,7 +4844,7 @@ static void handleSYCLDeviceIndirectlyCallableAttr(Sema &S, Decl *D,
4844
4844
const ParsedAttr &AL) {
4845
4845
auto *FD = cast<FunctionDecl>(D);
4846
4846
if (!FD->isExternallyVisible ()) {
4847
- S.Diag (AL.getLoc (), diag::err_sycl_attibute_cannot_be_applied_here ) << AL;
4847
+ S.Diag (AL.getLoc (), diag::err_sycl_attribute_internal_function ) << AL;
4848
4848
return ;
4849
4849
}
4850
4850
@@ -4854,11 +4854,6 @@ static void handleSYCLDeviceIndirectlyCallableAttr(Sema &S, Decl *D,
4854
4854
4855
4855
static void handleSYCLRegisterNumAttr (Sema &S, Decl *D, const ParsedAttr &AL) {
4856
4856
auto *VD = cast<VarDecl>(D);
4857
- if (!VD->hasGlobalStorage ()) {
4858
- S.Diag (AL.getLoc (), diag::err_sycl_attibute_cannot_be_applied_here)
4859
- << AL << 0 ;
4860
- return ;
4861
- }
4862
4857
if (!checkAttributeNumArgs (S, AL, 1 ))
4863
4858
return ;
4864
4859
uint32_t RegNo = 0 ;
0 commit comments