https://bugs.llvm.org/show_bug.cgi?id=37134

            Bug ID: 37134
           Summary: C99 named structs not working
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Created attachment 20191
  --> https://bugs.llvm.org/attachment.cgi?id=20191&action=edit
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to