Re: Making C function declaration parameter names consistent with corresponding definition names
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-17T19:58:41Z
Lists: pgsql-hackers
Attachments
- v2-0002-Harmonize-parameter-names-in-pg_dump-pg_dumpall.patch (application/octet-stream) patch v2-0002
- v2-0003-Consistently-use-named-parameters.patch (application/octet-stream) patch v2-0003
- v2-0001-Harmonize-parameter-names.patch (application/octet-stream) patch v2-0001
On Sat, Sep 17, 2022 at 11:36 AM Peter Geoghegan <pg@bowt.ie> wrote: > I'd be surprised if this created more than 3 minutes of extra work for > you when updating the timezone code. Attached revision adds a new, third patch. This fixes all the warnings from clang-tidy's "readability-named-parameter" check. The extent of the code churn seems acceptable to me. BTW. there are just a couple of remaining unfixed "readability-inconsistent-declaration-parameter-name" warnings -- legitimately tricky cases. These are related to simplehash.h client code, where we use the C preprocessor to simulate C++ templates (Bjarne strikes again). It would be possible to suppress the warnings by making the client code use matching generic function-style parameter names, but that doesn't seem like an improvement. If we're going to adapt a project policy around parameter names, then we'll need a workaround -- probably just by suppressing a handful of tricky warnings. For now my focus is cleaning things up on HEAD. -- Peter Geoghegan
Commits
-
Harmonize parameter names in pg_dump/pg_dumpall.
- 20e69daa1348 16.0 landed
-
Harmonize parameter names in contrib code.
- 0faf7d933f62 16.0 landed
-
Harmonize more lexer function parameter names.
- 8fb4e001e9c1 16.0 landed
-
Harmonize parameter names in ecpg code.
- 3535ebce5dc5 16.0 landed
-
Harmonize lexer adjacent function parameter names.
- aab06442d488 16.0 landed
-
Harmonize more parameter names in bulk.
- a601366a460f 16.0 landed
-
Harmonize parameter names in storage and AM code.
- bfcf1b34805f 16.0 landed
-
Harmonize heapam and tableam parameter names.
- 4bac9600f09a 16.0 landed
-
Consistently use named parameters in timezone code.
- c4f8e89fef3d 16.0 landed
-
Consistently use named parameters in regex code.
- bc2187ed63c5 16.0 landed
-
Harmonize reorderbuffer parameter names.
- 035ce1feb2ed 16.0 landed
-
Make check_usermap() parameter names consistent.
- 4274dc223ce7 16.0 landed
- 1ef00afe2e45 15.0 landed
- 44933010ceb3 14.6 landed
- b7558111aba2 13.9 landed
- c1dd5a8aedc7 12.13 landed
- f01fd89b1537 11.18 landed
- 109836a14fe9 10.23 landed