Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread David Malcolm
On Fri, 2024-09-27 at 10:21 -0500, Thor Preimesberger wrote: > That's all correct. I think I got it. > > There are times where the code is emitting a json::object* that is > contained in another json object. Is it good style to return these > still as a unique_ptr?  Probably not. If you have a j

Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread Thor Preimesberger
That's all correct. I think I got it. There are times where the code is emitting a json::object* that is contained in another json object. Is it good style to return these still as a unique_ptr? I'm looking over what I wrote again, and in some parts I wrap the new json object in a unique_ptr (as a

Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread David Malcolm
On Sat, 2024-09-21 at 22:49 -0500, -thor wrote: > From: thor > > This is the second revision of: > >   > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662849.html > > I've incorporated the feedback given both by Richard and David - I > didn't > find any memory leaks when testing

Re: [PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-27 Thread Richard Biener
On Sun, Sep 22, 2024 at 5:49 AM -thor wrote: > > From: thor > > This is the second revision of: > > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662849.html > > I've incorporated the feedback given both by Richard and David - I didn't > find any memory leaks when testing in valg

[PATCH 1/2] JSON Dumping of GENERIC trees

2024-09-21 Thread 4444-thor
From: thor This is the second revision of: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662849.html I've incorporated the feedback given both by Richard and David - I didn't find any memory leaks when testing in valgrind :) As before: This patch allows the compiler to dump GENERI