[all-commits] [llvm/llvm-project] 1553b2: [clang] CTAD alias: Fix missing template arg packs...

Haojian Wu via All-commits all-commits at lists.llvm.org
Mon May 20 07:11:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1553b21f6d3b620b8e32121b974793342820ab8c
      https://github.com/llvm/llvm-project/commit/1553b21f6d3b620b8e32121b974793342820ab8c
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
    M clang/lib/Sema/TreeTransform.h
    M clang/test/AST/ast-dump-ctad-alias.cpp
    M clang/test/SemaCXX/cxx20-ctad-type-alias.cpp

  Log Message:
  -----------
  [clang] CTAD alias: Fix missing template arg packs during the transformation (#92535)

clang rejects some valid code (see testcases) because of an incorrect
transformed deduction guides. This patch fixes it.

We miss the template argument packs during the transformation (`auto
(type-parameter-0-0...) -> Foo<>`). In
`TreeTransform::TransformTemplateArguments `, we have a logic of
handling template argument packs which were originally added to support
CTAD alias, it doesn't seem to be needed, we need to unpack them.



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