Skip to content

Commit a4d7fbb

Browse files
committed
Merged the two diagnostic types
1 parent 9897ddc commit a4d7fbb

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9286,9 +9286,7 @@ def err_typecheck_expect_scalar_or_vector : Error<
92869286
"invalid operand of type %0 where %1 or "
92879287
"a vector of such type is required">;
92889288
def err_typecheck_expect_any_scalar_or_vector : Error<
9289-
"invalid operand of type %0 where a scalar or vector is required">;
9290-
def err_typecheck_expect_scalar_or_vector_not_type : Error<
9291-
"invalid operand of type %0">;
9289+
"invalid operand of type %0%select{| where a scalar or vector is required}1">;
92929290
def err_typecheck_expect_flt_or_vector : Error<
92939291
"invalid operand of type %0 where floating, complex or "
92949292
"a vector of such types is required">;

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ static bool CheckAnyScalarOrVector(Sema *S, CallExpr *TheCall,
18591859
(VTy && VTy->getElementType()->isScalarType()))) {
18601860
S->Diag(TheCall->getArg(0)->getBeginLoc(),
18611861
diag::err_typecheck_expect_any_scalar_or_vector)
1862-
<< ArgType;
1862+
<< ArgType << 1;
18631863
return true;
18641864
}
18651865
return false;
@@ -1875,8 +1875,8 @@ static bool CheckWaveActive(Sema *S, CallExpr *TheCall) {
18751875
(VTy &&
18761876
S->Context.hasSameUnqualifiedType(VTy->getElementType(), BoolType))) {
18771877
S->Diag(TheCall->getArg(0)->getBeginLoc(),
1878-
diag::err_typecheck_expect_scalar_or_vector_not_type)
1879-
<< ArgType << BoolType;
1878+
diag::err_typecheck_expect_any_scalar_or_vector)
1879+
<< ArgType << 0;
18801880
return true;
18811881
}
18821882
return false;

0 commit comments

Comments
 (0)