// RUN: %clang_cc1 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify -fblocks -Wno-objc-root-class %s
// Simple ownership conversions + diagnostics.
int &; // expected-note{{candidate function not viable: 1st argument ('__weak id *') has __weak ownership, but parameter has __strong ownership}}
void
// Simple overloading
int &;
float &;
void
// Simple overloading
int &; // expected-note{{candidate function}}
float &; // expected-note{{candidate function}}
void
// Writeback conversion
int &; // expected-note{{candidate function not viable: 1st argument ('__unsafe_unretained id *') has __unsafe_unretained ownership, but parameter has __autoreleasing ownership}}
void
// Writeback conversion vs. no conversion
int &;
float &;
void
// Writeback conversion vs. other conversion.
int &;
float &;
void
int &;
float &;
void
// Reference binding
void ; // expected-note{{candidate function not viable: 1st argument ('__weak id') has __weak ownership, but parameter has __strong ownership}} \
// expected-note{{candidate function not viable: 1st argument ('__autoreleasing id') has __autoreleasing ownership, but parameter has __strong ownership}} \
// expected-note{{candidate function not viable: 1st argument ('__unsafe_unretained id') has __unsafe_unretained ownership, but parameter has __strong ownership}}
void
void ;
void
int &;
float &;
void
int &; // expected-note 2{{not viable: no known conversion}}
float &; // expected-note 2{{not viable: no known conversion}}
void
int &; // expected-note {{not viable: 1st argument ('__weak id *') has __weak ownership, but parameter has __strong ownership}}
float &; // expected-note {{not viable: 1st argument ('__weak id *') has __weak ownership, but parameter has __autoreleasing ownership}}
void
// rdar://9790531
void ; // expected-note {{candidate function not viable: cannot implicitly convert argument of type 'MixerEQGraphTestDelegate *const __strong' to 'void *' for 1st argument under ARC}}
void ; // expected-note {{candidate function not viable}}
void ; // expected-note {{candidate function not viable}}
@class UIApplication;
;
id // okay: merged down
id // expected-error{{function declared with 'ns_returns_retained' attribute was previously declared without the 'ns_returns_retained' attribute}}