// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -fobjc-runtime-has-weak -Wexplicit-ownership-type -verify -Wno-objc-root-class %s
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -fobjc-runtime-has-weak -Wexplicit-ownership-type -verify -Wno-objc-root-class %s
// rdar://10244607
typedef const struct __CFString * CFStringRef;
@class NSString;
NSString *;
typedef NSString * PNSString;
typedef __autoreleasing NSString * AUTORELEASEPNSString;
// rdar://problem/10711456
__strong I *__strong test1; // expected-error {{the type 'I *__strong' is already explicitly ownership-qualified}}
__strong I *; // expected-error {{the type 'I *__strong' is already explicitly ownership-qualified}}
__strong I *; // expected-error {{the type 'I *__strong' is already explicitly ownership-qualified}}
__unsafe_unretained test4;
typedef __strong I *strong_I;
__unsafe_unretained strong_I test5;
// rdar://10907090
typedef void ;
@protocol P;
// rdar://12280826
@class NSMutableDictionary, NSError;
// <rdar://problem/12367446>
typedef __strong id strong_id;
typedef NSObject *NSObject_ptr;
typedef __strong NSObject *strong_NSObject_ptr;
// Warn
__strong id ; // expected-warning{{ARC __strong lifetime qualifier on return type is ignored}}
NSObject __unsafe_unretained *; // expected-warning{{ARC __unsafe_unretained lifetime qualifier on return type is ignored}}
__autoreleasing NSObject *; // expected-warning{{ARC __autoreleasing lifetime qualifier on return type is ignored}}
NSObject * __strong ; // expected-warning{{ARC __strong lifetime qualifier on return type is ignored}}
NSObject_ptr __strong ; // expected-warning{{ARC __strong lifetime qualifier on return type is ignored}}
typedef __strong id ; // expected-warning{{ARC __strong lifetime qualifier on return type is ignored}}
// Don't warn
strong_id ;
strong_NSObject_ptr ;
typedef __strong id ;
// rdar://10127067
void
void
void
@class Test9;
void
void
void