]> granicus.if.org Git - clang/commitdiff
Replace 'clang --analyze' example (in text) with screenshot from scan-build.
authorTed Kremenek <kremenek@apple.com>
Wed, 24 Jun 2009 18:50:14 +0000 (18:50 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 24 Jun 2009 18:50:14 +0000 (18:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74095 91177308-0d34-0410-b5e6-96231b3b80d8

www/analyzer/annotations.html
www/analyzer/images/example_ns_returns_retained.png [new file with mode: 0644]

index 129748e9b0cc76fca77ba3ada11e28642da0a906..f76dbee12ae21090acc5c856f1baec2e2f2f2f4d 100644 (file)
@@ -174,15 +174,12 @@ use 'cf_returns_retained'.</p>
   return [[NSString alloc] initWithCString:"flag a leak"];
 }
 @end
-
-<span class="command">$ clang --analyze test.m</span>
-$ clang --analyze test.m
-test.m:21:10: warning: Potential leak of an object allocated on line 21
-  return [[NSString alloc] initWithCString:"flag a leak"];
-         ^
-1 diagnostic generated.
 </pre>
 
+<p>Running <tt>scan-build</tt> on this source file produces the following output:</p>
+
+<img src="images/example_ns_returns_retained.png">
+
 <h4 id="attr_cf_returns_retained">Attribute 'cf_returns_retained'
 (Clang-specific)</h4>
 
diff --git a/www/analyzer/images/example_ns_returns_retained.png b/www/analyzer/images/example_ns_returns_retained.png
new file mode 100644 (file)
index 0000000..61316e1
Binary files /dev/null and b/www/analyzer/images/example_ns_returns_retained.png differ