Skip to content

Commit 1a5777d

Browse files
committed
Fix test failure on Windows
1 parent 1ce9dc0 commit 1a5777d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/test/SemaObjCXX/arc-type-conversion.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clang_cc1 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -verify -fblocks %s
22

33
@class NSString;
4+
typedef unsigned __INTPTR_TYPE__ uintptr_t;
45

56
void * cvt(id arg) // expected-note{{candidate function not viable: cannot convert argument of incomplete type 'void *' to '__strong id'}}
67
{
@@ -82,8 +83,8 @@ void test_reinterpret_cast(__strong id *sip, __weak id *wip,
8283
(void)reinterpret_cast<unsigned long *>(csip); // expected-error {{reinterpret_cast from '__strong id const *' to 'unsigned long *' casts away qualifiers}}
8384
const unsigned long *p2 = nullptr;
8485
(void)reinterpret_cast<__strong id *>(p2); // expected-error {{reinterpret_cast from 'const unsigned long *' to '__strong id *' casts away qualifiers}}
85-
auto ul = reinterpret_cast<unsigned long>(sip);
86-
(void)reinterpret_cast<__strong id *>(ul); // expected-error {{cast of 'unsigned long' to '__strong id *' is disallowed with ARC}}
86+
auto uip = reinterpret_cast<uintptr_t>(sip);
87+
(void)reinterpret_cast<__strong id *>(uip); // expected-error {{to '__strong id *' is disallowed with ARC}}
8788
}
8889

8990
void test_cstyle_cast(__strong id *sip, __weak id *wip,

0 commit comments

Comments
 (0)