[PATCH] D89425: [Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 15 04:46:56 PDT 2021


MyDeveloperDay added a comment.

After this change, this

  FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
      NS_SWIFT_NAME(InstanceIDScopeFirebaseMessaging) DEPRECATED_ATTRIBUTE;
  
  typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
    /** HTTP Method GET */
    FIRHTTPMethodGET NS_SWIFT_NAME(get),
    /** HTTP Method PUT */
    FIRHTTPMethodPUT NS_SWIFT_NAME(put),
    /** HTTP Method POST */
    FIRHTTPMethodPOST NS_SWIFT_NAME(post),
    /** HTTP Method DELETE */
    FIRHTTPMethodDELETE NS_SWIFT_NAME(delete),
    /** HTTP Method HEAD */
    FIRHTTPMethodHEAD NS_SWIFT_NAME(head),
    /** HTTP Method PATCH */
    FIRHTTPMethodPATCH NS_SWIFT_NAME(patch),
    /** HTTP Method OPTIONS */
    FIRHTTPMethodOPTIONS NS_SWIFT_NAME(options),
    /** HTTP Method TRACE */
    FIRHTTPMethodTRACE NS_SWIFT_NAME(trace),
    /** HTTP Method CONNECT */
    FIRHTTPMethodCONNECT NS_SWIFT_NAME(connect)
  } NS_SWIFT_NAME(HTTPMethod);

is formatted as

  FOUNDATION_EXPORT NSString *const
      kFIRInstanceIDScopeFirebaseMessaging NS_SWIFT_NAME(InstanceIDScopeFirebaseMe
  ssaging) DEPRECATED_ATTRIBUTE;
  
  typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
    /** HTTP Method GET */
    FIRHTTPMethodGET NS_SWIFT_NAME(get),
        /** HTTP Method PUT */
        FIRHTTPMethodPUT NS_SWIFT_NAME(put),
            /** HTTP Method POST */
            FIRHTTPMethodPOST NS_SWIFT_NAME(post),
                /** HTTP Method DELETE */
                FIRHTTPMethodDELETE NS_SWIFT_NAME(delete),
                    /** HTTP Method HEAD */
                    FIRHTTPMethodHEAD NS_SWIFT_NAME(head),
                        /** HTTP Method PATCH */
                        FIRHTTPMethodPATCH NS_SWIFT_NAME(patch),
                            /** HTTP Method OPTIONS */
                            FIRHTTPMethodOPTIONS NS_SWIFT_NAME(options),
                                /** HTTP Method TRACE */
                                FIRHTTPMethodTRACE NS_SWIFT_NAME(trace),
                                    /** HTTP Method CONNECT */
                                    FIRHTTPMethodCONNECT NS_SWIFT_NAME(connect)
                                } NS_SWIFT_NAME(HTTPMethod);

This is logged as  https://bugs.llvm.org/show_bug.cgi?id=49995


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89425/new/

https://reviews.llvm.org/D89425



More information about the cfe-commits mailing list