[clang] Ignore template parameter visibility (PR #72092)

John McCall via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 20:12:41 PST 2023


rjmccall wrote:

> I cannot figure out a test case for `TemplateArgument::Expression`. I wonder whether it applies to `X<&s.s> x5;` (address of static member), which Clang doesn't support.

It's primarily used as a dependent template argument.  I'm not sure off-hand that it's *never* canonical, though, given all the ways the language has extended template arguments in the last decade.

> After the change, does it seem more feasible to ignore template parameters?

Hmm.  You're right that considering the type of a non-type template argument would be enough to give the right visibility to my example.  It would not be enough if the template was used as a template template argument, though.

I suspect the code just needs to be restructured a bit to get the behavior I'm asking for, but I'll need to think about it.

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


More information about the cfe-commits mailing list