[all-commits] [llvm/llvm-project] ad1ca5: [clang] Concepts: support pack expansions for type...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Tue Apr 1 17:12:18 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad1ca5f4a2bc09f99fd82e5444f5da37c2985e97
      https://github.com/llvm/llvm-project/commit/ad1ca5f4a2bc09f99fd82e5444f5da37c2985e97
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-01 (Tue, 01 Apr 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/ASTContext.h
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/AST/DeclTemplate.h
    M clang/include/clang/AST/PropertiesBase.td
    M clang/include/clang/AST/Type.h
    M clang/include/clang/AST/TypeProperties.td
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaConcept.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/AST/Type.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/Sema/SemaType.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    M clang/test/SemaCXX/cxx20-ctad-type-alias.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 (#132626)

This reverts an earlier attempt
(adb0d8ddceb143749c519d14b8b31b481071da77 and
50e5411e4247421fd606f0a206682fcdf0303ae3) 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
instantiation process.

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

Fixes https://github.com/llvm/llvm-project/issues/131798



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