<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 3:58 PM, Enrico Granata <span dir="ltr"><<a href="mailto:egranata@apple.com" target="_blank">egranata@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Aug 6, 2015, at 3:50 PM, Siva Chandra <<a href="mailto:sivachandra@google.com" target="_blank">sivachandra@google.com</a>> wrote:</div><br><div><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Thu, Aug 6, 2015 at 3:38 PM, Enrico Granata<span> </span><span dir="ltr"><<a href="mailto:egranata@apple.com" target="_blank">egranata@apple.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Aug 6, 2015, at 3:33 PM, Siva Chandra <<a href="mailto:sivachandra@google.com" target="_blank">sivachandra@google.com</a>> wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 2:43 PM, Enrico Granata<span> </span><span dir="ltr"><<a href="mailto:egranata@apple.com" target="_blank">egranata@apple.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>To be honest, my favorite approach would be to modify clang’s TypePrinter to do this, and then hooking up GetDisplayTypeName() to use whatever flags would be necessary to invoke that bit of magic</div></div></blockquote><div><br></div><div>Do you mean that clang's "pretty printer" should be made extensible by a script?</div><div> </div></div></div></div></div></blockquote><div><br></div></span><div>Nope, what I am imagining is not an extensible system</div><div><br></div><div>When LLDB goes to print a type it asks the compiler “what is the name of this type that I should display?”</div><div>By default, clang prints the fully specialized template, including type arguments that have their default value. My theory is that we would want to add a mode to the type printer to say “simplify type name”, and that would do sensible things to get a display name that is more compact</div></div></div></blockquote><div><br></div><div>So, how would clang know about the "simplified" or "friendly" name for a type? Even in case of standard library types, the underlying types (with unfriendly type names) could be anything. For example, libstdc++ and STLport have different underlying naming conventions. So does libc++ I would imagine (I have not spent enough time yet staring at libc++ code).</div><div><br></div></div></div></blockquote><div><br></div></span><div>The obvious mechanism is that the compiler has knowledge of the structure of the type - so it can make printing decisions based on that type structure</div><div>In this case, I imagine a viable approach would be having rules like omitting the values of template arguments that have a default value, omit inlined namespaces, ...</div></div></div></blockquote><div><br></div><div>OK. I will be on vacation next week. Will give this idea a shot after getting back. </div></div></div></div>