rsmith added a comment.

In D141625#4052820 <https://reviews.llvm.org/D141625#4052820>, @dblaikie wrote:

> Yeah, might be nice to document where the instability comes from - if it 
> comes from a DenseMap or similar, then a test that fails either in forward or 
> reverse iteration mode would be nice to have.

`Scope::decls` is iterating over a `SmallPtrSet`. This might be a little 
annoying to create a test for, because it'll only be unstable if we have two 
decls in the same prototype scope that get allocated into different slabs by 
the bump ptr allocator, but maybe something like:

  void f(struct A *p, sizeof(0 + 0 + 0 + 0 + ... + 0), struct B *q);

... would be enough (with sufficient subexpressions to fill a whole slab). Then 
we can build a .pch for that twice and check that it comes out identical.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141625

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

Reply via email to