<div dir="ltr">(relaying from IRC)<div><br>The key is that default constructing an iterator must form a valid end iterator for an empty range. This is a requirement for a lot of iterator types, and so the epoch stuff should support it. I think it would be fine to say that the epoch test is passed if both handles have a nullptr epoch address or both handles have a non-null epoch address and the epoch's match for both. Seem reasonable?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 7:49 PM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As far as I can tell, DeclContext::lookups [1] tries to create an<br>
empty range using two default constructed<br>
DeclContext::all_lookups_iterator[2].<br>
DeclContext::all_lookups_iterator contains DenseMapIterators.<br>
<br>
[1]: <a href="https://github.com/llvm-mirror/clang/blob/master/include/clang/AST/DeclLookups.h#L81" target="_blank">https://github.com/llvm-mirror/clang/blob/master/include/clang/AST/DeclLookups.h#L81</a><br>
[2]: <a href="https://github.com/llvm-mirror/clang/blob/master/include/clang/AST/DeclLookups.h#L35" target="_blank">https://github.com/llvm-mirror/clang/blob/master/include/clang/AST/DeclLookups.h#L35</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Mar 2, 2015 at 7:21 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:<br>
><br>
><br>
> On Tue, Mar 3, 2015 at 12:53 PM, Sanjoy Das <<a href="mailto:sanjoy@playingwithpointers.com">sanjoy@playingwithpointers.com</a>><br>
> wrote:<br>
>><br>
>> I'm about to revert this because it broke clang.<br>
>><br>
>> The reason it broke clang is that clang assumes a default constructed<br>
>> DenseMapIterator is comparable with another default constructed<br>
>> DenseMapIterator.<br>
><br>
><br>
><br>
> Where does this happen?<br>
> I'd really like to see an actual example of how this makes sense to do<br>
><br>
> i have no idea whether it's generally considered "normal" to do this, but<br>
> i'm actually really curious to see a case where it is the right thing to do<br>
> :)<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>