[cfe-commits] r65085 - /cfe/trunk/test/Analysis/rdar-6562655.m
Ted Kremenek
kremenek at apple.com
Thu Feb 19 16:10:09 PST 2009
Author: kremenek
Date: Thu Feb 19 18:10:09 2009
New Revision: 65085
URL: http://llvm.org/viewvc/llvm-project?rev=65085&view=rev
Log:
Add test case for <rdar://problem/6562655>.
Added:
cfe/trunk/test/Analysis/rdar-6562655.m
Added: cfe/trunk/test/Analysis/rdar-6562655.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/rdar-6562655.m?rev=65085&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/rdar-6562655.m (added)
+++ cfe/trunk/test/Analysis/rdar-6562655.m Thu Feb 19 18:10:09 2009
@@ -0,0 +1,63 @@
+// RUN: clang -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s
+//
+// This test case mainly checks that the retain/release checker doesn't crash
+// on this file.
+//
+typedef int int32_t;
+typedef signed char BOOL;
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+typedef struct _NSZone NSZone;
+ at class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
+ at protocol NSObject - (BOOL)isEqual:(id)object;
+ at end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone;
+ at end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder;
+ at end @interface NSObject <NSObject> {}
+ at end extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
+ at interface NSResponder : NSObject <NSCoding> {}
+ at end @protocol NSAnimatablePropertyContainer - (id)animator;
+ at end extern NSString *NSAnimationTriggerOrderIn ;
+ at interface NSView : NSResponder <NSAnimatablePropertyContainer> {
+}
+ at end enum {
+NSNullCellType = 0, NSTextCellType = 1, NSImageCellType = 2 };
+typedef struct __CFlags {
+ unsigned int botnet:3;
+}
+ _CFlags;
+ at interface Bar : NSObject <NSCopying, NSCoding> {
+ _CFlags _cFlags;
+ at private id _support;
+}
+ at end extern NSString *NSControlTintDidChangeNotification;
+typedef NSInteger NSBotnet;
+ at interface NSControl : NSView {
+}
+ at end @class NSAttributedString, NSFont, NSImage, NSSound;
+typedef int32_t Baz;
+ at interface Bar(BarInternal) - (void)_setIsWhite:(BOOL)isWhite;
+ at end
+ at interface Bar (BarBotnetCompatibility)
+- (NSBotnet)_initialBotnetZorg;
+ at end
+typedef struct _NSRunArrayItem {
+ unsigned int botnetIsSet:1;
+} BarAuxFlags;
+ at interface BarAuxiliary : NSObject {
+ at public
+ NSControl *controlView;
+ BarAuxFlags auxCFlags;
+}
+ at end
+ at implementation Bar
+static Baz Qux = 0;
+- (id)copyWithZone:(NSZone *)zone {}
+- (void)encodeWithCoder:(NSCoder *)coder {}
+ at end
+ at implementation Bar (BarBotnet)
+- (NSBotnet)botnet {
+ if (!(*(BarAuxiliary **)&self->_support)->auxCFlags.botnetIsSet) {
+ _cFlags.botnet = [self _initialBotnetZorg];
+ }
+}
+ at end
More information about the cfe-commits
mailing list