[clang] [clang][analyzer] Add alpha.core.NullTerminated checker (PR #188128)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 14 06:12:37 PDT 2026


================
@@ -286,6 +286,35 @@ class StoreManager {
   /// iterBindings - Iterate over the bindings in the Store.
   virtual void iterBindings(Store store, BindingsHandler& f) = 0;
 
+  /// The kind of a binding: either \c Direct, a value bound to one specific
+  /// location, or \c Default, a value covering every location of a region
+  /// without its own direct binding. Can't reuse BindingKey::Kind because it is
+  /// a file-local in RegionStore.cpp. Symbolic-ness is tracked by \c BitOffset
+  /// instead of in the enum.
----------------
NagyDonat wrote:

Actually now that I see the complications with the bitflag semantics (which I didn't check before writing my original suggestion), I prefer the original approach instead of https://github.com/llvm/llvm-project/pull/188128/commits/779e82185a41cd5b99b3794a857116c466aebeb7.

The code fragment `enum {Default, Direct}` is so trivial that duplicating it is not a serious issue; and the new approach adds roughly a dozen lines of additional "glue" code that is avoided in the original variant.

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


More information about the cfe-commits mailing list