summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/retain-release.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/retain-release.m')
-rw-r--r--clang/test/Analysis/retain-release.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Analysis/retain-release.m b/clang/test/Analysis/retain-release.m
index ed9f6617047..4a079055c56 100644
--- a/clang/test/Analysis/retain-release.m
+++ b/clang/test/Analysis/retain-release.m
@@ -632,6 +632,25 @@ void test_RDar6859457(RDar6859457 *x, void *bytes, NSUInteger dataLength) {
}
//===----------------------------------------------------------------------===//
+// <rdar://problem/6893565> don't flag leaks for return types that cannot be
+// determined to be CF types
+//===----------------------------------------------------------------------===//
+
+// We don't know if 'struct s6893565' represents a Core Foundation type, so
+// we shouldn't emit an error here.
+typedef struct s6893565* TD6893565;
+
+@interface RDar6893565 {}
+-(TD6893565)newThing;
+@end
+
+@implementation RDar6893565
+-(TD6893565)newThing {
+ return (TD6893565) [[NSString alloc] init]; // no-warning
+}
+@end
+
+//===----------------------------------------------------------------------===//
// Tests of ownership attributes.
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud