// RUN: %clang_cc1 -std=c++11 -fsyntax-only %s -verify
@interfaceA- knownMethod;@end@interfaceB- unknownMethod;@end@interfaceC:A- knownMethod;@endtemplate<typename T>structRetainPtr{explicitoperator T*()const;};voidmethodCallToSpecific(RetainPtr<A>a){[a knownMethod];[a unknownMethod];// expected-warning{{'A' may not respond to 'unknownMethod'}}
}voidexplicitCast(RetainPtr<A>a, RetainPtr<B>b, RetainPtr<C>c){(void)(A*)a;(void)(A*)b;// expected-error{{cannot convert 'RetainPtr<B>' to 'A *' without a conversion operator}}
(void)(A*)c;(void)(C*)a;(void)static_cast<A*>(a);(void)static_cast<A*>(b);// expected-error{{cannot convert 'RetainPtr<B>' to 'A *' without a conversion operator}}
(void)static_cast<A*>(c);}structIncomplete;// expected-note{{forward declaration}}
voidmethodCallToIncomplete(Incomplete &incomplete){[incomplete knownMethod];// expected-error{{incomplete receiver type 'Incomplete'}}
}structIdPtr{explicitoperatorid()const;};voidmethodCallToId(IdPtr a){[a knownMethod];[a unknownMethod];}voidexplicitCast(IdPtr a){(void)(A*)a;(void)static_cast<A*>(a);}