summaryrefslogtreecommitdiffstats
path: root/www/analyzer
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-08-19 16:27:37 +0000
committerJordan Rose <jordan_rose@apple.com>2013-08-19 16:27:37 +0000
commitd3721e464a8cec087ea7c75abeda7f03df622eeb (patch)
tree6424489bfd4d40c05e319791718873c6ae09190a /www/analyzer
parenta728e927c6e58f26b2c8615a8baa761d2f157e4b (diff)
[analyzer] Add "unmodified variable" checker to the Potential Checkers.
This is PR16890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/analyzer')
-rw-r--r--www/analyzer/potential_checkers.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/www/analyzer/potential_checkers.html b/www/analyzer/potential_checkers.html
index 6b96d1339c..6e887649be 100644
--- a/www/analyzer/potential_checkers.html
+++ b/www/analyzer/potential_checkers.html
@@ -288,6 +288,30 @@ void test() {
</table>
+<!-- ============================== dead code ============================== -->
+<h3>dead code</h3>
+<table class="checkers">
+<col class="namedescr"><col class="example"><col class="progress">
+<thead><tr><td>Name, Description</td><td>Example</td><td>Progress</td></tr></thead>
+
+<tr><td><span class="name">deadcode.UnmodifiedVariable
+<br>(C, C++)</span><br><br>
+A variable is never modified but was not declared const and is not a reference.
+</td><td><pre>
+extern int computeDelta();
+
+int foo(bool cond) {
+ int i = 0;
+ if (cond) {
+ const int delta = computeDelta();
+ // Forgot to modify 'i'.
+ }
+ return i;
+}
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=16890">PR16890</a></td></tr>
+
+</table>
+
<!-- ========================= undefined behavior ========================== -->
<h3>undefined behavior</h3>
<table class="checkers">