[all-commits] [llvm/llvm-project] dd0fba: [clang][Sema] Use original template pattern when d...
antangelo via All-commits
all-commits at lists.llvm.org
Mon Oct 16 12:17:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd0fba11690f9fef304d5f48cde646e5eca8d3c0
https://github.com/llvm/llvm-project/commit/dd0fba11690f9fef304d5f48cde646e5eca8d3c0
Author: antangelo <contact at antangelo.com>
Date: 2023-10-16 (Mon, 16 Oct 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaTemplate.cpp
A clang/test/SemaTemplate/nested-implicit-deduction-guides.cpp
Log Message:
-----------
[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes (#68379)
When a nested template is instantiated, the template pattern of the
inner class is not copied into the outer class
ClassTemplateSpecializationDecl. The specialization contains a
ClassTemplateDecl with an empty record that points to the original
template pattern instead.
As a result, when looking up the constructors of the inner class, no
results are returned. This patch finds the original template pattern and
uses that for the lookup instead.
Based on CWG2471 we must also substitute the known outer template
arguments when creating deduction guides for the inner class.
Fixes #46200
Fixes #57812
More information about the All-commits
mailing list