[clang] [Clang] Fix synthesis of alias CTAD constraints (PR #223340)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 07:50:03 PDT 2026
================
@@ -1000,45 +1014,46 @@ buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F,
// We rebuild all template parameters with the uninstantiated depth, and
// build template arguments refer to them.
- SmallVector<TemplateArgument> AdjustedAliasTemplateArgs;
+ SmallVector<TemplateArgument> AdjustedAliasTemplateArgs(
+ AliasTemplate->getTemplateParameters()->size());
- for (auto *TP : *AliasTemplate->getTemplateParameters()) {
+ unsigned N = 0;
----------------
shafik wrote:
Why not just call `N` as `NewIndex` since that is what it seems to be. The name `N` does not tell me anything at all.
https://github.com/llvm/llvm-project/pull/223340
More information about the cfe-commits
mailing list