Skip to content

Commit ca4ebae

Browse files
authored
[clang][NFC] Fix a warning (#98611)
enumerated and non-enumerated type in conditional expression
1 parent 73acf8d commit ca4ebae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3842,9 +3842,10 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
38423842

38433843
llvm::CallInst *TrapCall = Builder.CreateCall(
38443844
CGM.getIntrinsic(llvm::Intrinsic::ubsantrap),
3845-
llvm::ConstantInt::get(CGM.Int8Ty, ClSanitizeDebugDeoptimization
3846-
? TrapBB->getParent()->size()
3847-
: CheckHandlerID));
3845+
llvm::ConstantInt::get(CGM.Int8Ty,
3846+
ClSanitizeDebugDeoptimization
3847+
? TrapBB->getParent()->size()
3848+
: static_cast<uint64_t>(CheckHandlerID)));
38483849

38493850
if (!CGM.getCodeGenOpts().TrapFuncName.empty()) {
38503851
auto A = llvm::Attribute::get(getLLVMContext(), "trap-func-name",

0 commit comments

Comments
 (0)