Mordante marked an inline comment as done.
Mordante added inline comments.

================
Comment at: clang/lib/AST/CommentSema.cpp:693
+    StringRef AttributeSpelling =
+        CPlusPlus14 ? "[[deprecated]]" : "__attribute__((deprecated))";
     if (PP) {
----------------
aaron.ballman wrote:
> Mordante wrote:
> > aaron.ballman wrote:
> > > This attribute also exists with this spelling in C2x, FWIW.
> > True, but unless I'm mistaken `CPlusPlus17` and `CPlusPlus2a` also include 
> > `CPlusPlus14`. Do you prefer a different name for the Boolean?
> I'm talking about C2x, not C++2a. The name for the variable is fine, but we 
> should prefer `[[deprecated]]` in C2x mode to `__attribute__((deprecated))`.
> 
> I think the correct predicate is: 
> `getLangOpts().DoubleSquareBracketAttributes` -- if the user says they want 
> to use double-square bracket attributes, we should probably prefer them to 
> GNU-style attributes.
Ah sorry I misread. I'll have a look at C2x. Thanks for the information.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71141



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

Reply via email to