================
@@ -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;
+
+ auto *Current = SemaRef.CurrentInstantiationScope;
+ if (!Current)
+ return false;
----------------
zyn0217 wrote:
Hmm actually in parameter mapping we cannot have one: we want to leave them
unsubstituted, and a null Scope instructs FindInstantiatedDecl for that.
And we check if (SemaRef.CurrentInstantiationScope) in previous, so I think
this is harmless.
https://github.com/llvm/llvm-project/pull/221707
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits