llvm-project/clang/lib/Sema
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
..
AnalysisBasedWarnings.cpp [Sema] Fixes -Wrange-loop-analysis warnings 2019-12-17 21:54:32 +01:00
CMakeLists.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00
CodeCompleteConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CoroutineStmtBuilder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclSpec.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
DelayedDiagnostic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IdentifierResolver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JumpDiagnostics.cpp [NFC] Refactor representation of materialized temporaries 2019-11-19 18:20:45 +01:00
MultiplexExternalSemaSource.cpp [clang] Improve LLVM-style RTTI support in ExternalASTSource/ExternalSemaSource 2019-12-15 18:11:01 +01:00
OpenCLBuiltins.td [OpenCL] Add MSAA sharing extension builtin functions 2020-01-14 14:46:42 +00:00
ParsedAttr.cpp Move some definitions from Sema to Basic to fix shared libs build 2019-09-16 13:58:59 +00:00
Scope.cpp Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block" 2019-03-25 00:53:10 +00:00
ScopeInfo.cpp PR42104: Support instantiations of lambdas that implicitly capture 2019-06-04 17:17:20 +00:00
Sema.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaAccess.cpp [c++20] Delete defaulted comparison functions if they would invoke an 2019-12-10 19:28:30 -08:00
SemaAttr.cpp Move vtordisp mode from Attr class to LangOptions.h, NFC 2019-11-22 15:47:46 -08:00
SemaCUDA.cpp [HIP] Add option -fgpu-allow-device-init 2019-10-22 16:06:20 -04:00
SemaCXXScopeSpec.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
SemaCast.cpp [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
SemaChecking.cpp [ARM,MVE] Support immediate vbicq,vorrq,vmvnq intrinsics. 2020-01-23 11:53:52 +00:00
SemaCodeComplete.cpp [clang][CodeComplete] Propogate printing policy to FunctionDecl 2020-01-20 12:20:20 +01:00
SemaConcept.cpp [Concepts] Constraint Satisfaction Caching 2020-01-22 03:09:53 +02:00
SemaConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SemaCoroutine.cpp Fix "pointer is null" static analyzer warnings. NFCI. 2020-01-09 12:05:48 +00:00
SemaDecl.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaDeclAttr.cpp Allow arbitrary capability name in Thread Safety Analysis 2020-01-21 15:43:17 -05:00
SemaDeclCXX.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaDeclObjC.cpp Fix `-Wunused-variable` warning. NFC. 2019-12-21 11:10:35 -05:00
SemaExceptionSpec.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
SemaExpr.cpp [OPENMP]Fix PR44578: crash in target construct with captured global. 2020-01-20 11:10:17 -05:00
SemaExprCXX.cpp PR42108 Consistently diagnose binding a reference template parameter to 2020-01-19 18:16:36 -08:00
SemaExprMember.cpp Resolve exception specifications after marking the corresponding 2019-12-15 22:02:30 -08:00
SemaExprObjC.cpp Remove duplicate variable. NFCI. 2020-01-14 14:00:37 +00:00
SemaFixItUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SemaInit.cpp PR44540: Prefer an inherited default constructor over an initializer 2020-01-14 19:29:50 -08:00
SemaLambda.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaLookup.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
SemaModule.cpp [DeclCXX] Remove unknown external linkage specifications 2019-11-21 15:23:05 +02:00
SemaObjCProperty.cpp Also synthesize _cmd and self for properties 2019-12-09 14:30:01 -08:00
SemaOpenMP.cpp [OPENMP]Fix use of local allocators in allocate clauses. 2020-01-23 11:04:14 -05:00
SemaOverload.cpp [clang] New __attribute__((__clang_arm_mve_strict_polymorphism)). 2020-01-15 15:04:10 +00:00
SemaPseudoObject.cpp [AST] Use an explicit copy in a range-based for 2019-11-12 20:47:46 +01:00
SemaStmt.cpp [Sema] Avoid Wrange-loop-analysis false positives 2020-01-21 21:14:10 +01:00
SemaStmtAsm.cpp [X86][AsmParser] re-introduce 'offset' operator 2019-12-30 14:35:26 -05:00
SemaStmtAttr.cpp [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr. 2019-09-13 17:39:31 +00:00
SemaTemplate.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaTemplateDeduction.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaTemplateInstantiate.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
SemaTemplateInstantiateDecl.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
SemaTemplateVariadic.cpp [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
SemaType.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
TreeTransform.h [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
TypeLocBuilder.cpp [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00
TypeLocBuilder.h [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00