1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.DynamicTypeChecker -verify %s
5 typedef unsigned long NSUInteger;
16 __attribute__((objc_root_class))
17 @interface NSObject <NSObject>
20 @interface NSString : NSObject <NSCopying>
23 @interface NSMutableString : NSString
26 @interface NSNumber : NSObject <NSCopying>
31 void testTypeCheck(NSString* str) {
33 NSNumber *num = obj; // expected-warning {{}}
37 void testForwardDeclarations(NSString* str) {
39 // Do not warn, since no information is available wether MyType is a sub or
40 // super class of any other type.
41 MyType *num = obj; // no warning