[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #67592)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 06:19:28 PST 2024


================
@@ -326,6 +326,10 @@ struct PrintingPolicy {
   LLVM_PREFERRED_TYPE(bool)
   unsigned AlwaysIncludeTypeForTemplateArgument : 1;
 
+  // Whether to print the type as an elaborated type. This is used when
+  // printing a function via the _FUNCTION__ macro in MSVC mode.
+  unsigned ForcePrintingAsElaboratedType : 1;
----------------
AaronBallman wrote:

It's not clear to me how this new option should interact with `SuppressElaboration` and `SuppressTagKeyword` or whether we should have it at all. I would have expected that the existing type printing options (like `FullyQualifiedName`) would be sufficient and that we were failing to honor those in template arguments?

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


More information about the cfe-commits mailing list