diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-20 17:14:09 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-20 17:14:09 +0000 |
| commit | a644f9cb73a1b7744d023dfc56dbcf49ab2838c5 (patch) | |
| tree | 96adec8faa25be20251ce2f110bc961b9ae70c83 /clang/test | |
| parent | 65080cc55c97c923153c2d740bf7f6fcf4b66968 (diff) | |
| download | bcm5719-llvm-a644f9cb73a1b7744d023dfc56dbcf49ab2838c5.tar.gz bcm5719-llvm-a644f9cb73a1b7744d023dfc56dbcf49ab2838c5.zip | |
arc-objc++: Issue an arc specific diagnostic when overload resolution
fails because of lifetime differences of parameter and argument type.
// rdar://9790531
llvm-svn: 135593
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaObjCXX/arc-overloading.mm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/arc-overloading.mm b/clang/test/SemaObjCXX/arc-overloading.mm index 06b332cec85..ae63aaceeb6 100644 --- a/clang/test/SemaObjCXX/arc-overloading.mm +++ b/clang/test/SemaObjCXX/arc-overloading.mm @@ -173,3 +173,22 @@ void test_f9() { const __autoreleasing id& ar3 = unsafe_unretained_a; const __autoreleasing id& ar4 = weak_a; } + +// rdar://9790531 +void f9790531(void *inClientData); // expected-note {{candidate function not viable: cannot implicitly convert argument of type 'MixerEQGraphTestDelegate *const __strong' to 'void *' for 1st argument under ARC}} +void f9790531_1(struct S*inClientData); // expected-note {{candidate function not viable}} +void f9790531_2(char * inClientData); // expected-note {{candidate function not viable}} + +@class UIApplication; + +@interface MixerEQGraphTestDelegate +- (void)applicationDidFinishLaunching; +@end + +@implementation MixerEQGraphTestDelegate +- (void)applicationDidFinishLaunching { + f9790531(self); // expected-error {{no matching function for call to 'f9790531'}} + f9790531_1(self); // expected-error {{no matching function for call to 'f9790531_1'}} + f9790531_2(self); // expected-error {{no matching function for call to 'f9790531_2'}} +} +@end |

