================
@@ -1611,15 +1618,32 @@ namespace {
}
return Type;
}
+
// Override the default version to handle a rewrite-template-arg-pack case
- // for building a deduction guide.
+ // for building a deduction guide, and to cache substitution results in
+ // concepts checking.
bool TransformTemplateArgument(const TemplateArgumentLoc &Input,
TemplateArgumentLoc &Output,
bool Uneval = false) {
const TemplateArgument &Arg = Input.getArgument();
- std::vector<TemplateArgument> TArgs;
+ if (auto *Cache = SemaRef.CurrentCachedTemplateArgs;
+ Cache && TemplateArgsHashValue) {
+ llvm::FoldingSetNodeID ID = *TemplateArgsHashValue;
+ ID.AddInteger(SemaRef.ArgPackSubstIndex.toInternalRepresentation());
+ // FIXME: We can lose sugars when profiling Arg.
+ Arg.Profile(ID, SemaRef.Context);
----------------
mizvekov wrote:
Okay, I thought that comment meant something else entirely.
https://github.com/llvm/llvm-project/pull/188421
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits