[all-commits] [llvm/llvm-project] 19c571: [Clang] Instantiate Typedefs referenced by type al...

Younan Zhang via All-commits all-commits at lists.llvm.org
Tue Oct 29 01:53:40 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 19c571a631d962f05264c539f035f5e7fc5c166b
      https://github.com/llvm/llvm-project/commit/19c571a631d962f05264c539f035f5e7fc5c166b
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M clang/lib/Sema/SemaTemplateDeductionGuide.cpp
    M clang/test/SemaCXX/cxx20-ctad-type-alias.cpp

  Log Message:
  -----------
  [Clang] Instantiate Typedefs referenced by type alias deduction guides (#111804)

TypedefNameDecl referenced by a synthesized CTAD guide for type aliases
was not transformed previously, resulting in a substitution failure in
BuildDeductionGuideForTypeAlias() when substituting into the
right-hand-side deduction guide.

This patch fixes it in the way we have been doing since
https://reviews.llvm.org/D80743. We transform all the function
parameters, parenting referenced TypedefNameDecls with the
CXXDeductionGuideDecl. Then we instantiate these declarations in
FindInstantiatedDecl() as we build up the eventual deduction guide,
using the mechanism introduced in D80743

Fixes #111508

(cherry picked from commit 0bc02b999a9686ba240b7a68d3f1cbbf037d2170)



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