[PATCH] D39127: Fix template parameter default args missed if redecled

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 22 09:06:26 PDT 2017


erichkeane added inline comments.


================
Comment at: lib/Sema/SemaTemplate.cpp:4811
+  TemplateParameterList *Params =
+      cast<TemplateDecl>(Template->getMostRecentDecl())
+          ->getTemplateParameters();
----------------
mstorsjo wrote:
> How does this work if there's another forward declaration missing the parameter later? Is the logic with "most recent" ok, or should it be "most qualified/complete" instead?
I'm not sure the case you mean.  Any future declarations with fewer parameters would be aspecialization and a different decl, right?


https://reviews.llvm.org/D39127





More information about the cfe-commits mailing list