[llvm-dev] Coding style. VariableNames, not variableNames?

Jon Chesterfield via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 25 01:07:21 PDT 2019


Hey,

A colleague just pointed out that the style guide says:
*Variable names* ... should be camel case, and start with an upper case
letter

I was under the impression that variables were supposed to be camel case,
without a leading upper case, as currently recommended for function names.
Is this a somewhat recent change? If so, could someone share a regex /
script for updating the previous style to this one?

This implies that the traditional i,j,k loop indices should now be spelled
I,J,K. Is is worth making an exception for single character variables where
the meaning is implicit from the context?

As an edge case, should function pointers be leading lower case (as they're
functions) or leading upper case (as they're variables)?

Cheers,

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190425/edc2b9fd/attachment.html>


More information about the llvm-dev mailing list