[clang] [Clang] [CodeGen] UBSan Trap Reasons (PR #145967)

Anthony Tran via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 30 23:04:09 PDT 2025


================
@@ -4051,6 +4139,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
 
   llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
 
+  llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+  llvm::StringRef TrapMessage = GetUBSanTrapForHandler(CheckHandlerID);
+
+  if (getDebugInfo()) {
----------------
anthonyhatran wrote:

Yes, that is wrong. I must've removed the empty TrapMessage check by mistake since it was in my previous PR.

https://github.com/llvm/llvm-project/pull/145967


More information about the cfe-commits mailing list