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

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Sat Apr 12 09:21:28 PDT 2025


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

  Changed paths:
    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: 4cfc6352a7f3954eb32c09b024b9b75d51dc5852
      https://github.com/llvm/llvm-project/commit/4cfc6352a7f3954eb32c09b024b9b75d51dc5852
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-12 (Sat, 12 Apr 2025)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/Type.cpp

  Log Message:
  -----------
  [clang] ASTContext: fix creation of UnaryTransformTypes

This makes sure UnaryTransformTypes are all uniqued,
which makes the AST node more well behaved, and helps
with aka suppression in diagnostics.

This also makes sure a canonical UnaryTransformType round trips
back to a canonical type when recreated from its components.


  Commit: 343fbc9fc749ed544cfd71d05d04a909cce85908
      https://github.com/llvm/llvm-project/commit/343fbc9fc749ed544cfd71d05d04a909cce85908
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-12 (Sat, 12 Apr 2025)

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/Type.cpp

  Log Message:
  -----------
  [clang] ASTContext: make DecltypeType creation more well-behaved

This makes sure a canonical DecltypeType round-trips back to a
canonical type when rebuilt from its components.


  Commit: 52165f8e2fc01f2a561aac217937f755fc088a50
      https://github.com/llvm/llvm-project/commit/52165f8e2fc01f2a561aac217937f755fc088a50
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-12 (Sat, 12 Apr 2025)

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

  Log Message:
  -----------
  fix structural comparison of DependentTemplateStorage


  Commit: 565ce678745ef6cf3ba2b13ddf2863ffb4fcd651
      https://github.com/llvm/llvm-project/commit/565ce678745ef6cf3ba2b13ddf2863ffb4fcd651
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-12 (Sat, 12 Apr 2025)

  Changed paths:
    M .ci/monolithic-linux.sh

  Log Message:
  -----------
  [CI] monolithic linux improvements


  Commit: 338a8368c402ed391dbe55388d1e5326fb62dd61
      https://github.com/llvm/llvm-project/commit/338a8368c402ed391dbe55388d1e5326fb62dd61
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-12 (Sat, 12 Apr 2025)

  Changed paths:
    M .ci/compute_projects.py

  Log Message:
  -----------
  Debug: Enable LLDB pre-commit


Compare: https://github.com/llvm/llvm-project/compare/935935ac0ef2...338a8368c402

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