[clang] [Clang] Add default arguments to the parameter mapping (PR #192071)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 08:44:35 PDT 2026
================
@@ -2105,6 +2105,25 @@ void SubstituteParameterMappings::buildParameterMapping(
SemaRef.MarkUsedTemplateParameters(Args->arguments(),
/*Depth=*/0, OccurringIndices);
}
+
+ // If a parameter is only referenced in a default template argument,
+ // we need to add it to the mapping explicitly.
+ {
+ llvm::SmallVector<TemplateArgument> DefaultArgs;
----------------
cor3ntin wrote:
Mostly trying not to add more `MarkUsedTemplateParameter` to the public interface (none of these functions are currently exposed) - but I'm happy to optimize if you want me to
https://github.com/llvm/llvm-project/pull/192071
More information about the cfe-commits
mailing list