[PATCH] D116983: Clone constructor template parameters when creating deduction guide
Arthur Eubanks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 12 16:59:15 PST 2022
aeubanks created this revision.
rsmith added inline comments.
aeubanks published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
================
Comment at: clang/lib/Sema/SemaTemplate.cpp:2174
+ Args.addOuterTemplateArguments(SubstArgs);
+ Args.addOuterRetainedLevel();
+ NamedDecl *NewParam = transformTemplateParameter(Param, Args);
----------------
This outer retained level would correspond to the parameters you're building -- we shouldn't add this. Instead, we should have two different `SubstArgs` lists, one for the outer parameters and one for the inner parameters; we should add just the outer parameters here, and add the inner and outer parameters below. (And at the end of each iteration of this loop we should accumulate arguments onto the outer arguments list like we accumulate arguments onto the inner arguments list in the next loop.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116983
Files:
clang/lib/Sema/SemaTemplate.cpp
clang/test/Modules/Inputs/ctad/a.h
clang/test/Modules/Inputs/ctad/b.h
clang/test/Modules/Inputs/ctad/module.modulemap
clang/test/Modules/ctad.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116983.398786.patch
Type: text/x-patch
Size: 4252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220113/1d0e6967/attachment-0001.bin>
More information about the cfe-commits
mailing list