[clang] [Sanitizer] remove array-bounds-pseudofn (PR #149430)

Florian Mayer via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 18 10:37:32 PDT 2025


================
@@ -6491,14 +6488,8 @@ llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo(
   else
     Label = SanitizerHandlerToCheckLabel(Handler);
 
-  for (auto Ord : Ordinals) {
-    // TODO: deprecate ClArrayBoundsPseudoFn
-    if (((ClArrayBoundsPseudoFn && Ord == SanitizerKind::SO_ArrayBounds) ||
-         CGM.getCodeGenOpts().SanitizeAnnotateDebugInfo.has(Ord)) &&
-        CheckDebugLoc) {
-      return DI->CreateSyntheticInlineAt(CheckDebugLoc, Label);
-    }
-  }
+  if (any_of(Ordinals, [&](auto Ord) { return AnnotateDebugInfo.has(Ord); }))
----------------
fmayer wrote:

Doesn't that kind of obfuscate the code? Right now, we have preconditions / early exit first, then the actual logic "if any Ord matches"

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


More information about the cfe-commits mailing list