Skip to content

Commit 860a6b3

Browse files
committed
[NFC][SYCL] Rename poorly named diagnostic
1 parent d43b92a commit 860a6b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11168,7 +11168,7 @@ def err_sycl_function_attribute_mismatch : Error<
1116811168
"SYCL kernel without %0 attribute can't call a function with this attribute">;
1116911169
def err_sycl_x_y_z_arguments_must_be_one : Error<
1117011170
"%0 X-, Y- and Z- sizes must be 1 when %1 attribute is used with value 0">;
11171-
def err_sycl_attibute_cannot_be_applied_here
11171+
def err_sycl_attribute_internal_function
1117211172
: Error<"%0 attribute cannot be applied to a "
1117311173
"static function or function in an anonymous namespace">;
1117411174
def err_sycl_compiletime_property_duplication : Error<

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4810,7 +4810,7 @@ static void handleOptimizeNoneAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
48104810
static void handleSYCLDeviceAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
48114811
auto *FD = cast<FunctionDecl>(D);
48124812
if (!FD->isExternallyVisible()) {
4813-
S.Diag(AL.getLoc(), diag::err_sycl_attibute_cannot_be_applied_here) << AL;
4813+
S.Diag(AL.getLoc(), diag::err_sycl_attribute_internal_function) << AL;
48144814
return;
48154815
}
48164816

@@ -4821,7 +4821,7 @@ static void handleSYCLDeviceIndirectlyCallableAttr(Sema &S, Decl *D,
48214821
const ParsedAttr &AL) {
48224822
auto *FD = cast<FunctionDecl>(D);
48234823
if (!FD->isExternallyVisible()) {
4824-
S.Diag(AL.getLoc(), diag::err_sycl_attibute_cannot_be_applied_here) << AL;
4824+
S.Diag(AL.getLoc(), diag::err_sycl_attribute_internal_function) << AL;
48254825
return;
48264826
}
48274827

@@ -4832,7 +4832,7 @@ static void handleSYCLDeviceIndirectlyCallableAttr(Sema &S, Decl *D,
48324832
static void handleSYCLRegisterNumAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
48334833
auto *VD = cast<VarDecl>(D);
48344834
if (!VD->hasGlobalStorage()) {
4835-
S.Diag(AL.getLoc(), diag::err_sycl_attibute_cannot_be_applied_here)
4835+
S.Diag(AL.getLoc(), diag::err_sycl_attribute_internal_function)
48364836
<< AL << 0;
48374837
return;
48384838
}

0 commit comments

Comments
 (0)