[PATCH] D91311: Add new 'preferred_name' attribute.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 17:19:00 PST 2020


rsmith created this revision.
rsmith added reviewers: aaron.ballman, EricWF.
Herald added a subscriber: jdoerfert.
Herald added projects: clang, libc++.
Herald added a reviewer: libc++.
rsmith requested review of this revision.

This attribute permits a typedef to be associated with a class template
specialization as a preferred way of naming that class template
specialization. This permits us to specify that (for example) the
preferred way to express 'std::basic_string<char>' is as 'std::string'.

The attribute is applied to the various class templates in libc++ that have
corresponding well-known typedef names.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91311

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/AST/TypePrinter.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  clang/test/SemaTemplate/attributes.cpp
  libcxx/include/__config
  libcxx/include/iosfwd
  libcxx/include/string
  libcxx/include/string_view

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91311.304690.patch
Type: text/x-patch
Size: 17490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201112/c0125987/attachment-0001.bin>


More information about the cfe-commits mailing list