[clang] [Clang] Refactor instantiation of declarations within concepts (PR #221707)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 05:11:56 PDT 2026
================
@@ -1996,11 +1989,41 @@ Decl *TemplateInstantiator::TransformDecl(SourceLocation Loc, Decl *D) {
return SemaRef.FindInstantiatedDecl(Loc, cast<NamedDecl>(D), TemplateArgs);
}
-bool TemplateInstantiator::maybeInstantiateFunctionParameterToScope(
- ParmVarDecl *OldParm) {
- if (SemaRef.CurrentInstantiationScope->getInstantiationOfIfExists(OldParm))
+bool TemplateInstantiator::instantiateMissingDeclsToScopeForConcepts(Decl *PD) {
+ if (!(PD && (SemaRef.inConstraintSubstitution() ||
+ SemaRef.inParameterMappingSubstitution())))
+ return false;
----------------
cor3ntin wrote:
I feel like this should be an assert instead?
https://github.com/llvm/llvm-project/pull/221707
More information about the cfe-commits
mailing list