Page MenuHomePhabricator

Support Swift in platform availability attribute

Authored by michaelwu on Aug 5 2018, 4:06 PM.



This adds support for Swift platform availability attributes. It's largely a port of the changes made to for Swift availability attributes. Specifically, and . The implementation of attribute_availability_swift is a little different and additional tests in test/Index/availability.c were added.

Diff Detail

rC Clang

Event Timeline

michaelwu created this revision.Aug 5 2018, 4:06 PM

Review ping

aaron.ballman accepted this revision.Nov 1 2018, 8:18 AM
aaron.ballman added a subscriber: aaron.ballman.

LGTM aside from a few small nits.


You can use Platform->Ident->isStr("swift") here instead.


Might as well switch the logic around to using isValid() instead.


II->isStr() here as well.

This revision is now accepted and ready to land.Nov 1 2018, 8:18 AM
michaelwu updated this revision to Diff 173607.Nov 11 2018, 6:37 PM

Thanks for the review! All requested changes have been made, and I also had to fix a test due to D50214

michaelwu marked 3 inline comments as done.Nov 11 2018, 6:38 PM
This revision was automatically updated to reflect the committed changes.