[PATCH] D65042: [Concept] Placeholder constraints and abbreviated templates
Saar Raz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 13 07:53:59 PST 2020
saar.raz updated this revision to Diff 237679.
saar.raz added a comment.
Herald added a subscriber: mgorny.
Greatly simplified abbreviated template parsing, unify with generic lambdas.
Instead of manually replacing autos with invented parameters after the fact, we now replace autos in parameter type specifiers with invented parameters in GetTypeSpecTypeForDeclarator, 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 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).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65042/new/
https://reviews.llvm.org/D65042
Files:
.gitignore
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/ASTNodeTraverser.h
clang/include/clang/AST/DeclTemplate.h
clang/include/clang/AST/PropertiesBase.td
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/AST/TemplateBase.h
clang/include/clang/AST/Type.h
clang/include/clang/AST/TypeLoc.h
clang/include/clang/AST/TypeProperties.td
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/DeclSpec.h
clang/include/clang/Sema/Scope.h
clang/include/clang/Sema/ScopeInfo.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/ASTStructuralEquivalence.cpp
clang/lib/AST/DeclTemplate.cpp
clang/lib/AST/ODRHash.cpp
clang/lib/AST/TemplateBase.cpp
clang/lib/AST/TextNodeDumper.cpp
clang/lib/AST/Type.cpp
clang/lib/AST/TypeLoc.cpp
clang/lib/AST/TypePrinter.cpp
clang/lib/Basic/CMakeLists.txt
clang/lib/Parse/ParseCXXInlineMethods.cpp
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseTemplate.cpp
clang/lib/Parse/ParseTentative.cpp
clang/lib/Parse/Parser.cpp
clang/lib/Sema/DeclSpec.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaLambda.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/SemaType.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/AST/ast-dump-record-definition-data-json.cpp
clang/test/CXX/dcl/dcl.fct/p17.cpp
clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp
clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.closure/p3.cpp
clang/test/CXX/temp/temp.param/p10-2a.cpp
clang/test/Parser/cxx2a-placeholder-type-constraint.cpp
clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65042.237679.patch
Type: text/x-patch
Size: 154467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200113/d8725e83/attachment-0001.bin>
More information about the cfe-commits
mailing list