[PATCH] D57896: Variable names rule

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 21 14:49:22 PST 2019


probinson added a comment.

In D57896#1406412 <https://reviews.llvm.org/D57896#1406412>, @MyDeveloperDay wrote:

> In D57896#1406407 <https://reviews.llvm.org/D57896#1406407>, @zturner wrote:
>
> > If I read the post correctly, it was actually agreeing with me (because it said "to reinforce your point...".  Meaning that something such as `lowerCaseCamel` would be the third style being referred to
>
>
> Correct! just acknowledging your point from a different perspective.


Doh!  Sorry for the noise.

It looks like the RFC thread has mostly turned into a transition-plan debate, so should we work on the actual convention description here? Extracting the naming conventions from the 3.6-era link mentioned above, we have:

- types and classes are UpperCamelCase (this is unchanged from current LLVM style)
- methods are UpperCamelCase (this is also the old LLVM style IIRC)
- variables are snake_case
- static data members add "g_" prefix to variable style (although I see a proposal for "s_" instead)
- nonstatic data members add "m_" prefix to variable style

Did I miss anything really important?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57896





More information about the cfe-commits mailing list