[clang] [Clang] Fix another parameter mapping substitution bug (PR #162155)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 6 23:15:57 PDT 2025
================
@@ -277,7 +277,8 @@ class HashParameterMapping : public RecursiveASTVisitor<HashParameterMapping> {
bool VisitTemplateTypeParmType(TemplateTypeParmType *T) {
// A lambda expression can introduce template parameters that don't have
// corresponding template arguments yet.
- if (T->getDepth() >= TemplateArgs.getNumLevels())
+ if (T->getDepth() >= TemplateArgs.getNumLevels() ||
+ !TemplateArgs.hasTemplateArgument(T->getDepth(), T->getIndex()))
----------------
cor3ntin wrote:
No, they are slightly different scenarios. I split the condition in 2 and added a comment, it's probably clearer that way. Thanks!
https://github.com/llvm/llvm-project/pull/162155
More information about the cfe-commits
mailing list