[LLVMdev] lld coding style

Dmitri Gribenko gribozavr at gmail.com
Thu Oct 9 02:17:03 PDT 2014


On Thu, Oct 9, 2014 at 3:31 AM, Chandler Carruth <chandlerc at google.com> wrote:
>
> On Wed, Oct 8, 2014 at 7:20 PM, Nick Kledzik <kledzik at apple.com> wrote:
>>
>> The lld conventions for ivars is a leading underscore followed by a
>> lowercase letter.  The reserved identifiers are a leading underscore
>> followed by an uppercase letter.  There is no conflict.
>
>
> And I didn't say that there was. They are *close*. Too close. People make
> mistakes and get it wrong.

I like how LLD style improves upon LLVM style, but the concern about
reserved identifiers is very real.  May I suggest a variation: use a
trailing underscore for member variables instead of a trailing
underscore?

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the llvm-dev mailing list