Skip to content

swift-api-digester: diagnose the addition and removal of @objc, @_fixed_layout and @_frozen under ABI mode. #18739

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 2 commits into from
Aug 16, 2018

Conversation

nkcsgexi
Copy link
Contributor

No description provided.

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frozen enums are also relevant.

ABIAttrs.push_back({DeclAttrKind::DAK_ObjC, NodeAnnotation::ObjCChange,
"@objc"});
ABIAttrs.push_back({DeclAttrKind::DAK_FixedLayout,
NodeAnnotation::FixedLayoutChange, "@_fixed_layout"});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you metaprogram these so you're not duplicating attribute names from include/swift/AST/Attrs.def?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to refactor this code piece so we don't need to define these NodeAnnotation at all. That'll be a bigger patch in the next PR or so.

public class C4: NewType {}

@_fixed_layout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better example would be to apply this to a struct not a class. We might decide not to allow it on classes altogether.

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi changed the title swift-api-digester: diagnose the addition and removal of @objc and @_fixed_layout under ABI mode. swift-api-digester: diagnose the addition and removal of @objc, @_fixed_layout and @_frozen under ABI mode. Aug 16, 2018
@nkcsgexi nkcsgexi merged commit 7f2fff6 into swiftlang:master Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants