aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-06-09 20:10:42 +0000
committerTed Kremenek <kremenek@apple.com>2012-06-09 20:10:42 +0000
commitc1cb12bb6144c96dea61bf753210e64bf30fa245 (patch)
treeb9486b1dd203eaf5008965c9b169eecf945d0e19
parente65b34deb1f8f7c80765f1c00476e7609bb9eada (diff)
Wordsmith a bit, and turn </h1> into </h4> when appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158281 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--www/analyzer/faq.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/www/analyzer/faq.html b/www/analyzer/faq.html
index 8aaea730b3..1859e78926 100644
--- a/www/analyzer/faq.html
+++ b/www/analyzer/faq.html
@@ -17,31 +17,33 @@
<div id="content">
-<h1>FAQ and How to Deal with Common False Positives </h1>
+<h1>FAQ and How to Deal with Common False Positives</h1>
-<h4>Q: The analyzer reports a bug on an error path. I do not want the bug being reported here since my custom error handler will safely end the execution before the bug is reached.</h1>
+<h4>Q: The analyzer reports a bug on an error path. I do not want the bug being reported here since my custom error handler will safely end the execution before the bug is reached.</h4>
<img src="images/example_custom_assert.png" alt="example custom assert">
<p>You can tell the analyzer that this path is unreachable by teaching it about your <a href = "annotations.html#custom_assertions" >custom assertion handlers</a>.</p>
-<h4>Q: The analyzer reports "Dereference of null pointer", but I know that the pointer is never null.</h1>
+<h4>Q: The analyzer reports "Dereference of null pointer", but I know that the pointer is never null.</h4>
<img src="images/example_null_pointer.png" alt="example null pointer">
<p>The reason the analyzer often thinks that a pointer can be null is because the preceding code checked compared it against null. So if you are absolutely sure that it cannot be null, remove the preceding check and, preferably, add an assert as well. For example, in the code segment above, it will be sufficient to remove the <tt>if (!b)</tt> check. </p>
-<h4>Q: The analyzer assumes that the loop body is never entered, which can never happen in this code.</h1>
+<h4>Q: The analyzer assumes that the loop body is never entered, which can never happen in this code.</h4>
<img src="images/example_use_assert.png" alt="example use assert">
<p>You can teach the analyzer facts about your code as well as document it by using asserts. In the contrived example above, the analyzer reports an error on the path which assumes that the loop is never entered. However, the owner of the code might know that the loop is always entered because the input parameter <tt>length</tt> is always greater than <tt>0</tt>. The false positive can be suppressed by asserting this knowledge, adding <tt>assert(length > 0)</tt> in the beginning of the function.</p>
-<h4>Q: How can I suppress the analyzer warning?</h1>
+<h4>Q: How can I suppress the analyzer warning?</h4>
<img src="images/example_null_pointer.png" alt="example null pointer">
-<p>Unfortunately, there is no mechanism for suppressing the analyzer warning. If you ran into an analyzer bug/false positive, please <a href = "filing_bugs.html">report it</a>.</p>
+<p>There is currently no mechanism for suppressing the analyzer warning,
+although this is currently being investigated. If you encounter an analyzer
+bug/false positive, please <a href = "filing_bugs.html">report it</a>.</p>
</div>
</div>