[PATCH] D65042: [Concept] Placeholder constraints and abbreviated templates

Saar Raz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 20 17:00:23 PDT 2019


saar.raz created this revision.
saar.raz added reviewers: hubert.reinterpretcast, rsmith, faisalv.
Herald added a reviewer: martong.
Herald added a reviewer: shafik.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This patch implements P1141R2 "Yet another approach for constrained declarations", and is the last in the (initial) series for implementing C++2a concepts.

General strategy for this patch was:

- Expand AutoType to include optional type-constraint, reflecting the wording and easing the integration of constraints.
- Recognize AutoTypes used in functions parameters in ActOnFunctionDeclarator (the first place where we have the required information to fetch the correct template parameter list to append the invented parameters to) and fix the function and parameter types there.

Based on D60939 <https://reviews.llvm.org/D60939>.


Repository:
  rC Clang

https://reviews.llvm.org/D65042

Files:
  include/clang/AST/ASTContext.h
  include/clang/AST/ASTNodeTraverser.h
  include/clang/AST/DeclTemplate.h
  include/clang/AST/RecursiveASTVisitor.h
  include/clang/AST/TemplateBase.h
  include/clang/AST/Type.h
  include/clang/AST/TypeLoc.h
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/DeclSpec.h
  include/clang/Sema/Sema.h
  lib/AST/ASTContext.cpp
  lib/AST/ASTImporter.cpp
  lib/AST/ASTStructuralEquivalence.cpp
  lib/AST/DeclTemplate.cpp
  lib/AST/ODRHash.cpp
  lib/AST/TemplateBase.cpp
  lib/AST/TextNodeDumper.cpp
  lib/AST/Type.cpp
  lib/AST/TypeLoc.cpp
  lib/AST/TypePrinter.cpp
  lib/Parse/ParseDecl.cpp
  lib/Parse/ParseTentative.cpp
  lib/Parse/Parser.cpp
  lib/Sema/DeclSpec.cpp
  lib/Sema/Sema.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaTemplate.cpp
  lib/Sema/SemaTemplateDeduction.cpp
  lib/Sema/SemaTemplateInstantiateDecl.cpp
  lib/Sema/SemaType.cpp
  lib/Sema/TreeTransform.h
  lib/Serialization/ASTReader.cpp
  lib/Serialization/ASTReaderDecl.cpp
  lib/Serialization/ASTWriter.cpp
  lib/Serialization/ASTWriterDecl.cpp
  test/CXX/concepts-ts/dcl/dcl.fct/p17.cpp
  test/CXX/concepts-ts/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp
  test/CXX/concepts-ts/temp/temp.param/p10.cpp
  test/Parser/cxx2a-placeholder-type-constraint.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65042.210977.patch
Type: text/x-patch
Size: 116816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190721/424906bf/attachment-0001.bin>


More information about the cfe-commits mailing list