summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis-Apple/CFString.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis-Apple/CFString.c')
-rw-r--r--clang/test/Analysis-Apple/CFString.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/clang/test/Analysis-Apple/CFString.c b/clang/test/Analysis-Apple/CFString.c
deleted file mode 100644
index ebd9275e105..00000000000
--- a/clang/test/Analysis-Apple/CFString.c
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: clang -checker-cfref -verify %s
-
-#include <CoreFoundation/CFString.h>
-#include <CoreFoundation/CFArray.h>
-
-void f1() {
-
- // Create the array.
- CFMutableArrayRef A = CFArrayCreateMutable(NULL, 10, &kCFTypeArrayCallBacks);
-
- // Create a string.
- CFStringRef s1 = CFStringCreateWithCString(NULL, "hello world",
- kCFStringEncodingUTF8);
-
- // Add the string to the array.
- CFArrayAppendValue(A, s1);
-
- // Decrement the reference count.
- CFRelease(s1); // no-warning
-
- // Get the string. We don't own it.
- s1 = (CFStringRef) CFArrayGetValueAtIndex(A, 0);
-
- // Release the array.
- CFRelease(A); // no-warning
-
- // Release the string. This is a bug.
- CFRelease(s1); // expected-warning{{Incorrect decrement of the reference count}}
-}
-
OpenPOWER on IntegriCloud