[clang] [sanitizer] Add plumbing for -fsanitize-add-pseudo-functions and partly replace '-mllvm -array-bounds-pseudofn' (PR #138577)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Mon May 5 15:09:22 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 ||
----------------
vitalybuka wrote:

Could be nice to make clear that SO_ArrayBounds here is the same as on line 1252
E.g. `auto CurrentCheck = SO_ArrayBounds;`

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


More information about the cfe-commits mailing list