This is an archive of the discontinued LLVM Phabricator instance.

[Sema] De-duplicate some availability checking logic
ClosedPublic

Authored by erik.pilkington on Mar 14 2019, 4:06 PM.

Details

Summary

Right now, we emit unavailable errors for calls to functions during overload resolution, and for references to all other declarations in DiagnoseUseOfDecl. The early checks during overload resolution aren't as good as the DiagnoseAvailabilityOfDecl based checks, as they error on the code from PR40991. Fix this by removing the early checking.

llvm.org/PR40991
rdar://48564179

Thanks for taking a look!
Erik

Diff Detail

Repository
rL LLVM

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2019, 4:06 PM
ldionne accepted this revision.Mar 14 2019, 4:45 PM

I can confirm this fixed my original problem. It's also close to the patch I attempted writing myself earlier this week -- but this one is better of course.

This revision is now accepted and ready to land.Mar 14 2019, 4:45 PM
erik.pilkington requested review of this revision.Mar 18 2019, 11:45 AM

I can confirm this fixed my original problem. It's also close to the patch I attempted writing myself earlier this week -- but this one is better of course.

Okay, thanks for testing this out! @rsmith/@aaron.ballman would you mind looking at this one too?

aaron.ballman accepted this revision.Mar 19 2019, 12:44 PM

This seems reasonable to me.

This revision is now accepted and ready to land.Mar 19 2019, 12:44 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2019, 12:26 PM