[all-commits] [llvm/llvm-project] c8e65e: [clang] CTAD: Fix require-clause is not transforme...

Haojian Wu via All-commits all-commits at lists.llvm.org
Fri Apr 19 13:07:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8e65e193d542464421ad4f9a9965d45b302ac0c
      https://github.com/llvm/llvm-project/commit/c8e65e193d542464421ad4f9a9965d45b302ac0c
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2024-04-19 (Fri, 19 Apr 2024)

  Changed paths:
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
    M clang/test/SemaTemplate/deduction-guide.cpp

  Log Message:
  -----------
  [clang] CTAD: Fix require-clause is not transformed. (#89378)

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

When building the deduction guide, we use the
TemplateArgsForBuildingFPrime to transform the require-clause from the
underlying class deduction guide. However, we do this at the wrong place
where not all elements of TemplateArgsForBuildingFPrime are initialized.
The fix involves rearranging the transformRequireClause call to the
correct location.

As part of the fix, we extend the TemplateInstantiator to support more
types in the template-rewrite mode. Otherwise, we will encounter an
assertion error when attempting to rewrite the template type parameter
type like D with a complex type like Derived<U>.



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