summaryrefslogtreecommitdiffstats
path: root/clang/www
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-04-05 06:10:28 +0000
committerJordan Rose <jordan_rose@apple.com>2014-04-05 06:10:28 +0000
commit4d6da2bb4fd7c9479d49590b7e66fec15eaf1e3d (patch)
treea194ac81c9fa4974830623570c730127c1c1f94f /clang/www
parenta32968fc1044b1f78590310752f0c53064e2f57b (diff)
downloadbcm5719-llvm-4d6da2bb4fd7c9479d49590b7e66fec15eaf1e3d.tar.gz
bcm5719-llvm-4d6da2bb4fd7c9479d49590b7e66fec15eaf1e3d.zip
[analyzer] Add an ErrnoChecker (PR18701) to the Potential Checkers list.
llvm-svn: 205667
Diffstat (limited to 'clang/www')
-rw-r--r--clang/www/analyzer/potential_checkers.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/www/analyzer/potential_checkers.html b/clang/www/analyzer/potential_checkers.html
index 5b32dd0329d..6ec68a99096 100644
--- a/clang/www/analyzer/potential_checkers.html
+++ b/clang/www/analyzer/potential_checkers.html
@@ -314,6 +314,34 @@ int foo(bool cond) {
</table>
+<!-- =============================== POSIX ================================= -->
+<h3>POSIX</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">posix.Errno</span><br><br>
+Record that <code>errno</code> is non-zero when certain functions fail.
+</td><td><pre>
+#include &lt;stdlib.h&gt;
+
+int readWrapper(int fd, int *count) {
+ int lcount = read(fd, globalBuf, sizeof(globalBuf));
+ if (lcount &lt; 0)
+ return errno;
+ *count = lcount;
+ return 0;
+}
+
+void use(int fd) {
+ int count;
+ if (!readWrapper(fd))
+ print("%d", count); // should not warn
+}
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=18701">PR18701</a></td></tr>
+
+</table>
+
<!-- ========================= undefined behavior ========================== -->
<h3>undefined behavior</h3>
<table class="checkers">
OpenPOWER on IntegriCloud