[all-commits] [llvm/llvm-project] bcdb73: [clang] Reland: fix getTemplateInstantiationArgs (...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Thu Jun 4 11:30:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bcdb732df219fc5de7c16b9712d52aa56b22fed0
      https://github.com/llvm/llvm-project/commit/bcdb732df219fc5de7c16b9712d52aa56b22fed0
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
    M clang-tools-extra/clangd/SemanticHighlighting.cpp
    M clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/AST/DeclTemplate.h
    M clang/include/clang/AST/JSONNodeDumper.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/ASTMatchers/ASTMatchers.h
    M clang/include/clang/ASTMatchers/ASTMatchersInternal.h
    M clang/include/clang/Basic/Specifiers.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTDumper.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/Comment.cpp
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/DeclPrinter.cpp
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/AST/JSONNodeDumper.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/ASTMatchers/Dynamic/Registry.cpp
    M clang/lib/Analysis/ExprMutationAnalyzer.cpp
    M clang/lib/CIR/CodeGen/CIRGenVTables.cpp
    M clang/lib/CodeGen/CGVTables.cpp
    M clang/lib/Index/IndexingContext.cpp
    M clang/lib/InstallAPI/Visitor.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExprMember.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateDeductionGuide.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/lib/StaticAnalyzer/Core/BugSuppression.cpp
    M clang/lib/Tooling/Syntax/BuildTree.cpp
    M clang/test/AST/ast-dump-templates-pattern.cpp
    M clang/test/CXX/basic/basic.link/p11.cpp
    M clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
    M clang/test/CXX/temp/temp.constr/temp.constr.decl/p4.cpp
    M clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp
    M clang/test/CXX/temp/temp.spec/temp.expl.spec/p7.cpp
    M clang/test/CodeGenCXX/default-arguments.cpp
    M clang/test/CodeGenCXX/explicit-instantiation.cpp
    M clang/test/SemaTemplate/concepts-out-of-line-def.cpp
    M clang/test/SemaTemplate/friend-template.cpp
    M clang/test/SemaTemplate/instantiate-scope.cpp
    M clang/test/Templight/templight-default-func-arg.cpp
    M clang/test/Templight/templight-empty-entries-fix.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/unittests/AST/ASTImporterTest.cpp
    M clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
    M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

  Log Message:
  -----------
  [clang] Reland: fix getTemplateInstantiationArgs (#201373)

Relands #199528 

This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the
template
context of out-of-line definitions.

This greatly simplifies the signature of that function, by removing a
bunch
of workarounds, and simpliffying a couple that weren't removed yet.

Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.

Also makes the explicit specialization AST nodes stop abusing the
template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.



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