llvm-project/clang/lib
Saar Raz b481f02814 [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 fixing MSAN failures caused by incomplete initialization of AutoTypeLocs in TypeSpecLocFiller.

Differential Revision: https://reviews.llvm.org/D65042
2020-01-23 19:39:43 +02:00
..
ARCMigrate Fix "pointer is null" static analyzer warning. NFCI. 2020-01-10 17:21:20 +00:00
AST [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
ASTMatchers Fix clang-formatting for recent commits 2020-01-20 11:38:23 +00:00
Analysis [DataFlow] Factor two worklist implementations out 2020-01-17 08:11:15 -08:00
Basic [Hexagon] Add support for Hexagon v67t microarchitecture (tiny core) 2020-01-21 11:35:10 -06:00
CodeGen [Alignment][NFC] Use Align with CreateAlignedStore 2020-01-23 17:34:32 +01:00
CrossTU [CrossTU] Fix problem with CrossTU AST load limit and progress messages. 2019-08-12 07:15:29 +00:00
DirectoryWatcher [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Driver [hip] Remove `-Werror=format-nonliteral` 2020-01-23 11:02:11 -05:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format Treat C# `using` as a control statement 2020-01-23 13:19:55 +01:00
Frontend [Concepts] Constraint Satisfaction Caching 2020-01-22 03:09:53 +02:00
FrontendTool [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers 2019-09-12 18:53:48 +00:00
Headers [X86] Cast to __v4hi instead of __m64 in the implementation of _mm_extract_pi16 and _mm_insert_pi16. 2020-01-22 16:00:23 -06:00
Index [clang][index] Index the injected class name types. 2020-01-22 10:07:54 +01:00
Lex [Lexer] Allow UCN for dollar symbol '\u0024' in identifiers when using -fdollars-in-identifiers flag. 2020-01-15 11:28:57 +00:00
Parse [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
Serialization [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
StaticAnalyzer [analyzer] Improve FuchsiaHandleChecker's diagnostic messages 2020-01-23 09:16:40 -08:00
Tooling [libTooling] Fix bug in Stencil handling of macro ranges 2020-01-17 12:11:25 -05:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00