Skip to content

[nfc][cxx-interop] Remove NS(U)Integer typedefs from a test. #66646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions test/Interop/Cxx/enum/Inputs/c-enums-NS_OPTIONS.h
Original file line number Diff line number Diff line change
@@ -20,16 +20,13 @@ extern "C" {
#define NS_REFINED_FOR_SWIFT __attribute__((swift_private))
#define UIKIT_EXTERN extern "C" __attribute__((visibility("default")))

typedef unsigned long NSUInteger;
typedef long NSInteger;

typedef NS_OPTIONS(NSUInteger, NSBinarySearchingOptions) {
typedef NS_OPTIONS(unsigned long, NSBinarySearchingOptions) {
NSBinarySearchingFirstEqual = (1UL << 8),
NSBinarySearchingLastEqual = (1UL << 9),
NSBinarySearchingInsertionIndex = (1UL << 10),
};

typedef NS_OPTIONS(NSUInteger, NSAttributedStringFormattingOptions) {
typedef NS_OPTIONS(unsigned long, NSAttributedStringFormattingOptions) {
NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1 << 0,
NSAttributedStringFormattingApplyReplacementIndexAttribute = 1 << 1,
} NS_REFINED_FOR_SWIFT;
@@ -45,7 +42,7 @@ typedef NS_OPTIONS(NSUInteger, NSAttributedStringFormattingOptions) {
UIKIT_EXTERN
@interface UIPrinter

typedef NS_OPTIONS(NSInteger, UIPrinterJobTypes) {
typedef NS_OPTIONS(long, UIPrinterJobTypes) {
UIPrinterJobTypeUnknown = 0,
UIPrinterJobTypeDocument = 1 << 0,
UIPrinterJobTypeEnvelope = 1 << 1,
@@ -60,7 +57,7 @@ typedef NS_OPTIONS(NSInteger, UIPrinterJobTypes) {
@end
}

typedef NS_OPTIONS(NSUInteger, Foo) {
typedef NS_OPTIONS(unsigned long, Foo) {
NS_SWIFT_NAMED_OptionOne __attribute__((swift_name("SwiftOptionOne"))) = 0,
NS_SWIFT_NAMED_OptionTwo __attribute__((swift_name("SwiftOptionTwo"))) = 1
<< 0,
@@ -71,15 +68,15 @@ typedef NS_OPTIONS(NSUInteger, Foo) {
NS_SWIFT_NAMED_OptionTwo
};

typedef NS_OPTIONS(NSUInteger, Bar) {
typedef NS_OPTIONS(unsigned long, Bar) {
API_NOTES_NAMED_OptionOne = 0,
API_NOTES_NAMED_OptionTwo = 1 << 0,
API_NOTES_NAMED_OptionThree = 1 << 1,
API_NOTES_NAMED_OptionFour = API_NOTES_NAMED_OptionOne |
API_NOTES_NAMED_OptionTwo
};

typedef NS_OPTIONS(NSUInteger, Baz) { Baz1, Baz2 };
typedef NS_OPTIONS(unsigned long, Baz) { Baz1, Baz2 };

struct HasNSOptionField {
Bar bar;