From 2b6b257f4e5503a7a2675bdb8735693db769f75c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:44:14 +0000 Subject: Vendor import of clang release_39 branch r276489: https://llvm.org/svn/llvm-project/cfe/branches/release_39@276489 --- test/SemaObjC/ovl-check.m | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/SemaObjC/ovl-check.m') 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, -- cgit v1.3