]> granicus.if.org Git - clang/commitdiff
Incorporate MissingDealloc_IBOutlet.m test case into MissingDealloc.m
authorTed Kremenek <kremenek@apple.com>
Mon, 8 Dec 2008 22:05:43 +0000 (22:05 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 8 Dec 2008 22:05:43 +0000 (22:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60722 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/MissingDealloc.m
test/Analysis/MissingDealloc_IBOutlet.m [deleted file]

index 62a53047bc844c7dac21b5ea861e7d8ecf8afddf..e6df6f071b82dbd2a9d9cb99590b72363eb8c688 100644 (file)
@@ -45,3 +45,21 @@ typedef struct objc_selector *SEL;
   return self;
 }
 @end
+
+//===------------------------------------------------------------------------===
+//  Don't warn about iVars that are IBOutlets.
+
+#ifndef IBOutlet
+#define IBOutlet
+#endif
+
+@class NSWindow;
+
+@interface HasOutlet : NSObject {
+IBOutlet NSWindow *window;
+}
+@end
+
+@implementation HasOutlet // no-warning
+@end
+
diff --git a/test/Analysis/MissingDealloc_IBOutlet.m b/test/Analysis/MissingDealloc_IBOutlet.m
deleted file mode 100644 (file)
index 4049e79..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: clang -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s --verify
-
-#ifndef IBOutlet
-#define IBOutlet
-#endif
-
-@class NSWindow;
-
-@interface NSObject {}
-- (void)dealloc;
-@end
-
-@interface A : NSObject {
-IBOutlet NSWindow *window;
-}
-@end
-
-@implementation A // no-warning
-@end
-