[clang] [Sema] Substitute parameter packs when deduced from function arguments (PR #79371)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 26 06:52:22 PST 2024
=?utf-8?q?Gábor?= Spaits,Gabor Spaits <gaborspaits1 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/79371 at github.com>
================
@@ -858,6 +859,27 @@ class PackDeductionScope {
Info.PendingDeducedPacks[Pack.Index] = Pack.Outer;
}
+ // Return the size of the saved packs if all of them has the same size.
+ std::optional<unsigned> getSavedPackSizeIfAllEqual() const {
+ if (Packs.size() == 0 ||
+ Packs[0].Saved.getKind() != clang::TemplateArgument::Pack)
----------------
cor3ntin wrote:
I think you can remove it entirely, there is an assert in `.pack_size();` - that should simplify that code a bit !
https://github.com/llvm/llvm-project/pull/79371
More information about the cfe-commits
mailing list