[all-commits] [llvm/llvm-project] 3d5849: [clang] improved preservation of template keyword
Matheus Izvekov via All-commits
all-commits at lists.llvm.org
Sun Mar 30 09:26:40 PDT 2025
Branch: refs/heads/users/mizvekov/dtst
Home: https://github.com/llvm/llvm-project
Commit: 3d58492f8096b55579877fd89023070cf9519b3d
https://github.com/llvm/llvm-project/commit/3d58492f8096b55579877fd89023070cf9519b3d
Author: Matheus Izvekov <mizvekov at gmail.com>
Date: 2025-03-30 (Sun, 30 Mar 2025)
Changed paths:
M clang-tools-extra/clangd/AST.cpp
M clang-tools-extra/clangd/CodeComplete.cpp
M clang-tools-extra/clangd/DumpAST.cpp
M clang-tools-extra/clangd/FindTarget.cpp
M clang-tools-extra/include-cleaner/lib/WalkAST.cpp
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/ASTContext.h
M clang/include/clang/AST/ASTImporter.h
M clang/include/clang/AST/ASTNodeTraverser.h
M clang/include/clang/AST/AbstractBasicReader.h
M clang/include/clang/AST/AbstractBasicWriter.h
M clang/include/clang/AST/NestedNameSpecifier.h
M clang/include/clang/AST/ODRHash.h
M clang/include/clang/AST/PropertiesBase.td
M clang/include/clang/AST/RecursiveASTVisitor.h
M clang/include/clang/AST/TemplateName.h
M clang/include/clang/AST/Type.h
M clang/include/clang/AST/TypeLoc.h
M clang/include/clang/AST/TypeProperties.td
M clang/include/clang/Sema/DeclSpec.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/ASTImporter.cpp
M clang/lib/AST/ASTStructuralEquivalence.cpp
M clang/lib/AST/ItaniumMangle.cpp
M clang/lib/AST/NestedNameSpecifier.cpp
M clang/lib/AST/ODRHash.cpp
M clang/lib/AST/QualTypeNames.cpp
M clang/lib/AST/TemplateName.cpp
M clang/lib/AST/TextNodeDumper.cpp
M clang/lib/AST/Type.cpp
M clang/lib/AST/TypeLoc.cpp
M clang/lib/AST/TypePrinter.cpp
M clang/lib/ExtractAPI/DeclarationFragments.cpp
M clang/lib/Index/IndexTypeSourceInfo.cpp
M clang/lib/Parse/ParseExprCXX.cpp
M clang/lib/Sema/DeclSpec.cpp
M clang/lib/Sema/HeuristicResolver.cpp
M clang/lib/Sema/SemaCXXScopeSpec.cpp
M clang/lib/Sema/SemaCodeComplete.cpp
M clang/lib/Sema/SemaCoroutine.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/Sema/SemaExprCXX.cpp
M clang/lib/Sema/SemaLookup.cpp
M clang/lib/Sema/SemaTemplate.cpp
M clang/lib/Sema/SemaTemplateDeduction.cpp
M clang/lib/Sema/TreeTransform.h
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/lib/Tooling/Syntax/BuildTree.cpp
M clang/test/AST/ast-dump-decl.cpp
M clang/test/AST/ast-dump-expr.cpp
M clang/test/AST/ast-dump-templates.cpp
M clang/test/CXX/class.access/p6.cpp
M clang/test/CXX/drs/cwg2xx.cpp
M clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
M clang/test/SemaCXX/static-assert.cpp
M clang/test/SemaTemplate/aggregate-deduction-candidate.cpp
M clang/test/SemaTemplate/dependent-template-recover.cpp
M clang/test/SemaTemplate/instantiate-requires-expr.cpp
M clang/tools/libclang/CIndex.cpp
M libcxx/test/std/containers/sequences/array/array.overview/nttp.verify.cpp
M libcxx/test/std/utilities/smartptr/adapt/inout_ptr/inout_ptr.verify.cpp
M libcxx/test/std/utilities/smartptr/adapt/out_ptr/out_ptr.verify.cpp
M libcxx/test/std/utilities/utility/pairs/pairs.pair/nttp.verify.cpp
Log Message:
-----------
[clang] improved preservation of template keyword
This makes it so clang can better represent the abscence of
the template keyword for a template which cannot be resolved
due to a dependent prefix.
The tracking of the template keyword is removed from the
NestedNameSpecifier, and added to the last type node which had
it missing, the DependentTemplateSpecializationType (DTST).
The DTST and the DependentTemplateName are refactored to share
most of their implementation.
That refactoring along with the removal of the TypeSpecWithTemplate kind
from the nested name specifiers amounts to a large amount of code
removed, making this patch a small performance improvement overall.
This will also enable future further simplifications.
As a drive-by, this removes some special cases from the type printer,
allowing template arguments within NestedNameSpecifiers to not have
their nested names suppressed when printing.
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