diff options
| author | Ted Kremenek <kremenek@apple.com> | 2012-04-04 18:11:35 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2012-04-04 18:11:35 +0000 |
| commit | 5a10f08b52eb8f6a9bedccd712026c9baae529df (patch) | |
| tree | 94edf3f958f0872da7f3895744a83c82361d3f8b /clang/test/Analysis/malloc-plist.c | |
| parent | b61e809b42156161b17ff1bf805da01499d73b9f (diff) | |
| download | bcm5719-llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.tar.gz bcm5719-llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.zip | |
Include the "issue context" (e.g. function or method) where a static analyzer issue occurred in the plist output.
Fixes <rdar://problem/11004527>
llvm-svn: 154030
Diffstat (limited to 'clang/test/Analysis/malloc-plist.c')
| -rw-r--r-- | clang/test/Analysis/malloc-plist.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Analysis/malloc-plist.c b/clang/test/Analysis/malloc-plist.c index 1e8193021db..db2e0f01e73 100644 --- a/clang/test/Analysis/malloc-plist.c +++ b/clang/test/Analysis/malloc-plist.c @@ -306,6 +306,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'p'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>diagnosticTest</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>14</integer> @@ -465,6 +467,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'A'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>myArrayAllocation</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>21</integer> @@ -862,6 +866,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'buf'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>reallocDiagnostics</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>28</integer> @@ -1258,6 +1264,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'buf'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>test_wrapper</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>45</integer> @@ -1775,6 +1783,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Use of memory after it is freed</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Use-after-free</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>test_double_action_call</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>61</integer> @@ -2346,6 +2356,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'buf'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>reallocIntra</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>76</integer> @@ -2611,6 +2623,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'v'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>use_ret</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>86</integer> @@ -2785,6 +2799,8 @@ void LeakedSymbol(int in) { // CHECK: <key>description</key><string>Memory is never released; potential leak of memory pointed to by 'm'</string> // CHECK: <key>category</key><string>Memory Error</string> // CHECK: <key>type</key><string>Memory leak</string> +// CHECK: <key>issue_context_kind</key><string>function</string> +// CHECK: <key>issue_context</key><string>LeakedSymbol</string> // CHECK: <key>location</key> // CHECK: <dict> // CHECK: <key>line</key><integer>97</integer> @@ -2795,3 +2811,4 @@ void LeakedSymbol(int in) { // CHECK: </array> // CHECK: </dict> // CHECK: </plist> + |

