[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 20:01:56 PDT 2024
================
@@ -951,7 +951,8 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction(
DeclInfo.getDecl(), DeclInfo.getLexicalDeclContext(), /*Final=*/false,
/*Innermost=*/std::nullopt,
/*RelativeToPrimary=*/true,
- /*Pattern=*/nullptr, /*ForConstraintInstantiation=*/true,
+ /*Pattern=*/nullptr,
+ !isa_and_present<ClassTemplateDecl>(DeclInfo.getDecl()),
----------------
zyn0217 wrote:
This looks wrong: With the flag disabled, we wouldn't correctly collect template arguments for the outer class template in this case. Having collected nothing for the other hand side's constraint expression doesn't mean we should do the same for the primary declaration.
https://github.com/llvm/llvm-project/pull/102554
More information about the cfe-commits
mailing list