Skip to content

Trailing Paren for spilled function args not on new line #1

Description

@TG-Techie

Currently (#6c8450b), the desired result is as below in A. However, clang-format is producing B.

It looks like eh solution exists; The clang-format docs have a 'BlockIndent' option for the 'AlignAfterOpenBracket' value.
adding this to the format file results in:

Error:

/usr/local/opt/llvm/bin/clang-format -style=file -fallback-style=webkit -assume-filename=/<...>/main.c
/<...>/.clang-format:10:24: error: unknown enumerated scalar
  AlignAfterOpenBracket: BlockIndent
                         ^~~~~~~~~~~
  Error reading /<...>/.clang-format: Invalid argument

A:

apply_effects(
        snapshot_buffer,
        video_memory,
        (effects_t){
                .width = 320,
                .height = 240,
                .filters = filters,
                .transforms = transforms,
        }
);

B:

apply_effects(
        snapshot_buffer,
        video_memory,
        (effects_t){
                .width = 320,
                .height = 240,
                .filters = filters,
                .transforms = transforms,
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions