<div dir="ltr">The assert was the one later in the function:<div><div> assert(getMemoizationData() && Other.getMemoizationData());</div></div><div>My best guess as to what happened was my configuration had a container which reordered the comparison, making the QualType comparison happen earlier than it would otherwise.</div><div>r255937 has a small test case which demonstrates where the assert used to happen.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 17, 2015 at 2:05 PM, 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"><div class="HOEnZb"><div class="h5">On Thu, Dec 17, 2015 at 5:02 PM, Richard Trieu <<a href="mailto:rtrieu@google.com">rtrieu@google.com</a>> wrote:<br>
> On Thu, Dec 17, 2015 at 5:47 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
> wrote:<br>
>><br>
>> On Wed, Dec 16, 2015 at 11:46 PM, Richard Trieu via cfe-commits<br>
>> <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>> > Author: rtrieu<br>
>> > Date: Wed Dec 16 22:46:48 2015<br>
>> > New Revision: 255875<br>
>> ><br>
>> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=255875&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=255875&view=rev</a><br>
>> > Log:<br>
>> > Add QualType case to operator< for DynTypedNode.<br>
>> ><br>
>> > This allows sorting DynTypedNode's which are QualType's since QualType<br>
>> > does<br>
>> > not have memoization.<br>
>> ><br>
>> > Modified:<br>
>> > cfe/trunk/include/clang/AST/ASTTypeTraits.h<br>
>> ><br>
>> > Modified: cfe/trunk/include/clang/AST/ASTTypeTraits.h<br>
>> > URL:<br>
>> > <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTTypeTraits.h?rev=255875&r1=255874&r2=255875&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTTypeTraits.h?rev=255875&r1=255874&r2=255875&view=diff</a><br>
>> ><br>
>> > ==============================================================================<br>
>> > --- cfe/trunk/include/clang/AST/ASTTypeTraits.h (original)<br>
>> > +++ cfe/trunk/include/clang/AST/ASTTypeTraits.h Wed Dec 16 22:46:48 2015<br>
>> > @@ -271,6 +271,10 @@ public:<br>
>> > if (!NodeKind.isSame(Other.NodeKind))<br>
>> > return NodeKind < Other.NodeKind;<br>
>> ><br>
>> > + if (ASTNodeKind::getFromNodeKind<QualType>().isSame(NodeKind))<br>
>> > + return getUnchecked<QualType>().getAsOpaquePtr() ==<br>
>> > + Other.getUnchecked<QualType>().getAsOpaquePtr();<br>
>> > +<br>
>><br>
>> This only tests for equality, not comparison, which means operator< no<br>
>> longer has a strict weak ordering. Also, there are no tests for this<br>
>> change.<br>
>><br>
>> ~Aaron<br>
>><br>
> r255929 changes the operator to '<', which should fix this. I don't have a<br>
> test case since the assertion was triggered in a recently checked in Clang<br>
> Tidy test that only fails in a special configuration that I couldn't<br>
> reproduce in a clean change.<br>
<br>
</div></div>Thank you, that commit looks much better! Couldn't we add a test in<br>
ASTTypeTraitsTests.cpp as a unit test, or was the assert specific to<br>
that particular special configuration?<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
>> > if (ASTNodeKind::getFromNodeKind<TypeLoc>().isSame(NodeKind)) {<br>
>> > auto TLA = getUnchecked<TypeLoc>();<br>
>> > auto TLB = Other.getUnchecked<TypeLoc>();<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > cfe-commits mailing list<br>
>> > <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>