[all-commits] [llvm/llvm-project] c89714: [clang] fix getTemplateInstantiationArgs

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Mon Jul 6 13:10:22 PDT 2026


  Branch: refs/heads/users/mizvekov/get-template-inst-args
  Home:   https://github.com/llvm/llvm-project
  Commit: c897141767cb3434da43631407e3035763d4d30f
      https://github.com/llvm/llvm-project/commit/c897141767cb3434da43631407e3035763d4d30f
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2026-07-06 (Mon, 06 Jul 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/LibASTMatchersReference.html
    M clang/docs/ReleaseNotes.md
    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/SemaCXX/deduced-return-type-cxx14.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] fix getTemplateInstantiationArgs

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.


  Commit: 7268755aeca7085f738655df738c91e52edc80e2
      https://github.com/llvm/llvm-project/commit/7268755aeca7085f738655df738c91e52edc80e2
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/test/CXX/drs/cwg18xx.cpp
    M clang/test/CXX/drs/cwg7xx.cpp
    M clang/test/SemaCXX/GH195416.cpp
    M clang/test/SemaCXX/constant-expression-cxx14.cpp
    M clang/test/SemaCXX/deduced-return-type-cxx14.cpp
    M clang/test/SemaCXX/member-class-11.cpp

  Log Message:
  -----------
  fixups


Compare: https://github.com/llvm/llvm-project/compare/c897141767cb%5E...7268755aeca7

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