As of Xcode 10.2, there is a new macro for specifying enums in Objective-C, NS_CLOSED_ENUM
. Using this in place of NS_ENUM
is required, to allow those enums to be used in Swift, as if they were declared in Swift (meaning without either requiring an @unknown
handler in switch statements, or getting a warning). See here for more.
It appears that clang-format has not caught up to this new reality, and won't recognize
typedef NS_CLOSED_ENUM(...
the same as it does
typedef NS_ENUM(...
Is this true?