Skip to content
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

Parse replacement parameter of __attribute__((deprecated(...)) #1072

Open
friedbunny opened this issue May 16, 2019 · 3 comments
Open

Parse replacement parameter of __attribute__((deprecated(...)) #1072

friedbunny opened this issue May 16, 2019 · 3 comments

Comments

@friedbunny
Copy link
Collaborator

friedbunny commented May 16, 2019

#843 covered parsing the message parameter of the deprecated __attribute__, but clang/Xcode also support a second argument named replacement, which takes a method/property signature and prompts the developer via fix-it in Xcode.

If there’s sourcekit(ten) support for replacement, it would be ideal to include the specified replacement and linkify it.

Example usage:

@property SomeClass someProperty __attribute__((deprecated("Whatever this property did is no longer supported.", "someImprovedProperty")));

Would result in jazzy output similar to:

Screen Shot 2019-05-16 at 4 28 39 PM

@johnfairh
Copy link
Collaborator

johnfairh commented May 17, 2019

libclang doesn't expose the 'replacement' part at all so this is trickier than the rest of deprecated support was.

@chwastek
Copy link

chwastek commented Jul 9, 2019

I'm not sure... does it work after all or not?

@johnfairh
Copy link
Collaborator

No, there've been no sourcekitten/jazzy changes made for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants