Re: [RFC PATCH] reftable: fixup for broken __FUNCTION__ use
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Aug 30, 2021, 12:11 UTC
- Message-ID
- <CAFQ2z_MRrxBgpP8wy32pAuzQb0BAEH-jSUZA01Atxs4DzRQvKQ@mail.gmail.com>
- In-Reply-To
- <patch-1.1-f7d9c8af0c-20210827T055608Z-avarab@gmail.com>
On Fri, Aug 27, 2021 at 8:01 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 5 quoted lines
> > The use of the __FUNCTION__ macro is non-standard, in this case all > we're doing with it is generating a prettier unique filename based on > the name of the function that makes it, presumably to make ad-hoc > debugging easier.
..
Show 5 quoted lines
> It's smaller because it punts on the whole notion of adding the > function name to the filename, as argued above I think __LINE__ should > be sufficient here (and is probably already overkill). The only reason > to add __FUNCTION__ or __LINE__ to the filename is presumably for > one-off ad-hoc debugging.
It's there so it's easy to track down which tests forget to cleanup after they run, and __LINE__ works for this as well.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado