This is an archive of the discontinued LLVM Phabricator instance.

[SemaObjC] Fix composite pointer type calculation for `void*` and pointer to lifetime qualified ObjC pointer type
ClosedPublic

Authored by erik.pilkington on Oct 15 2020, 8:18 AM.

Details

Summary

This fixes a regression introduced in 9a6f4d451ca7aa06b94a407015fbadb456bc09ef:

void f() {
  NSString *__strong* sptr;
  void *vptr;
  vptr == sptr; // new error: incompatible pointer types
}

We're now erroring out on this code because FindCompositePointerType is rejecting the qualifier mismatch between void and NSString *__strong after stripping one level of pointer types.

rdar://70101809

Diff Detail

Event Timeline

erik.pilkington requested review of this revision.Oct 15 2020, 8:18 AM
This revision is now accepted and ready to land.Oct 15 2020, 10:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2020, 12:21 PM