[llvm-bugs] [Bug 37134] New: C99 named structs not working

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 14 08:47:10 PDT 2018


            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: unassignedclangbugs at nondot.org
          Reporter: ideasman42 at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

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,


    struct ApplicationState app_state = {.signal =
                                                         .use_crash_handler =
                                                         .use_abort_handler =
                                         .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

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180414/f9d441d7/attachment-0001.html>

More information about the llvm-bugs mailing list