[cfe-commits] r77486 - /cfe/trunk/test/Analysis/misc-ps-xfail.m
Ted Kremenek
kremenek at apple.com
Wed Jul 29 11:19:16 PDT 2009
Author: kremenek
Date: Wed Jul 29 13:19:16 2009
New Revision: 77486
URL: http://llvm.org/viewvc/llvm-project?rev=77486&view=rev
Log:
Add an XFAILed test case that currently crashes for RegionStore. This case will
be moved to misc-ps.m when it passes.
Added:
cfe/trunk/test/Analysis/misc-ps-xfail.m
Added: cfe/trunk/test/Analysis/misc-ps-xfail.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-xfail.m?rev=77486&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-xfail.m (added)
+++ cfe/trunk/test/Analysis/misc-ps-xfail.m Wed Jul 29 13:19:16 2009
@@ -0,0 +1,66 @@
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -analyzer-constraints=basic --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -analyzer-constraints=range --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s
+// XFAIL
+typedef struct objc_ivar *Ivar;
+typedef struct objc_selector *SEL;
+typedef signed char BOOL;
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+typedef struct _NSZone NSZone;
+ at class NSInvocation, NSArray, NSMethodSignature, NSCoder, NSString, NSEnumerator;
+ at protocol NSObject
+- (BOOL)isEqual:(id)object;
+- (id)autorelease;
+ at end
+ at protocol NSCopying
+- (id)copyWithZone:(NSZone *)zone;
+ at end
+ at protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone; @end
+ at protocol NSCoding
+- (void)encodeWithCoder:(NSCoder *)aCoder;
+ at end
+ at interface NSObject <NSObject> {}
+- (id)init;
++ (id)allocWithZone:(NSZone *)zone;
+ at end
+extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
+ at interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
+- (NSUInteger)length;
++ (id)stringWithUTF8String:(const char *)nullTerminatedCString;
+ at end extern NSString * const NSBundleDidLoadNotification;
+ at interface NSValue : NSObject <NSCopying, NSCoding>
+- (void)getValue:(void *)value;
+ at end
+ at interface NSNumber : NSValue
+- (char)charValue;
+- (id)initWithBool:(BOOL)value;
+ at end
+ at interface NSAssertionHandler : NSObject {}
++ (NSAssertionHandler *)currentHandler;
+- (void)handleFailureInMethod:(SEL)selector object:(id)object file:(NSString *)fileName lineNumber:(NSInteger)line description:(NSString *)format,...;
+ at end
+extern NSString * const NSConnectionReplyMode;
+typedef float CGFloat;
+typedef struct _NSPoint {
+ CGFloat x;
+ CGFloat y;
+} NSPoint;
+typedef struct _NSSize {
+ CGFloat width;
+ CGFloat height;
+} NSSize;
+typedef struct _NSRect {
+ NSPoint origin;
+ NSSize size;
+} NSRect;
+
+// *** This case currently crashes for RegionStore ***
+// Reduced from a crash involving the cast of an Objective-C symbolic region to
+// 'char *'
+static NSNumber *test_ivar_offset(id self, SEL _cmd, Ivar inIvar) {
+ return [[[NSNumber allocWithZone:((void*)0)] initWithBool:*(_Bool *)((char *)self + ivar_getOffset(inIvar))] autorelease];
+}
More information about the cfe-commits
mailing list