Skip to content

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

@friedbunny

Description

@friedbunny

#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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions