llvm-project/clang/lib/AST
Matheus Izvekov c9e46219f3
[clang] retain type sugar in auto / template argument deduction
This implements the following changes:
* AutoType retains sugared deduced-as-type.
* Template argument deduction machinery analyses the sugared type all the way
down. It would previously lose the sugar on first recursion.
* Undeduced AutoType will be properly canonicalized, including the constraint
template arguments.
* Remove the decltype node created from the decltype(auto) deduction.

As a result, we start seeing sugared types in a lot more test cases,
including some which showed very unfriendly `type-parameter-*-*` types.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: rsmith, #libc, ldionne

Differential Revision: https://reviews.llvm.org/D110216
2021-11-15 23:07:45 +01:00
..
Interp Implement if consteval (P1938) 2021-10-05 08:04:14 -04:00
APValue.cpp [clang] Do not crash in APValue::prettyPrint() on forward-decl structs. 2021-11-10 17:17:00 +01:00
ASTConcept.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
ASTConsumer.cpp
ASTContext.cpp [clang] retain type sugar in auto / template argument deduction 2021-11-15 23:07:45 +01:00
ASTDiagnostic.cpp Fix missing qualifier in template type diffing 2021-08-16 18:34:18 -07:00
ASTDumper.cpp [AST] injected-class-name is not a redecl, even in template specializations 2021-11-02 14:37:45 +01:00
ASTImporter.cpp [clang] retain type sugar in auto / template argument deduction 2021-11-15 23:07:45 +01:00
ASTImporterLookupTable.cpp Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC) 2021-10-30 19:00:19 -07:00
ASTStructuralEquivalence.cpp [ASTImporter] Remove ASTNodeImporter::IsStructuralMatch overload for EnumConstantDecl 2021-10-30 13:12:12 +02:00
ASTTypeTraits.cpp Add `LambdaCapture`-related matchers. 2021-11-08 18:50:54 +00:00
AttrDocTable.cpp [gn build] manually port 18f9e25ce1 (AttrDocTable) 2021-08-12 21:30:59 -04:00
AttrImpl.cpp [OPENMP51]Initial parsing/sema for append_args clause for 'declare variant' 2021-10-25 09:38:50 -07:00
CMakeLists.txt [gn build] manually port 18f9e25ce1 (AttrDocTable) 2021-08-12 21:30:59 -04:00
CXXABI.h Recommit of a2fdf9d4d7. 2021-02-05 11:27:30 -05:00
CXXInheritance.cpp [clang] Use llvm::erase_if (NFC) 2021-10-17 13:50:29 -07:00
Comment.cpp Comment AST: Recognize function-like objects via return type (NFC) 2021-11-12 21:11:11 +01:00
CommentBriefParser.cpp [clang] Fix a few more comment typos to cycle bots 2021-09-20 20:06:03 -04:00
CommentCommandTraits.cpp
CommentLexer.cpp Comment parsing: Complete list of Doxygen commands 2021-11-09 18:35:26 +01:00
CommentParser.cpp
CommentSema.cpp Comment AST: Recognize function-like objects via return type (NFC) 2021-11-12 21:11:11 +01:00
ComparisonCategories.cpp [clang] Fix a few more comment typos to cycle bots 2021-09-20 20:06:03 -04:00
ComputeDependence.cpp [clang] Make CXXDefaultArgExpr inherit dependence from the inner Expr 2021-06-10 14:51:08 +02:00
DataCollection.cpp
Decl.cpp Revert "Implement target_clones multiversioning" 2021-11-12 11:05:58 +01:00
DeclBase.cpp [clang] Support -clear-ast-before-backend without -disable-free 2021-10-14 13:43:53 -07:00
DeclCXX.cpp [clang] Don't crash on an incomplete-type base specifier in template context. 2021-11-09 22:17:47 +01:00
DeclFriend.cpp
DeclGroup.cpp
DeclObjC.cpp [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions. 2021-10-21 12:08:06 -07:00
DeclOpenMP.cpp
DeclPrinter.cpp ast-print: Avoid extra whitespace before function opening brace 2021-11-14 20:45:16 -08:00
DeclTemplate.cpp DebugInfo/Printing: Improve name of policy for including types for template arguments 2021-11-11 21:59:27 -08:00
DeclarationName.cpp [clang][AST] Encapsulate DeclarationNameLoc, NFCI 2021-01-27 11:21:01 +00:00
Expr.cpp [AST, Analysis] Use llvm::reverse (NFC) 2021-11-07 09:53:14 -08:00
ExprCXX.cpp [Clang] Introduce Swift async calling convention. 2021-07-09 11:50:10 -07:00
ExprClassification.cpp [clang] NFC: change uses of `Expr->getValueKind` into `is?Value` 2021-07-28 03:09:31 +02:00
ExprConcepts.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
ExprConstant.cpp Revert "[clang] Add early exit when checking for const init of arrays." 2021-11-10 20:59:35 +01:00
ExprObjC.cpp [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr 2021-07-28 23:27:43 +02:00
ExternalASTMerger.cpp [clang] Use llvm::erase_if (NFC) 2021-10-17 13:50:29 -07:00
ExternalASTSource.cpp
FormatString.cpp
FormatStringParsing.h
InheritViz.cpp
ItaniumCXXABI.cpp Change __builtin_sycl_unique_stable_name to just use an Itanium mangling 2021-09-28 06:41:03 -07:00
ItaniumMangle.cpp [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
JSONNodeDumper.cpp Implement if consteval (P1938) 2021-10-05 08:04:14 -04:00
Linkage.h [c++20] For P0732R2 / P1907R1: Basic code generation and name 2020-11-09 22:10:27 -08:00
Mangle.cpp [clang/Basic] Make TargetInfo.h not use DataLayout again 2021-04-27 22:26:10 -04:00
MicrosoftCXXABI.cpp Change __builtin_sycl_unique_stable_name to just use an Itanium mangling 2021-09-28 06:41:03 -07:00
MicrosoftMangle.cpp [AST, Analysis] Use llvm::reverse (NFC) 2021-11-07 09:53:14 -08:00
NSAPI.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
NestedNameSpecifier.cpp Fully qualify template template parameters when printing 2021-09-02 15:04:34 -07:00
ODRHash.cpp Revert "Following up on PR48517, fix handling of template arguments that refer" 2021-01-20 15:55:35 +01:00
OSLog.cpp
OpenMPClause.cpp Initial parsing/sema for 'align' clause 2021-11-09 07:34:18 -05:00
ParentMap.cpp
ParentMapContext.cpp [AST, CodeGen, Driver] Use llvm::is_contained (NFC) 2021-10-12 09:19:49 -07:00
PrintfFormatString.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
QualTypeNames.cpp [clang] Use isa instead of dyn_cast (NFC) 2021-11-14 09:32:40 -08:00
RawCommentList.cpp
RecordLayout.cpp
RecordLayoutBuilder.cpp Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC) 2021-10-30 19:00:19 -07:00
ScanfFormatString.cpp
SelectorLocationsKind.cpp
Stmt.cpp Implement if consteval (P1938) 2021-10-05 08:04:14 -04:00
StmtCXX.cpp
StmtIterator.cpp
StmtObjC.cpp [clang] Convert ObjCAtTryStmt to llvm::TrailingObjects 2021-10-27 08:57:05 -04:00
StmtOpenMP.cpp [OpenMP] Initial parsing/sema for the 'omp loop' construct 2021-10-28 08:26:43 -07:00
StmtPrinter.cpp ast-print: Avoid extra whitespace before function opening brace 2021-11-14 20:45:16 -08:00
StmtProfile.cpp Initial parsing/sema for 'align' clause 2021-11-09 07:34:18 -05:00
StmtViz.cpp
TemplateBase.cpp Fully qualify template template parameters when printing 2021-09-02 15:04:34 -07:00
TemplateName.cpp Fully qualify template template parameters when printing 2021-09-02 15:04:34 -07:00
TextNodeDumper.cpp Implement if consteval (P1938) 2021-10-05 08:04:14 -04:00
Type.cpp [clang] retain type sugar in auto / template argument deduction 2021-11-15 23:07:45 +01:00
TypeLoc.cpp Properly determine the end location of an ObjCObjectPointerType. 2021-10-29 13:15:53 -07:00
TypePrinter.cpp [Clang][Attr] Support btf_type_tag attribute 2021-11-04 13:59:18 -07:00
VTTBuilder.cpp
VTableBuilder.cpp [AST, Analysis] Use llvm::reverse (NFC) 2021-11-07 09:53:14 -08:00