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

[SR-10522] Renaming parameters to avoid C(++) keywords means doc comments don't match up anymore #52922

Open
belkadan opened this issue Apr 19, 2019 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself PrintAsClang Area → compiler: The PrintAsClang library

Comments

@belkadan
Copy link
Contributor

Previous ID SR-10522
Radar rdar://problem/50010552
Original Reporter @belkadan
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler, Source Tooling
Labels Bug, PrintAsObjC
Assignee None
Priority Medium

md5: 364cc7f801ac27ba79b26793c19549c9

Issue Description:

If you have this code in Swift:

import Foundation
public class Templateer: NSObject {
  /**
  Do something with template

  - parameter template: the template
  */
  @objc public func doSomething(template: String) {}
}

it'll end up putting this in the ObjC generated header:

/// Do something with template
/// \param template the template
///
- (void)doSomethingWithTemplate:(NSString * _Nonnull)template_;

The parameter name "template" got renamed to "template_", but the docs didn't get updated. Either PrintAsObjC's printDocumentationComment should account for this, or ide::getDocumentationCommentAsDoxygen should assume it needs to do the same kind of escaping that PrintAsObjC does. (The first is probably better.)

@belkadan
Copy link
Contributor Author

"Not quite a Starter Bug". Should we have a label for those too?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself PrintAsClang Area → compiler: The PrintAsClang library
Projects
None yet
Development

No branches or pull requests

1 participant