[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 19 10:23:41 PDT 2025
================
@@ -1077,7 +1077,11 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
// !!NOTE: DeduceResults respects the sequence of template parameters of
// the deduction guide f.
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
- if (const auto &D = DeduceResults[Index]; !D.isNull()) // Deduced
+ const auto &D = DeduceResults[Index];
+ bool NonDeduced =
+ D.isNull() || (D.getKind() == TemplateArgument::Pack &&
+ D.pack_size() == 1 && D.pack_begin()->isNull());
+ if (!NonDeduced)
----------------
cor3ntin wrote:
Should that be a function? Should isNull be changed? When do we get in that situation?
https://github.com/llvm/llvm-project/pull/132061
More information about the cfe-commits
mailing list