[all-commits] [llvm/llvm-project] 98f76a: Add new 'preferred_name' attribute.

Richard Smith via All-commits all-commits at lists.llvm.org
Mon Dec 7 12:59:21 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 98f76adf4e941738c0b9fe3b9965fa63603e9c89
      https://github.com/llvm/llvm-project/commit/98f76adf4e941738c0b9fe3b9965fa63603e9c89
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/test/SemaTemplate/attributes.cpp
    M clang/utils/TableGen/ClangAttrEmitter.cpp
    M libcxx/include/__config
    M libcxx/include/iosfwd
    M libcxx/include/regex
    M libcxx/include/string
    M libcxx/include/string_view

  Log Message:
  -----------
  Add new 'preferred_name' attribute.

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.

Differential Revision: https://reviews.llvm.org/D91311




More information about the All-commits mailing list