[clang] [clang] Do not substitute parameter pack while retaining the pack expansion (PR #108197)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 01:36:31 PDT 2024


================
@@ -113,9 +113,11 @@ class TreeTransform {
   class ForgetPartiallySubstitutedPackRAII {
     Derived &Self;
     TemplateArgument Old;
+    Sema::ArgumentPackSubstitutionIndexRAII ResetPackSubstIndex;
----------------
ilya-biryukov wrote:

Could you add a short comment mentioning that we need this because many code paths assume correct index corresponds to the pack being present and do not do any extra checking?

https://github.com/llvm/llvm-project/pull/108197


More information about the cfe-commits mailing list