[clang] [sanitizer] Add plumbing for -fsanitize-annotate-debug-info and partly replace '-mllvm -array-bounds-pseudofn' (PR #138577)

Thurston Dang via cfe-commits cfe-commits at lists.llvm.org
Mon May 5 16:13:19 PDT 2025


================
@@ -1228,7 +1228,10 @@ void CodeGenFunction::EmitBoundsCheckImpl(const Expr *E, llvm::Value *Bound,
   SanitizerScope SanScope(this);
 
   llvm::DILocation *CheckDI = Builder.getCurrentDebugLocation();
-  if (ClArrayBoundsPseudoFn && CheckDI) {
+  if ((ClArrayBoundsPseudoFn ||
----------------
thurstond wrote:

Added CurrentCheckKind (there is already a `Check` variable that contains the instructions)

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


More information about the cfe-commits mailing list