[clang] [llvm] [NFC][analyzer] Introduce the BoundsChecking library (PR #213957)
Balázs Benics via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 05:59:36 PDT 2026
================
@@ -0,0 +1,105 @@
+//===- BoundsChecking.h - Bounds checking related APIs ----------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This header declares 'checkBounds', a function that compares memory offsets
+// (that may be symbolic) and uses heuristical workarounds to provide more
+// accurate results than directly calling evalBinOp or assumeInBound.
+//
+// As of now, this logic only supports the needs of `security.ArrayBound`, but
+// in the future it will be generalized and applied in all checkers that
+// perform bounds checking (to bring them out of `alpha` stage).
+//
+// TODO: This header should be extended by other utilities (e.g. message
+// formatting tools) that are relevant for multiple bounds checking checkers.
+//
----------------
steakhal wrote:
Isn't this TODO resolved now?
https://github.com/llvm/llvm-project/pull/213957
More information about the llvm-commits
mailing list