[PATCH] D128095: [clang] Improve diagnostics for expansion length mismatch

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 06:14:03 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:103-106
+    VisitSubstNonTypeTemplateParmPackExpr(SubstNonTypeTemplateParmPackExpr *E) {
+      Unexpanded.push_back({E, E->getParameterPackLocation()});
+      return true;
+    }
----------------
erichkeane wrote:
> mizvekov wrote:
> > aaron.ballman wrote:
> > > Do we need to handle `FunctionParmPackExpr` as well?
> > Right, that and SubstTemplateTemplateParmPack are the two missing cases we could handle here, and perhaps that would allow us to get rid of that 'from outer parameter packs' diagnostics completely.
> > 
> > Would you prefer to handle everything in one patch?
> I think I'm alright doing those in a followup patch.
I'm also fine handling it in a follow-up if the changes are involved.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128095/new/

https://reviews.llvm.org/D128095



More information about the cfe-commits mailing list