[all-commits] [llvm/llvm-project] 2222f7: Reland: [clang] Improved canonicalization for temp...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Fri Apr 11 16:26:58 PDT 2025


  Branch: refs/heads/users/mizvekov/tst-refactor
  Home:   https://github.com/llvm/llvm-project
  Commit: 2222f7b9634b0200bdd45dfcdffd8fc8c077ca02
      https://github.com/llvm/llvm-project/commit/2222f7b9634b0200bdd45dfcdffd8fc8c077ca02
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M .ci/compute_projects.py
    M .ci/monolithic-linux.sh
    M clang-tools-extra/clangd/AST.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/PropertiesBase.td
    M clang/include/clang/AST/TemplateBase.h
    M clang/include/clang/AST/Type.h
    M clang/include/clang/AST/TypeProperties.td
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTDiagnostic.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/AST/QualTypeNames.cpp
    M clang/lib/AST/TemplateBase.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/Sema/SemaCXXScopeSpec.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaLookup.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/lib/Sema/SemaTemplateVariadic.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/CXX/class.derived/class.derived.general/p2.cpp
    M clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
    M clang/test/SemaCXX/undefined-partial-specialization.cpp
    M clang/test/SemaTemplate/make_integer_seq.cpp
    M clang/test/SemaTemplate/type_pack_element.cpp
    M clang/unittests/AST/TypePrinterTest.cpp

  Log Message:
  -----------
  Reland: [clang] Improved canonicalization for template specialization types

This changes the TemplateArgument representation to hold a flag indicating
whether a tempalte argument of expression type is supposed to be canonical
or not.

This gets one step closer to solving https://github.com/llvm/llvm-project/issues/92292

This still doesn't try to unique as-written TSTs. While this would
increase the amount of memory savings and make code dealing with
the AST more well-behaved, profiling template argument lists is
still too expensive for this to be worthwhile, at least for now.

This also fixes the context creation of TSTs, so that they don't
in some cases get incorrectly flagged as sugar over their own canonical
form. This is captured in the test expectation change of some AST dumps.

This fixes some places which were unnecessarily canonicalizing these TSTs.


  Commit: 4f5c7ec1be48e2ab49abf6d48bedf66e074ffa0f
      https://github.com/llvm/llvm-project/commit/4f5c7ec1be48e2ab49abf6d48bedf66e074ffa0f
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M clang/lib/AST/ASTImporter.cpp

  Log Message:
  -----------
  debug


Compare: https://github.com/llvm/llvm-project/compare/2d4b74fb9acd...4f5c7ec1be48

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