Skip to content

Commit 01658b1

Browse files
committed
Fix two MSVC warnings; NFC
One was "unsafe use of bool" and the other was "sign comparision mismatch", and both were because we're treating a bool object as if it were an unsigned int. Add a cast to make that more explicit.
1 parent 2fd860c commit 01658b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaTemplateDeduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5729,7 +5729,7 @@ static bool isAtLeastAsSpecializedAs(
57295729
TemplateDeductionInfo &Info,
57305730
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
57315731
PartialOrderingKind) {
5732-
if (ArgIdx && *ArgIdx >= Args1Offset)
5732+
if (ArgIdx && *ArgIdx >= static_cast<unsigned>(Args1Offset))
57335733
ArgIdx = *ArgIdx - Args1Offset;
57345734
else
57355735
ArgIdx = std::nullopt;

0 commit comments

Comments
 (0)