From: Ted Kremenek Date: Wed, 24 Jun 2009 18:50:14 +0000 (+0000) Subject: Replace 'clang --analyze' example (in text) with screenshot from scan-build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d277e25e085c4905bc11e7fbc377253d9fb0177;p=clang Replace 'clang --analyze' example (in text) with screenshot from scan-build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74095 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/www/analyzer/annotations.html b/www/analyzer/annotations.html index 129748e9b0..f76dbee12a 100644 --- a/www/analyzer/annotations.html +++ b/www/analyzer/annotations.html @@ -174,15 +174,12 @@ use 'cf_returns_retained'.

return [[NSString alloc] initWithCString:"flag a leak"]; } @end - -$ clang --analyze test.m -$ 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. +

Running scan-build on this source file produces the following output:

+ + +

Attribute 'cf_returns_retained' (Clang-specific)

diff --git a/www/analyzer/images/example_ns_returns_retained.png b/www/analyzer/images/example_ns_returns_retained.png new file mode 100644 index 0000000000..61316e19fe Binary files /dev/null and b/www/analyzer/images/example_ns_returns_retained.png differ