We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2c3c69 commit 650ebebCopy full SHA for 650ebeb
include/swift/ABI/Metadata.h
@@ -1645,7 +1645,11 @@ class TargetProtocolDescriptorRef {
1645
assert(!isObjC());
1646
#endif
1647
1648
- return reinterpret_cast<ProtocolDescriptorPointer>(storage & ~IsObjCBit);
+ // NOTE: we explicitly use a C-style cast here because cl objects to the
1649
+ // reinterpret_cast from a uintptr_t type to an unsigned type which the
1650
+ // Pointer type may be depending on the instantiation. Using the C-style
1651
+ // cast gives us a single path irrespective of the template type parameters.
1652
+ return (ProtocolDescriptorPointer)(storage & ~IsObjCBit);
1653
}
1654
1655
/// Retrieve the raw stored pointer and discriminator bit.
0 commit comments