Skip to content

Address review comments for deprecated warning on NSObject.hashValue override #18442

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

Conversation

DougGregor
Copy link
Member

Address the review comments from @jrose-apple and @lorentey on #18407, cleaning up my newly-introduced warning for overriding NSObject.hashValue

Technically, these operations belong in the ObjectiveC module, where NSObject
is defined. Keep them there. However, we need to build the mock ObjectiveC
overlay with `-disable-objc-attr-requires-foundation-module` now.
@DougGregor DougGregor force-pushed the warn-override-nsobject-hashvalue-fixes branch from dc587c1 to f39fe1a Compare August 1, 2018 16:26
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

if (baseVar->getName() == ctx.Id_hashValue &&
classDecl->getName().is("NSObject") &&
(classDecl->getModuleContext()->getName().is("ObjectiveC") ||
classDecl->getModuleContext()->getName().is("Foundation"))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe these two are also KnownIdentifiers. (We're not hugely consistent about what we use those for. Maybe it's less important for checking anyway.)

Copy link
Member Author

Choose a reason for hiding this comment

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

So they are!

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor DougGregor merged commit 7d45ef5 into swiftlang:master Aug 2, 2018
@DougGregor DougGregor deleted the warn-override-nsobject-hashvalue-fixes branch August 2, 2018 16:33
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