<div dir="ltr">Yeah, may well be the case - I don't /think/ LLVM quite matches the exact syntax of the GCC demangler either (I seem to recall constants as non-type template parameters were a bit different).</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 20, 2017 at 10:36 AM Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 20, 2017 at 10:17 AM, Robinson, Paul <span dir="ltr"><<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_5326319421298086072m_9017806765802885266WordSection1"><span>
<p class="MsoNormal" style="margin-left:.5in">Just to be clear - once LLVM has its own demangler, it should probably use it on all platforms, so there'd be no worry about different behavior between LLVM on Windows and LLVM elsewhere.<br>
<br>
But that said, it's probably still important/worthwhile to make sure it's consistent with the platform demangler.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</span><p class="MsoNormal"><a name="m_5326319421298086072_m_9017806765802885266__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Personally I would be all for a unit test program that verified against the Windows API when run on Windows, and against canned output
 on non-Windows.</span></a></p></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>That was my preference too, but looks like getting the exact same results as the Windows API is not that easy nor worthwhile when it comes to arbitrary formatting rules. For example, IIRC, UnDecorateSymbolName generates not "<font face="monospace, monospace">int const* const* x</font>" nor "<font face="monospace, monospace">int const * const * x</font>" but "<font face="monospace, monospace">int const* const * x</font>". This is simply odd, and I'd guess we don't want to mimic all these corner cases. So mixing our own demangler and the Windows demangler can cause unnecessary churn.<br></div></div></div></div>
</blockquote></div>