[PATCH] D92354: [clang] add a new `swift_attr` attribute

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 11:53:49 PST 2020


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:2153
+def SwiftAttr : InheritableAttr {
+  let Spellings = [Clang<"swift_attr">];
+  let Args = [StringArgument<"Attribute">];
----------------
The other swift attributes use a GNU spelling and don't expose any C++ spelling. Should this follow suit (or should the other attributes be updated)?


================
Comment at: clang/include/clang/Basic/AttrDocs.td:3635
+  let Content = [{
+The ``swift_attr`` provides a Swift-specific annotation for the declaration
+to which the attribute appertains to. This kind of annotation is ignored by
----------------
What declarations does this attribute appertain to?


================
Comment at: clang/include/clang/Basic/AttrDocs.td:3637
+to which the attribute appertains to. This kind of annotation is ignored by
+clang as it doesn't have any semantic meaning in languages supported by clang.
+The Swift compiler can interpret these annotations according to its own rules
----------------
clang -> Clang


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92354/new/

https://reviews.llvm.org/D92354



More information about the cfe-commits mailing list