summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/MissingDealloc.m
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-02-25 21:15:16 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-02-25 21:15:16 +0000
commitad9f53e959b7620a02df8a3287c5862d7b5b71f2 (patch)
treed25d553eed9799335a971ed3c441e9e676a20a94 /clang/test/Analysis/MissingDealloc.m
parentbea9698b0e120ad4309ffe0ff3a59987a5eb9c4e (diff)
downloadbcm5719-llvm-ad9f53e959b7620a02df8a3287c5862d7b5b71f2.tar.gz
bcm5719-llvm-ad9f53e959b7620a02df8a3287c5862d7b5b71f2.zip
[analyzer] Reapply r261917 with a fix.
This reapplies "[analyzer] Make ObjCDeallocChecker path sensitive." (r261917) with a fix for an error on some bots about specializing a template from another namespace. llvm-svn: 261929
Diffstat (limited to 'clang/test/Analysis/MissingDealloc.m')
-rw-r--r--clang/test/Analysis/MissingDealloc.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/MissingDealloc.m b/clang/test/Analysis/MissingDealloc.m
index d6af44b895b..ae880546ff9 100644
--- a/clang/test/Analysis/MissingDealloc.m
+++ b/clang/test/Analysis/MissingDealloc.m
@@ -128,6 +128,9 @@ IBOutlet NSWindow *window;
@interface MyClassTest : SenTestCase {
NSString *resourcePath;
}
+
+@property (retain) NSObject *ivar;
+
@end
@interface NSBundle : NSObject {}
@@ -143,4 +146,15 @@ IBOutlet NSWindow *window;
// do something which uses resourcepath
}
@end
+
+//===------------------------------------------------------------------------===
+// Don't warn for clases that aren't subclasses of NSObject
+
+__attribute__((objc_root_class))
+@interface NonNSObjectMissingDealloc
+@property (retain) NSObject *ivar;
+@end
+@implementation NonNSObjectMissingDealloc
+@end
+
// CHECK: 4 warnings generated.
OpenPOWER on IntegriCloud