[all-commits] [llvm/llvm-project] 8322ce: [clang] Preserve Qualifiers and type sugar in Temp...
Matheus Izvekov via All-commits
all-commits at lists.llvm.org
Wed May 29 11:26:24 PDT 2024
Branch: refs/heads/users/mizvekov/clang-improved-template-name-qualifiers
Home: https://github.com/llvm/llvm-project
Commit: 8322ce12520d1d4ab96b58195bd91f62a7b95c06
https://github.com/llvm/llvm-project/commit/8322ce12520d1d4ab96b58195bd91f62a7b95c06
Author: Matheus Izvekov <mizvekov at gmail.com>
Date: 2024-05-29 (Wed, 29 May 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/TemplateName.h
M clang/include/clang/Sema/Sema.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/DeclTemplate.cpp
M clang/lib/AST/ODRHash.cpp
M clang/lib/AST/TemplateBase.cpp
M clang/lib/AST/TemplateName.cpp
M clang/lib/AST/TextNodeDumper.cpp
M clang/lib/AST/Type.cpp
M clang/lib/AST/TypePrinter.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/Sema/SemaExprMember.cpp
M clang/lib/Sema/SemaTemplate.cpp
M clang/lib/Sema/SemaTemplateDeduction.cpp
M clang/lib/Sema/SemaType.cpp
M clang/lib/Sema/TreeTransform.h
M clang/test/AST/ast-dump-ctad-alias.cpp
M clang/test/AST/ast-dump-decl.cpp
M clang/test/AST/ast-dump-expr.cpp
M clang/test/AST/ast-dump-template-decls.cpp
M clang/test/AST/ast-dump-template-name.cpp
M clang/test/AST/ast-dump-using-template.cpp
M clang/test/CXX/drs/cwg1xx.cpp
M clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp
M clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp
M clang/test/Index/print-type.cpp
M clang/test/OpenMP/declare_mapper_messages.cpp
M clang/test/Parser/cxx-template-template-recovery.cpp
M clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
M clang/test/SemaTemplate/cwg2398.cpp
M clang/test/SemaTemplate/instantiate-requires-expr.cpp
M clang/test/SemaTemplate/nested-implicit-deduction-guides.cpp
M clang/unittests/AST/TemplateNameTest.cpp
M libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp
M libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp
M libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.verify.cpp
M libcxx/test/std/containers/associative/set/set.cons/deduct.verify.cpp
M libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp
M libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp
M libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp
M libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp
M libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp
M libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp
M libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp
M libcxx/test/std/containers/sequences/vector/vector.cons/deduct.verify.cpp
M libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp
M libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.verify.cpp
M libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.verify.cpp
M libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.verify.cpp
M libcxx/test/std/ranges/range.adaptors/range.join/ctad.verify.cpp
M libcxx/test/std/re/re.regex/re.regex.construct/deduct.verify.cpp
M libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp
Log Message:
-----------
[clang] Preserve Qualifiers and type sugar in TemplateNames
This patch improves the preservation of qualifiers
and loss of type sugar in TemplateNames.
This problem is analogous to https://reviews.llvm.org/D112374
and this patch takes a very similar approach to that patch,
except the impact here is much lesser.
When a TemplateName was written bare, without qualifications,
we wouldn't produce a QualifiedTemplate which could be used
to disambiguate it from a Canonical TemplateName. This had
effects in the TemplateName printer, which had workarounds
to deal with this, and wouldn't print the TemplateName
as-written in most situations.
There are also some related fixes to help preserve this type
sugar along the way into diagnostics, so that this patch can
be properly tested.
- Fix dropping the template keyword.
- Fix type deduction to preserve sugar in TST TemplateNames.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list