Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

C99 structs declarations indented badly #36107

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR37134
Status NEW
Importance P normal
Reported by Campbell Barton (ideasman42@gmail.com)
Reported on 2018-04-14 08:47:10 -0700
Last modified on 2018-04-14 08:48:50 -0700
Version 6.0
Hardware PC Linux
CC djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments clang-format (6024 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 20191
clang-format used

The following struct in C begins as follows:

    struct ApplicationState app_state = {
        .signal = {
            .use_crash_handler = true,
            .use_abort_handler = true,
        },
        .exit_code_on_error = {
            .python = 0,
        }
    };

Afterwards:

    struct ApplicationState app_state = {.signal =
                                                 {
                                                         .use_crash_handler = true,
                                                         .use_abort_handler = true,
                                                 },
                                         .exit_code_on_error = {
                                                 .python = 0,
                                         }};

... while an exact match to the original code might not be possible. Something
close should be possible.

Attached clang-format, however I don't think it's especially related to this
report.

We're looking at using clang-format, RFC for context - perhaps it's of
interest: https://developer.blender.org/T53211
Quuxplusone commented 6 years ago

Attached clang-format (6024 bytes, text/plain): clang-format used