diff options
author | Piotr Fusik <p.fusik@samsung.com> | 2024-07-14 22:44:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-14 22:44:19 +0200 |
commit | ca4ebae38c09b48c78789b77e7a98ec149957716 (patch) | |
tree | f2231be20124ac6bb213e9ae332b27b82ac65cea | |
parent | 73acf8d755e04996f17b7694b4794459e492dede (diff) | |
download | llvm-ca4ebae38c09b48c78789b77e7a98ec149957716.zip llvm-ca4ebae38c09b48c78789b77e7a98ec149957716.tar.gz llvm-ca4ebae38c09b48c78789b77e7a98ec149957716.tar.bz2 |
[clang][NFC] Fix a warning (#98611)
enumerated and non-enumerated type in conditional expression
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 039f60c..ddb8257 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -3842,9 +3842,10 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, llvm::CallInst *TrapCall = Builder.CreateCall( CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), - llvm::ConstantInt::get(CGM.Int8Ty, ClSanitizeDebugDeoptimization - ? TrapBB->getParent()->size() - : CheckHandlerID)); + llvm::ConstantInt::get(CGM.Int8Ty, + ClSanitizeDebugDeoptimization + ? TrapBB->getParent()->size() + : static_cast<uint64_t>(CheckHandlerID))); if (!CGM.getCodeGenOpts().TrapFuncName.empty()) { auto A = llvm::Attribute::get(getLLVMContext(), "trap-func-name", |