================
@@ -294,6 +294,16 @@ ANALYZER_OPTION(
     bool, ShouldUnrollLoops, "unroll-loops",
     "Whether the analysis should try to unroll loops with known bounds.", 
false)
 
+ANALYZER_OPTION(
+    bool, ShouldAssumeOneIteration, "assume-one-iteration",
+    "Whether the analyzer should always assume at least one iteration in "
+    "loops where the loop condition is opaque (i.e. the analyzer cannot "
+    "determine if it's true or false). Setting this to true eliminates some "
+    "false positives (where e.g. a structure is nonempty, but the analyzer "
+    "does not notice this); but it also eliminates some true positives (e.g. "
+    "cases where a structure can be empty and this causes buggy behavior).",
----------------
gamesh411 wrote:

It could be mentined that this option interacts with analyzer option 
'eagerly-assume'.
We could just say somthing the enabling both can lead to more paths explored 
around loops, or just leave it at that, and suggest that the user should be 
avare of the connection between the two.
IMO either one is fine, because if someone is interested enough to read this 
option text, they can either do their measurements tweaking their parameters, 
or looking at the history and seeing the test file for more details.
What do you think?

https://github.com/llvm/llvm-project/pull/125494
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to