<div dir="ltr">Yes, there is: I added one to libc++abi in fact. This has been a previous point of contention between myself and others. I feel like we should be duplicating the libc++abi test suite for demangling (which is a pretty large set) in LLVM as we duplicate the demangler.<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 11:08 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Jan 24, 2017 at 1:52 PM, Saleem Abdulrasool via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: compnerd<br>
> Date: Tue Jan 24 12:52:19 2017<br>
> New Revision: 292965<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=292965&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=292965&view=rev</a><br>
> Log:<br>
> Demangle: avoid butchering parameter type<br>
><br>
> When demangling a CV-qualified function type with a final parameter with<br>
> a reference type, we would insert the CV qualification on the parameter<br>
> rather than the function, and in the process adjust the insertion point<br>
> by one extra, splitting the type name. This avoids doing so, even<br>
> though the attribution is still incorrect.<br>
><br>
> Modified:<br>
> llvm/trunk/lib/Demangle/<wbr>ItaniumDemangle.cpp<br>
<br>
</span>Is there a way to provide a test case for this?<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Modified: llvm/trunk/lib/Demangle/<wbr>ItaniumDemangle.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/ItaniumDemangle.cpp?rev=292965&r1=292964&r2=292965&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Demangle/ItaniumDemangle.cpp?<wbr>rev=292965&r1=292964&r2=<wbr>292965&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- llvm/trunk/lib/Demangle/<wbr>ItaniumDemangle.cpp (original)<br>
> +++ llvm/trunk/lib/Demangle/<wbr>ItaniumDemangle.cpp Tue Jan 24 12:52:19 2017<br>
> @@ -1665,9 +1665,9 @@ static const char *parse_type(const char<br>
> if (is_function) {<br>
> size_t p = db.names[k].second.size();<br>
> if (db.names[k].second[p - 2] == '&')<br>
> - p -= 3;<br>
> - else if (db.names[k].second.back() == '&')<br>
> p -= 2;<br>
> + else if (db.names[k].second.back() == '&')<br>
> + p -= 1;<br>
> if (cv & 1) {<br>
> db.names[k].second.insert(p, " const");<br>
> p += 6;<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div>