llvm-project/clang/lib/Parse
Saar Raz e57a9abc4b [Concepts] Placeholder constraints and abbreviated templates
This patch implements P1141R2 "Yet another approach for constrained declarations".

General strategy for this patch was:

- Expand AutoType to include optional type-constraint, reflecting the wording and easing the integration of constraints.
- Replace autos in parameter type specifiers with invented parameters in GetTypeSpecTypeForDeclarator, using the same logic
  previously used for generic lambdas, now unified with abbreviated templates, by:
  - Tracking the template parameter lists in the Declarator object
  - Tracking the template parameter depth before parsing function declarators (at which point we can match template
    parameters against scope specifiers to know if we have an explicit template parameter list to append invented parameters
    to or not).
- When encountering an AutoType in a parameter context we check a stack of InventedTemplateParameterInfo structures that
  contain the info required to create and accumulate invented template parameters (fields that were already present in
  LambdaScopeInfo, which now inherits from this class and is looked up when an auto is encountered in a lambda context).

Resubmit after incorrect check in NonTypeTemplateParmDecl broke lldb.

Differential Revision: https://reviews.llvm.org/D65042
2020-01-22 12:09:13 +02:00
..
CMakeLists.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00
ParseAST.cpp [Support] Add TimeTraceScope constructor without detail arg 2019-12-11 14:32:21 +00:00
ParseCXXInlineMethods.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-22 12:09:13 +02:00
ParseDecl.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-22 12:09:13 +02:00
ParseDeclCXX.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-22 12:09:13 +02:00
ParseExpr.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
ParseExprCXX.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
ParseInit.cpp [c++20] Add support for designated direct-list-initialization syntax. 2019-08-31 01:00:37 +00:00
ParseObjc.cpp Implement __attribute__((objc_direct)), __attribute__((objc_direct_members)) 2019-11-18 11:48:40 -08:00
ParseOpenMP.cpp [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
ParsePragma.cpp Move vtordisp mode from Attr class to LangOptions.h, NFC 2019-11-22 15:47:46 -08:00
ParseStmt.cpp [Diagnostic] make Wmisleading-indendation not warn about labels 2020-01-06 23:22:27 +01:00
ParseStmtAsm.cpp Disallow an empty string literal in an asm label 2020-01-08 08:38:02 -05:00
ParseTemplate.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-22 12:09:13 +02:00
ParseTentative.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-22 12:09:13 +02:00
Parser.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-22 12:09:13 +02:00