aaron.ballman added inline comments.

================
Comment at: clang/include/clang/Basic/Attr.td:2172
+def SwiftNewType : InheritableAttr {
+  // `swift_wrapper` is a "deprecated" alias and kept for compatibility with
+  // shipped toolchains.  New users should prefer the `swift_newtype` spelling.
----------------
Should we make these docs part of the public docs in AttrDocs.td? That's sort 
of what I had in mind with my comment (so that if someone runs into the 
attribute in the wild and wonders what it is, they have a hint).


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5964
+  if (!isa<TypedefNameDecl>(D)) {
+    S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type)
+        << AL << /* typedefs */13;
----------------
Rather than adding a new enumeration to `warn_attribute_wrong_decl_type`, I 
would use `warn_attribute_wrong_decl_type_str` and pass in the string as part 
of the diagnostic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87652

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to