[cfe-commits] r60721 - in /cfe/trunk/test/Analysis: MissingDealloc.m MissingDealloc_SEL.m

Ted Kremenek kremenek at apple.com
Mon Dec 8 14:01:50 PST 2008


Author: kremenek
Date: Mon Dec  8 16:01:50 2008
New Revision: 60721

URL: http://llvm.org/viewvc/llvm-project?rev=60721&view=rev
Log:
Incorporate MissingDeallc_SEL.m test case into MissingDealloc.m

Removed:
    cfe/trunk/test/Analysis/MissingDealloc_SEL.m
Modified:
    cfe/trunk/test/Analysis/MissingDealloc.m

Modified: cfe/trunk/test/Analysis/MissingDealloc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/MissingDealloc.m?rev=60721&r1=60720&r2=60721&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/MissingDealloc.m (original)
+++ cfe/trunk/test/Analysis/MissingDealloc.m Mon Dec  8 16:01:50 2008
@@ -3,8 +3,11 @@
 @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 @@
   [super dealloc]; 
 }
 @end
+
+//===------------------------------------------------------------------------===
+//  Don't warn about iVars that are selectors.
+
+ at interface TestSELs : NSObject {
+  SEL a;
+  SEL b;
+}
+
+ at end
+
+ at implementation TestSELs // no-warning
+- (id)init {
+  if( (self = [super init]) ) {
+    a = @selector(a);
+    b = @selector(b);
+  }
+
+  return self;
+}
+ at end

Removed: cfe/trunk/test/Analysis/MissingDealloc_SEL.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/MissingDealloc_SEL.m?rev=60720&view=auto

==============================================================================
--- cfe/trunk/test/Analysis/MissingDealloc_SEL.m (original)
+++ cfe/trunk/test/Analysis/MissingDealloc_SEL.m (removed)
@@ -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;
- at protocol NSObject
-- (BOOL)isEqual:(id)object;
- at end
- at interface NSObject <NSObject> {}
-- (id)init;
- at end
-
- at interface TestSELs : NSObject {
-  SEL a;
-  SEL b;
-}
-
- at end
-
- at implementation TestSELs // no-warning
-- (id)init {
-  if( (self = [super init]) ) {
-    a = @selector(a);
-    b = @selector(b);
-  }
-
-  return self;
-}
- at end





More information about the cfe-commits mailing list