[clang] [lldb] [UBSan][BoundsSafety] Implement support for more expressive "trap reasons" (PR #154618)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 20 20:22:28 PDT 2025
================
@@ -1813,6 +1813,7 @@ void ScalarExprEmitter::EmitBinOpCheck(
SanitizerHandler Check;
SmallVector<llvm::Constant *, 4> StaticData;
SmallVector<llvm::Value *, 2> DynamicData;
+ std::unique_ptr<RuntimeTrapDiagnosticBuilder> RTDB = nullptr;
----------------
Sirraide wrote:
I don’t think this is the right place to cache and reuse these. If we want caching, then `CodeGenModule::RuntimeDiag()` should handle that internally. I’m also not sure if we need caching at all—just making the inline storage of the `SmallString` in the diagnostic builder a big bigger should suffice for most diagnostics I think.
https://github.com/llvm/llvm-project/pull/154618
More information about the cfe-commits
mailing list