[clang] [clang][analyzer] Add allocation failure modeling to DynamicMemoryModeling (PR #205371)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 01:19:20 PDT 2026


================
@@ -512,7 +512,14 @@ def DynamicMemoryModeling: Checker<"DynamicMemoryModeling">,
                   "NoStoreFuncVisitor.",
                   "true",
                   Released,
-                  Hide>
+                  Hide>,
+    CmdLineOption<Boolean,
+                  "ModelAllocationFailure",
+                  "At allocation functions, add extra execution branches for "
+                  "failed memory allocation (function returns null value when "
+                  "size is non-null) if applicable.",
+                  "false",
+                  Released>
----------------
balazske wrote:

Is it good to add a "modeling checkers" section to checkers.rst and put these options (and checkers) there?

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


More information about the cfe-commits mailing list