sethp wrote:
In playing around with this some more, I found it was pretty effective for me
to have an intializer-like expression (as in
[e769f15](https://github.com/llvm/llvm-project/pull/74852/commits/e769f158c8ee001e95299ce4c83e5250e2a8f963)
), because then I could copy/paste the output from clang directly into a
`static_assert()` in the source file and start cutting it down interactively
with clangd's guidance and my editor identifying common subexpressions:
```c++
// evaluates to 'A{0, {0, 3, 4}, 5} == A{1, {2, 3, 4}, 5}' ->
static_assert(A{0, {0, 3, 4}, 5} == A{1, {2, 3, 4}, 5}); // ->
static_assert(A{0, {0}, 5} == A{1, {2}, 5}); // ->
static_assert(A{0, {0}} == A{1, {2}});
```
gets me to a minimal "diff" of the complex struct plus some nice paths to the
different elements:

I could reproduce that in the textual output, but I worry that'd be too noisy
without the dimming/color text effects.
https://github.com/llvm/llvm-project/pull/74852
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits