rsmith added inline comments.

================
Comment at: clang/include/clang/Basic/Attr.td:2384
+  let Spellings = [Clang<"preferred_name", /*AllowInC*/0>];
+  let Subjects = SubjectList<[ClassTmpl]>;
+  let Args = [TypeArgument<"TypedefType">];
----------------
jyknight wrote:
> I wonder if this attribute ought to be allowed to be used on any Record 
> (which would make it potentially also valid for C). In case you also wanted 
> to do something like this in the future:
> 
> ```
> class any;
> using any_copyable = any;
> 
> class [[clang::preferred_name(any_copyable)]] any { ... };
> ```
> 
I think that would be reasonable, if the generalized attribute would see usage. 
If we're going to generalize it that way, I think it'd make sense to allow it 
on enums too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91311

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

Reply via email to