[PATCH] D134453: Disambiguate type names when printing NTTP types

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 12:32:22 PDT 2022


aaron.ballman added a comment.

In D134453#3868821 <https://reviews.llvm.org/D134453#3868821>, @DoDoENT wrote:

> In D134453#3868789 <https://reviews.llvm.org/D134453#3868789>, @dblaikie wrote:
>
>> I still don't think "keep full NTTP type printing behind a policy, for those that want/need that" is a policy we should add. String printed names aren't meant to be a tool for type reflection - the AST can be queried for that information.
>
> I agree on that matter.
>
> However, I'm building my clang with this policy enabled by default to provide my developers with GCC/MSVC-like verbosity in diagnostic messages. They prefer it that way.

@dblaikie -- but I thought we agreed that we would always print the full type, so the policy in this case is to print information *less* suitable for type reflection, right?

However, given that we don't think we'll use that policy in the tree, can that policy can be kept in your downstream instead @DoDoENT?



================
Comment at: clang/include/clang/AST/PrettyPrinter.h:78
         CleanUglifiedParameters(false), EntireContentsOfLargeArray(true),
-        UseEnumerators(true) {}
+        UseEnumerators(true), AlwaysIncludeTypeForNonTypeTemplateArgument(false) {}
 
----------------
Should this be defaulting to false? I thought we wanted to always include the type for NTTP printing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134453



More information about the cfe-commits mailing list