Skip to content

Backport compatibility macro fixes to 5.8 #63995

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 4 commits into from
Mar 6, 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
6 changes: 3 additions & 3 deletions include/swift/PrintAsClang/ClangMacros.def
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ CLANG_MACRO_BODY("SWIFT_CLASS", \
"SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) " \
"SWIFT_CLASS_EXTRA\n" \
"# define SWIFT_CLASS_NAMED(SWIFT_NAME) " \
"__attribute((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) " \
"__attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) " \
"SWIFT_CLASS_EXTRA\n" \
"# else\n" \
"# define SWIFT_CLASS(SWIFT_NAME) " \
Expand Down Expand Up @@ -175,7 +175,7 @@ CLANG_MACRO_CONDITIONAL("SWIFT_ENUM_ATTR", "(_extensibility)", \
CLANG_MACRO_BODY("SWIFT_ENUM", \
"# define SWIFT_ENUM(_type, _name, _extensibility) " \
"enum _name : _type _name; " \
"enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name: _type\n" \
"enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type\n" \
"# if __has_feature(generalized_swift_name)\n" \
"# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) " \
"enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); " \
Expand All @@ -197,7 +197,7 @@ CLANG_MACRO("SWIFT_DEPRECATED", , "__attribute__((deprecated))")
CLANG_MACRO("SWIFT_DEPRECATED_MSG", "(...)", "__attribute__((deprecated(__VA_ARGS__)))")

CLANG_MACRO_ALTERNATIVE("SWIFT_DEPRECATED_OBJC", "(Msg)", \
"__has_feature(attribute_diagnost_if_objc)", \
"__has_feature(attribute_diagnose_if_objc)", \
"__attribute__((diagnose_if(1, Msg, \"warning\")))", \
"SWIFT_DEPRECATED_MSG(Msg)")

Expand Down