summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-08 22:01:50 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-08 22:01:50 +0000
commit1f9dd45f577e096797fe123c954b4a43ef6babb7 (patch)
tree24cfde1e357c1ce1689eb81b765a4630f4825ac1
parent8f5c0ede0faef9e34432cae343138680b0c79b9e (diff)
downloadbcm5719-llvm-1f9dd45f577e096797fe123c954b4a43ef6babb7.tar.gz
bcm5719-llvm-1f9dd45f577e096797fe123c954b4a43ef6babb7.zip
Incorporate MissingDeallc_SEL.m test case into MissingDealloc.m
llvm-svn: 60721
-rw-r--r--clang/test/Analysis/MissingDealloc.m24
-rw-r--r--clang/test/Analysis/MissingDealloc_SEL.m30
2 files changed, 24 insertions, 30 deletions
diff --git a/clang/test/Analysis/MissingDealloc.m b/clang/test/Analysis/MissingDealloc.m
index 1a3a408167c..62a53047bc8 100644
--- a/clang/test/Analysis/MissingDealloc.m
+++ b/clang/test/Analysis/MissingDealloc.m
@@ -3,8 +3,11 @@ typedef signed char BOOL;
@protocol NSObject - (BOOL)isEqual:(id)object; @end
@interface NSObject <NSObject> {}
- (void)dealloc;
+- (id)init;
@end
+typedef struct objc_selector *SEL;
+
// <rdar://problem/6380411>: 'myproperty' has kind 'assign' and thus the
// assignment through the setter does not perform a release.
@@ -21,3 +24,24 @@ typedef signed char BOOL;
[super dealloc];
}
@end
+
+//===------------------------------------------------------------------------===
+// Don't warn about iVars that are selectors.
+
+@interface TestSELs : NSObject {
+ SEL a;
+ SEL b;
+}
+
+@end
+
+@implementation TestSELs // no-warning
+- (id)init {
+ if( (self = [super init]) ) {
+ a = @selector(a);
+ b = @selector(b);
+ }
+
+ return self;
+}
+@end
diff --git a/clang/test/Analysis/MissingDealloc_SEL.m b/clang/test/Analysis/MissingDealloc_SEL.m
deleted file mode 100644
index be3e0b7af81..00000000000
--- a/clang/test/Analysis/MissingDealloc_SEL.m
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: clang -warn-objc-missing-dealloc -verify %s
-
-typedef struct objc_selector *SEL;
-typedef signed char BOOL;
-typedef unsigned int NSUInteger;
-typedef struct _NSZone NSZone;
-@protocol NSObject
-- (BOOL)isEqual:(id)object;
-@end
-@interface NSObject <NSObject> {}
-- (id)init;
-@end
-
-@interface TestSELs : NSObject {
- SEL a;
- SEL b;
-}
-
-@end
-
-@implementation TestSELs // no-warning
-- (id)init {
- if( (self = [super init]) ) {
- a = @selector(a);
- b = @selector(b);
- }
-
- return self;
-}
-@end
OpenPOWER on IntegriCloud