[PATCH] D139400: [clang] Show error when a local variables is passed as default template parameter

Jens Massberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 8 08:46:32 PST 2022


massberg added a comment.

In D139400#3974624 <https://reviews.llvm.org/D139400#3974624>, @shafik wrote:

> It looks like we have an existing message for the regular function case

Thanks! We can indeed reuse this error message.

In D139400#3974654 <https://reviews.llvm.org/D139400#3974654>, @shafik wrote:

> It looks like the existing diagnostic is issued by `CheckDefaultArgumentVisitor`. I think you can reuse it here but not 100% on that.

Thanks for the pointer! `CheckDefaultArgumentVisitor` is for default arguments of functions. As it does many additional checks we cannot reuse it for testing default  arguments of templates.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139400



More information about the cfe-commits mailing list