Skip to content

Commit a60cd4f

Browse files
committed
Update diagnostic
Signed-off-by: Soumi Manna <[email protected]>
1 parent 5160b0e commit a60cd4f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12978,9 +12978,9 @@ void Sema::addIntelSYCLSingleArgFunctionAttr(Decl *D,
1297812978
return;
1297912979
}
1298012980
if (ArgInt > 3) {
12981-
Diag(E->getExprLoc(),
12982-
diag::err_intel_attribute_argument_is_not_in_range)
12983-
<< CI.getAttrName();
12981+
Diag(E->getBeginLoc(),
12982+
diag::err_attribute_argument_out_of_range)
12983+
<< CI.getAttrName() << 0 << 3 << E->getSourceRange();
1298412984
return;
1298512985
}
1298612986
}

clang/test/SemaSYCL/intel-max-global-work-dim-device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int main() {
104104
h.single_task<class test_kernel8>(TRIFuncObjBad());
105105

106106
h.single_task<class test_kernel9>(
107-
[]() [[intel::max_global_work_dim(4)]]{}); // expected-error{{The value of 'max_global_work_dim' attribute must be in range from 0 to 3}}
107+
[]() [[intel::max_global_work_dim(4)]]{}); // expected-error{{'max_global_work_dim' attribute requires integer constant between 0 and 3 inclusive}}
108108
#endif // TRIGGER_ERROR
109109
});
110110
return 0;

0 commit comments

Comments
 (0)