Support for all remaining availability attributes for all scopes

Description

This task contains loose-ends from .

  1. Research and support other availability macros (including `__OSX_AVAILABLE_STARTING`, `NS_AVAILABLE_IOS`), list them here in JIRA, and support most or all of them.

Find suitable sources to get all commonly used macros, i.e. I've found:
https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Availability.h
https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityInternal.h

2. Research other scopes (like property, enum declarations) where such macros are allowed.

Either support them right away or create a separate task(s) for those cases.

Environment

None

Activity

Show:
Alex Petuschak
September 30, 2020, 2:38 PM

Related: the following sample from https://clang.llvm.org/docs/LanguageExtensions.html#objective-c-available should be supported:

Alex Petuschak
October 5, 2020, 11:32 AM

Rephrasing the original description here.

  1. In , you have added support for deprecated attributes in all scopes.

2. In , we have added support for availability attributes for methods. Similarly to “deprecated“ attributes, availability attributes should be supported in the same scopes as you have covered in SWC-623.

3. After adding support for all scopes, we need to research and include more variations of availability macros that map into Objective-C @available() expression (using Availability*.h as the source, plus feel free to look up other sources online).

At least, variations of macros like `__OSX_AVAILABLE_STARTING`, `NS_AVAILABLE_IOS`, etc should be present for each platform including iOS, macOS, watchOS, tvOS, and possibly iPadOS (see if the iPadOS platform has its own macros or reuses iOS ones).

Assignee

Serhii Kuzmychov

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure