[PATCH] D82711: [clang-tidy] Fix hicpp-named-paramater

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 05:54:16 PDT 2020


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

In D82711#2119714 <https://reviews.llvm.org/D82711#2119714>, @njames93 wrote:

> In D82711#2119651 <https://reviews.llvm.org/D82711#2119651>, @aaron.ballman wrote:
>
> > I do not understand the justification here -- `IdentifierNamingCheck` and `NamedParameterCheck` are two different checks. How do you know that this swap continues to honor the HIC++ coding standard?
>
>
> Because thats what the documentation says
>  In docs/checks/hicpp-named-paramater.rst:
>
>   hicpp-named-parameter
>   This check is an alias for readability-named-parameter.
>  
>   Implements rule 8.2.1.
>
> From https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/definitions:
>
>   8.2.1 Make parameter names absent or identical in all declarations
>
> Its fairly obvious this has been incorrect since its inception. Arguable readability-named-paramater doesn't quite cover the extent of the HIC++ coding standard, but it goes a lot further than the identifier-naming-check does.


Oof! Good catch! Thanks for the explanation, I was missing that bit.

> EDIT: Down the line I may create a check that fully enforces rule 8.2.1, but for now this is a good small step

Agreed. LGTM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82711





More information about the cfe-commits mailing list