summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/malloc.m')
-rw-r--r--clang/test/Analysis/malloc.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Analysis/malloc.m b/clang/test/Analysis/malloc.m
index ad16db52dff..9201c2b75fe 100644
--- a/clang/test/Analysis/malloc.m
+++ b/clang/test/Analysis/malloc.m
@@ -49,4 +49,9 @@ void _ArrayCreate() {
void testNSDataTruePositiveLeak() {
char *b = (char *)malloc(12);
NSData *d = [[NSData alloc] initWithBytes: b length: 12]; // expected-warning {{Potential leak of memory pointed to by 'b'}}
+}
+
+id wrapInNSValue() {
+ void *buffer = malloc(4);
+ return [NSValue valueWithPointer:buffer]; // no-warning
} \ No newline at end of file
OpenPOWER on IntegriCloud