[clang] [Clang][CodeGen] Emit “trap reasons” on UBSan traps (PR #145967)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 11 11:23:21 PDT 2025


================
@@ -85,6 +85,96 @@ enum VariableTypeDescriptorKind : uint16_t {
 //                        Miscellaneous Helper Methods
 //===--------------------------------------------------------------------===//
 
+static llvm::StringRef GetUBSanTrapForHandler(SanitizerHandler ID) {
----------------
vitalybuka wrote:

Can we put this into llvm-project/clang/lib/CodeGen/SanitizerHandler.h as 

SANITIZER_CHECK(AddOverflow, add_overflow, 0, "Signed integer addition overflowed")                           


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


More information about the cfe-commits mailing list