diff options
Diffstat (limited to 'test/Analysis/casts.m')
-rw-r--r-- | test/Analysis/casts.m | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/test/Analysis/casts.m b/test/Analysis/casts.m index d073dff963fc..d9700fe5c754 100644 --- a/test/Analysis/casts.m +++ b/test/Analysis/casts.m @@ -1,5 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental -analyzer-store=basic -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,core.experimental -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -verify %s // Test function pointer casts. Currently we track function addresses using // loc::FunctionVal. Because casts can be arbitrary, do we need to model @@ -20,3 +19,23 @@ void* test2(void *p) { MyFuncTest1 fp = (MyFuncTest1) p; return (*fp)(); } + +// <radar://10087620> +// A cast from int onjective C property reference to int. +typedef signed char BOOL; +@protocol NSObject - (BOOL)isEqual:(id)object; @end +@interface NSObject <NSObject> {} - (id)init; @end +typedef enum { + EEOne, + EETwo +} RDR10087620Enum; +@interface RDR10087620 : NSObject { + RDR10087620Enum elem; +} +@property (readwrite, nonatomic) RDR10087620Enum elem; +static void +adium_media_ready_cb(RDR10087620 *InObj) +{ + InObj.elem |= EEOne; +} +@end
\ No newline at end of file |