[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. compnerd marked 4 inline comments as done. Closed by commit rG9bb5ecf1f760: Sema: introduce `__attribute__((__swift_name__))` (authored by compnerd). Changed prior to

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 8 inline comments as done. compnerd added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3579-3580 + let Content = [{ +The ``swift_name`` attribute provides the spelling for the transformed name when +the interface is imported into the Swift

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-18 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. > This introduces the new swift_name attribute that allows annotating > interfaces with an alternate spelling for Swift. This is used as part > of the importing mechanism to allow interfaces to be imported with a new s/interfaces/APIs

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though you may want to get a second set of eyes on the swift name validation bits for a more thorough review of that part. Comment at: clang/include/clan

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-17 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 292548. compnerd marked 2 inline comments as done. compnerd added a comment. Address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87534/new/ https://reviews.llvm.org/D87534 Files: clang/include/cl

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-17 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 11 inline comments as done. compnerd added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3977 +// Swift attributes. +def warn_attr_swift_name_function aaron.ballman wrote: > I want to make sure we're clear with th

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3582 + +The parameter takes the single string representation of the Swift function name. +The name may be a compound Swift name. For a type, enum constant, property, or The p

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 292369. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87534/new/ https://reviews.llvm.org/D87534 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/include/clang/Basic/Di

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 292368. compnerd added a comment. Change diagnostics for conflicting `swift_name`, add a test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87534/new/ https://reviews.llvm.org/D87534 Files: clang/inclu

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4289 +if (Inline->getName() != Name && !Inline->isImplicit()) { + Diag(Inline->getLocation(), diag::warn_attribute_ignored) << Inline; + Diag(CI.getLoc(), diag::note_conflicting_attribute);

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 292299. compnerd marked 2 inline comments as done. compnerd added a comment. Address everything but warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87534/new/ https://reviews.llvm.org/D87534 Files: cl

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 3 inline comments as done. compnerd added inline comments. Comment at: clang/include/clang/Basic/Attr.td:104 +def ObjCClassMethod +: SubsetSubjectisInstanceMethod()}], aaron.ballman wrote: > This change is no longer needed. Ah, right, I'll m

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:104 +def ObjCClassMethod +: SubsetSubjectisInstanceMethod()}], This change is no longer needed. Comment at: clang/include/clang/Basic/AttrDocs.td:3584 +The

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 292253. compnerd marked an inline comment as done. compnerd added a comment. Address feedback from @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87534/new/ https://reviews.llvm.org/D87534 Files

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 8 inline comments as done. compnerd added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4289 +if (Inline->getName() != Name && !Inline->isImplicit()) { + Diag(Inline->getLocation(), diag::warn_attribute_ignored) << Inline; + Diag(CI.ge

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2173 + SubjectList<[Enum, EnumConstant, Field, Function, GlobalVar, Struct, TypedefName, + ObjCInterface, ObjCClassMethod, ObjCInstanceMethod, ObjCProperty, ObjCProtocol], +

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-14 Thread Doug Gregor via Phabricator via cfe-commits
doug.gregor added a comment. Thank you for doing this! Comment at: clang/include/clang/Basic/Attr.td:2173 + SubjectList<[Enum, EnumConstant, Field, Function, GlobalVar, Struct, TypedefName, + ObjCInterface, ObjCClassMethod, ObjCInstanceMethod, ObjCPrope

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2174 + ObjCInterface, ObjCClassMethod, ObjCInstanceMethod, ObjCProperty, ObjCProtocol], + ErrorDiag, "ExpectedSwiftNameSubjects">; + let Documentation = [SwiftNameDocs]; --

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2173 + SubjectList<[Enum, EnumConstant, Field, Function, GlobalVar, Struct, TypedefName, + ObjCInterface, ObjCClassMethod, ObjCInstanceMethod, ObjCProperty, ObjCProtocol], +

[PATCH] D87534: Sema: introduce `__attribute__((__swift_name__))`

2020-09-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: aaron.ballman. Herald added a project: clang. compnerd requested review of this revision. This introduces the new `swift_name` attribute that allows annotating interfaces with an alternate spelling for Swift. This is used as part of the i