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
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
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
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
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
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
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
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
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
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);
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
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
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
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
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
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],
+
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
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/Attr.td:2174
+ ObjCInterface, ObjCClassMethod, ObjCInstanceMethod,
ObjCProperty, ObjCProtocol],
+ ErrorDiag, "ExpectedSwiftNameSubjects">;
+ let Documentation = [SwiftNameDocs];
--
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],
+
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
20 matches
Mail list logo