[PATCH] D108265: .clang-tidy: Push variable related readability-identifier-naming options down to projects

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 14:45:59 PDT 2021


dblaikie added a comment.

In D108265#2952555 <https://reviews.llvm.org/D108265#2952555>, @MaskRay wrote:

> The number of top-level projects using `VariableName` is smaller than the number of projects not using the style.
> The top-level variable style just provoked projects to either override the options (flang/, lld/, mlir/) or disable the check.
> `VariableName` is not even a suitable suggestion for new projects.
>
> So the  `VariableName` setting does not belong to the top-level. llvm/ and clang-tools-extra/ should set it by themselves.
>
>> CodingStandards.rst: "Variable names should be nouns (as they represent state). The name should be camel case, and start with an upper case letter (e.g. Leader or Boats)."
>
> This applies to llvm/, clang/, clang-tools-extra/ (and perhaps something I missed), but is not true for many other projects (flang,lld,lldb,mlir,libcxx,libcxxabi,libunwind,compiler-rt,...)

I think it applies to the LLVM umbrella/project as a whole - and should apply to any new projects. (I think it's a mistake that projects started that did not adhere to this naming convention (the same as if they didn't adhere to other aspects of the LLVM coding standard) and created divergence where the coding standards are meant to avoid that/promote consistency)

I think it's appropriate for the top level default to match what's described in the LLVM Coding Standards document & to change that document should be an llvm-dev discussion. (I thought there was one a while back, though I don't recall any specific conclusions coming out of that)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108265



More information about the llvm-commits mailing list