[all-commits] [llvm/llvm-project] 17bbac: Revert "[Clang] Distinguish expanding-pack-in-plac...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Sun Mar 23 11:01:26 PDT 2025


  Branch: refs/heads/users/mizvekov/GH101754
  Home:   https://github.com/llvm/llvm-project
  Commit: 17bbac4d1f447a448168de629f44d8c227d468e5
      https://github.com/llvm/llvm-project/commit/17bbac4d1f447a448168de629f44d8c227d468e5
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-03-22 (Sat, 22 Mar 2025)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/PropertiesBase.td
    M clang/include/clang/AST/Type.h
    M clang/include/clang/AST/TypeProperties.td
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/SemaCXX/cxx20-ctad-type-alias.cpp

  Log Message:
  -----------
  Revert "[Clang] Distinguish expanding-pack-in-place cases for SubstTemplateTypeParmTypes (#114220)"

This reverts commit adb0d8ddceb143749c519d14b8b31b481071da77.


  Commit: e7ecd60e5fb7a9a14f7d85ab23587faadb543819
      https://github.com/llvm/llvm-project/commit/e7ecd60e5fb7a9a14f7d85ab23587faadb543819
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-03-22 (Sat, 22 Mar 2025)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaType.cpp

  Log Message:
  -----------
  Revert "[Clang][Sema] Retain the expanding index for unevaluated type constraints (#109518)"

This reverts commit 50e5411e4247421fd606f0a206682fcdf0303ae3.


  Commit: 9a089c5fbb4f84da58bca7559f15149b4d3b83d6
      https://github.com/llvm/llvm-project/commit/9a089c5fbb4f84da58bca7559f15149b4d3b83d6
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-03-23 (Sun, 23 Mar 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/ASTConcept.h
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/AST/DeclTemplate.h
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaConcept.h
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/Sema/SemaCodeComplete.cpp
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/test/SemaCXX/fold_lambda_with_variadics.cpp
    M clang/unittests/AST/SourceLocationTest.cpp

  Log Message:
  -----------
  [clang] Concepts: support pack expansions for type constraints

This reverts an earlier attempt to support these expansions,
which was limited to type arguments and which subverted the purpose
of SubstTemplateTypeParmType.

This propagates the ArgumentPackSubstitutionIndex along with the
AssociatedConstraint, so that the pack expansion works, without
needing any new transforms or otherwise any changes to the template
instanntiation process.

This keeps the tests from the reverted commits, and adds a few more
showing the new solution also works for NTTPs.

This patch is incomplete:
* It is likely missing plumbing the ArgumentPackSubstitutionIndex
  into more places.
* The Normalization cache is not adapted so it indexes on the
  ArgumentPackSubstitutionIndex as well.

One new test is added, which in any case shows an ambiguous call,
but if the normalization cache were corrected, the reason for
ambighuity would change from subsumption both ways, to neither
subsumes the other.

I am not sure if the current language rules would allow
for a test case where the pack index would break an ambiguity,
this is left for future consideration.


Compare: https://github.com/llvm/llvm-project/compare/17bbac4d1f44%5E...9a089c5fbb4f

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