[libcxx-commits] [PATCH] D91311: Add new 'preferred_name' attribute.
James Y Knight via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 9 07:13:06 PST 2020
jyknight 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">];
----------------
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 { ... };
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91311/new/
https://reviews.llvm.org/D91311
More information about the libcxx-commits
mailing list