================
@@ -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>
----------------
NagyDonat wrote:

Yes, this is a known ugly situation that `DynamicMemoryModeling` is a hidden 
undocumented private checker that has public user-facing options that should be 
documented.

As a short-term solution I would suggest adding documentation for it 
_somewhere_ (probably in a separate RST file titled "Configuring dynamic memory 
modeling" but it could also be within the list of checkers with a remark that 
"this checker never produces reports and enabling/disabling it makes no sense) 
and linking to that documentation from `unix.Malloc` and all other checkers 
that are affected by this config option.

On a longer term we should eventually introduce a clean solution for these 
"affects multiple checkers" config options.

https://github.com/llvm/llvm-project/pull/205371
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to