Skip to content

Commit 7714dc5

Browse files
committed
Report name of function called in source
1 parent 45afa2f commit 7714dc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
22572257
auto *VTy = TheCall->getArg(0)->getType()->getAs<VectorType>();
22582258
if (!VTy) {
22592259
SemaRef.Diag(TheCall->getBeginLoc(), diag::err_vec_builtin_non_vector)
2260-
<< "AddUint64" << /*all*/ 1;
2260+
<< TheCall->getDirectCallee() << /*all*/ 1;
22612261
return true;
22622262
}
22632263

clang/test/SemaHLSL/BuiltIns/AddUint64-errors.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ uint2 test_bad_num_arg_elements(uint3 a, uint3 b) {
2222

2323
uint2 test_scalar_arg_type(uint a) {
2424
return __builtin_hlsl_adduint64(a, a);
25-
// expected-error@-1 {{all arguments to AddUint64 must be vectors}}
25+
// expected-error@-1 {{all arguments to '__builtin_hlsl_adduint64' must be vectors}}
2626
}
2727

2828
uint2 test_signed_integer_args(int2 a, int2 b) {

0 commit comments

Comments
 (0)