Skip to content

Commit aa31802

Browse files
committed
Use unsigned literals for FC value checking
1 parent e416e16 commit aa31802

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/Sema/SemaPPC.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo &TI,
267267
bool IsUnsigned = (BuiltinID == PPC::BI__builtin_amo_lwat ||
268268
BuiltinID == PPC::BI__builtin_amo_ldat);
269269

270-
bool IsValid = IsUnsigned ? llvm::is_contained({0, 1, 2, 3, 4, 6, 8}, Val)
271-
: llvm::is_contained({0, 5, 7, 8}, Val);
270+
bool IsValid = IsUnsigned
271+
? llvm::is_contained({0u, 1u, 2u, 3u, 4u, 6u, 8u}, Val)
272+
: llvm::is_contained({0u, 5u, 7u, 8u}, Val);
272273

273274
if (IsValid)
274275
return false;

0 commit comments

Comments
 (0)