[all-commits] [llvm/llvm-project] 4848f3: [C++2a] P0634r3: Down with typename!

Nicolas via All-commits all-commits at lists.llvm.org
Wed Sep 28 09:50:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4848f3bf2ff5ec57a8e2b8d3676c947dcf0fd735
      https://github.com/llvm/llvm-project/commit/4848f3bf2ff5ec57a8e2b8d3676c947dcf0fd735
  Author: Nicolas Lesser <blitzrakete at gmail.com>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/DeclSpec.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Parse/ParseExprCXX.cpp
    M clang/lib/Parse/ParseTemplate.cpp
    M clang/lib/Parse/ParseTentative.cpp
    M clang/lib/Parse/Parser.cpp
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp
    M clang/test/CXX/drs/dr1xx.cpp
    M clang/test/CXX/drs/dr2xx.cpp
    M clang/test/CXX/drs/dr4xx.cpp
    M clang/test/CXX/drs/dr5xx.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
    M clang/test/CXX/temp/temp.res/p3.cpp
    A clang/test/CXX/temp/temp.res/p4.cpp
    M clang/test/CXX/temp/temp.res/temp.dep/temp.dep.type/p1.cpp
    M clang/test/FixIt/fixit.cpp
    M clang/test/Parser/cxx-member-initializers.cpp
    M clang/test/SemaCXX/MicrosoftCompatibility.cpp
    M clang/test/SemaCXX/MicrosoftExtensions.cpp
    M clang/test/SemaCXX/MicrosoftSuper.cpp
    M clang/test/SemaCXX/rounding-math-crash.cpp
    M clang/test/SemaCXX/typo-correction.cpp
    M clang/test/SemaCXX/unknown-type-name.cpp
    M clang/test/SemaTemplate/alias-templates.cpp
    M clang/test/SemaTemplate/typename-specifier-3.cpp
    M clang/www/cxx_status.html

  Log Message:
  -----------
  [C++2a] P0634r3: Down with typename!

This patch implements P0634r3 that removes the need for 'typename' in certain contexts.

For example,

```
template <typename T>
using foo = T::type; // ok
```

This is also allowed in previous language versions as an extension, because I think it's pretty useful. :)

Reviewed By: #clang-language-wg, erichkeane

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




More information about the All-commits mailing list