[clang] [Clang] Give empty template parameter mapping an empty MLTAL (PR #164051)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 19 00:05:56 PDT 2025
================
@@ -2017,8 +2022,13 @@ void SubstituteParameterMappings::buildParameterMapping(
SemaRef.MarkUsedTemplateParameters(Args->arguments(),
/*Depth=*/0, OccurringIndices);
}
+ unsigned Size = OccurringIndices.count();
+ // It's OK when Size is 0. We build an empty parameter mapping when the atomic
+ // constraint is independent of any template parameters, so we can distinguish
+ // it from cases where no mapping exists at all, e.g. when there are only
+ // atomic constraints.
----------------
cor3ntin wrote:
```suggestion
// When the constraint is independent of any template parameters,
// we build an empty mapping so that we can distinguish these cases
// from cases where no mapping exists at all, e.g. when there are only atomic constraints.
```
https://github.com/llvm/llvm-project/pull/164051
More information about the cfe-commits
mailing list