================
@@ -291,6 +291,10 @@ struct PrintingPolicy {
   /// parameters.
   unsigned AlwaysIncludeTypeForTemplateArgument : 1;
 
+  // Prints "class" keyword before type template arguments. This is used when
+  // printing a function via the _FUNCTION__ or __func__ macro in MSVC mode.
+  unsigned UseClassForTemplateArgument : 1;
----------------
AaronBallman wrote:

This comment really threw me off because I thought this was about `template 
<typename Ty>` vs `template <class Ty>` and it's actually about whether we 
print an elaborated type specifier or not.

It would be nice if we could reuse `SuppressElaboration` for this purpose 
instead of adding a new policy field for it, but do we not have an 
`ElaboratedType` for the template argument and so we would never try to print 
the elaboration. So we really need the opposite, which is 
`ForcePrintingAsElaboratedType` (or similar) as a more general type printing 
feature. So that code like `S` will force writing `struct S` or `class S` even 
though an elaborated type was not used in source. WDYT?

https://github.com/llvm/llvm-project/pull/67592
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to