void added a subscriber: urnathan.
void added a comment.

In D121063#3363852 <https://reviews.llvm.org/D121063#3363852>, @erichkeane 
wrote:

> I suspect this works because we never really treated this as a LL, just as a 
> pair of iterators.  Two things:
>
> 1- Can you produce some situation where this is valuable to do?

Yes. In the randstruct feature I'm working on, if this code isn't there it goes 
into an infinite loop: https://reviews.llvm.org/D120857. It's possible that the 
way it's constructing and using the list of Decls is somehow wrong, but I 
wasn't able to identify how.

> 2- Can you switch this over so that the NextInContextAndBits initializes to 
> nullptr/0 so that this line isn't necessary?  I can't imagine we ever re-call 
> this on a decl and have the answer be different.

I'll give it a shot. I'm with @urnathan though that it should have already been 
like that. :-) Probably just an oversight.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121063/new/

https://reviews.llvm.org/D121063

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to