Skip to content

Conversation

@DougGregor
Copy link
Member

@DougGregor DougGregor commented May 24, 2017

Explanation: When available, use Clang's new diagnose_if attribute to mark
Objective-C methods/properties that were generated based on the @objc
inference rules that have been removed from Swift 4. The diagnose_if
warnings aren't likely to be accidentally disabled or hidden by other
deprecated code.
Scope: Affects the Objective-C generated header, used in mixed Swift/ObjC projects, in a backward-compatible way.
Radar: rdar://problem/32370734
Risk: In theory, I could have made an error that makes the generated header unparseable with some combination of Clang build settings, although that seems unlikely.
Testing: Compiler regression testing; verified separately that the generated header, when used in ObjC code, produces the expected warnings that are not sensitive to -Wno-deprecated-decls.

When available, use Clang's new diagnose_if attribute to mark
Objective-C methods/properties that were generated based on the @objc
inference rules that have been removed from Swift 4. The diagnose_if
warnings aren't likely to be accidentally disabled or hidden by other
deprecated code.

Fixes rdar://problem/32370734.

(cherry picked from commit 1063b4b)
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor added this to the Swift 4.0 milestone May 24, 2017
@DougGregor DougGregor changed the title [SE-0160] [PrintAsObjC] Adopt Clang's new diagnose_if attribute. [4.0] [SE-0160] [PrintAsObjC] Adopt Clang's new diagnose_if attribute. May 24, 2017
@xedin xedin self-requested a review May 24, 2017 05:17
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM!

@slavapestov
Copy link
Contributor

LGTM

@tkremenek tkremenek merged commit d021091 into swiftlang:swift-4.0-branch May 24, 2017
@DougGregor DougGregor deleted the se-0160-use-diagnose-if-4.0 branch May 24, 2017 15:28
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.

4 participants