[cfe-dev] libclang: Merge multiple platform availability declarations
Ronald Wampler via cfe-dev
cfe-dev at lists.llvm.org
Tue May 16 11:16:30 PDT 2017
Hi,
I’m working on a tool to list all deprecated APIs on macOS and using libclang's `clang_getCursorPlatformAvailability`. On macOS 10.12, the APIs are marked (to best of my knowledge) deprecated using the following macro __OSX_DEPRECATED(_start, _dep, _msg)
Which is defined as
__OSX_AVAILABLE(_start) __OS_AVAILABILITY_MSG(macosx,deprecated=_dep,_msg)
These macros expand to something like
__attribute__((availability(macosx,introduced=_start))) __attribute__((availability(macosx,deprecated=_dep,message=_msg)))
This appears to cause `clang_getCursorPlatformAvailability` to populate the array with two separate CXPlatformAvailability instances. Would it not be desirable to merge these two declarations as if it was defined as just __attribute__((availability(macosx,introduced=_start,deprecated=_dep,message=_msg)))?
Thank you,
Ron
More information about the cfe-dev
mailing list