3

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?

Clay Bridges
  • 11,602
  • 10
  • 68
  • 118

1 Answers1

0

As of these commits (around July 2019), clang-format apparently does support NS_CLOSED_ENUM.

Clay Bridges
  • 11,602
  • 10
  • 68
  • 118