[PATCH v3] Add .clang-format style file

Florian Weimer fw@deneb.enyo.de
Wed Mar 30 20:14:22 GMT 2022


* Noah Goldstein:

>> > +UseTab:          Never
>>
>> I prefer not using tabs, but others disagree, and most of the source
>> files use tabs instead of 8 spaces (and not just for indentation).
>
> +1 but yeah the consistent style seems to be tabs so will update in v4.

Is there an option to use tabs only if the file contains tab?

>> > +ForEachMacros:
>> > +  - 'FOR_EACH_IMPL'
>> > +  - 'list_for_each'
>> > +  - 'list_for_each_prev'
>> > +  - 'list_for_each_prev_safe'
>>
>> If this is a YAML file, do these duplicate FoEachMacros keys have any
>> effect?  Only the second one is relevant to glibc.
>
> They all seem to have an effect.

<https://yaml.org/spec/1.2.2/#mapping> says that keys have to be
unique, so I don't think to ForEachMacros is valid YAML syntax.

> What do you mean only the second is relevant?

glibc does not use the Boost and Qt macros.


More information about the Libc-alpha mailing list