[cfe-dev] clang-format: setting to control spaces in C arrays?

James Dennett james.dennett at gmail.com
Tue Jul 22 12:16:27 PDT 2014


On Tue, Jul 22, 2014 at 11:55 AM, Sean McBride <sean at rogue-research.com> wrote:
> Hi all,
>
> Try as I may, I can't find if there is a setting to _stop_ clang-format from changing this:
>
>         float pattern[] = {7.0f, 1.0f};
>
> into this:
>
>         float pattern[] = { 7.0f, 1.0f };
>
> Is there one?

Yes... but I don't know which specific setting it is.  (In Google
style, clang-format will rewrite the latter to the former.)

-- James



More information about the cfe-dev mailing list