================ @@ -1510,6 +1517,21 @@ namespace { } } + MultiLevelTemplateArgumentList ForgetSubstitution() { + MultiLevelTemplateArgumentList New; + New.addOuterRetainedLevels(this->TemplateArgs.getNumLevels()); + + MultiLevelTemplateArgumentList Old = + const_cast<MultiLevelTemplateArgumentList &>(this->TemplateArgs); ---------------- ilya-biryukov wrote:
Unfortunately yes, but it's the same as in `ForgetPartiallySubstitutedPack/RememberPartiallySubstitutedPack`. `this->TemplateArgs` is a const reference, and it's probably even good to have some protection against changing it accidentally in **most** places, except these two functions. We might want to change this, but it's not a pattern that this change adds and so I'd keep this separate from the PR. https://github.com/llvm/llvm-project/pull/106730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits