diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
| commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
| tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/SemaObjC/ovl-check.m | |
| parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) | |
Notes
Diffstat (limited to 'test/SemaObjC/ovl-check.m')
| -rw-r--r-- | test/SemaObjC/ovl-check.m | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/SemaObjC/ovl-check.m b/test/SemaObjC/ovl-check.m index 7fc8a64049116..cc2f094ad2ead 100644 --- a/test/SemaObjC/ovl-check.m +++ b/test/SemaObjC/ovl-check.m @@ -4,20 +4,24 @@ // in overload resolution in ObjC. struct Type1 { int a; }; +typedef const __attribute__((objc_bridge(id))) void * CFTypeRef; @interface Iface1 @end @interface NeverCalled - (void) test:(struct Type1 *)arg; +- (void) test2:(CFTypeRef)arg; @end @interface TakesIface1 - (void) test:(Iface1 *)arg; +- (void) test2:(Iface1 *)arg; @end // PR26085, rdar://problem/24111333 void testTakesIface1(id x, Iface1 *arg) { // This should resolve silently to `TakesIface1`. [x test:arg]; + [x test2:arg]; } @class NSString; @@ -36,17 +40,16 @@ void testTakesNSString(id x) { [x testStr:"someStringLiteral"]; } -typedef const void *CFTypeRef; id CreateSomething(); -@interface NeverCalledv3 -- (void) testCFTypeRef:(struct Type1 *)arg; -@end - @interface TakesCFTypeRef - (void) testCFTypeRef:(CFTypeRef)arg; @end +@interface NeverCalledv3 +- (void) testCFTypeRef:(struct Type1 *)arg; +@end + // Not called out explicitly by PR26085, but related. void testTakesCFTypeRef(id x) { // Overload resolution should occur silently, select the CFTypeRef overload, |
