aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/malloc.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/malloc.m')
-rw-r--r--test/Analysis/malloc.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Analysis/malloc.m b/test/Analysis/malloc.m
index ad16db52dff9..9201c2b75fe6 100644
--- a/test/Analysis/malloc.m
+++ b/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