return UnknownVal();
// Check for casts from integers to integers.
- if (castTy->isIntegerType() && originalTy->isIntegerType())
- return evalCastFromNonLoc(cast<NonLoc>(val), castTy);
+ if (castTy->isIntegerType() && originalTy->isIntegerType()) {
+ if (isa<Loc>(val))
+ // This can be a cast to ObjC property of type int.
+ return evalCastFromLoc(cast<Loc>(val), castTy);
+ else
+ return evalCastFromNonLoc(cast<NonLoc>(val), castTy);
+ }
// Check for casts from pointers to integers.
if (castTy->isIntegerType() && Loc::isLocType(originalTy))
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 {
+ AIMediaTypeAudio,
+ AIMediaTypeVideo
+} AIMediaType;
+@interface AIMedia : NSObject {
+ AIMediaType mediaType;
+}
+@property (readwrite, nonatomic) AIMediaType mediaType;
+static void
+adium_media_ready_cb(AIMedia *adiumMedia, const char *sid)
+{
+ adiumMedia.mediaType |= AIMediaTypeVideo;
+}
+@end
\ No newline at end of file