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

            Bug ID: 39216
           Summary: [clang-format] C99 designated initializers confused
                    for Objective-C code
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: jens.goldb...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

The following C99 header file is confused for Objective-C code:

struct foo{
    int a;
};

struct foo bar[2] = {
    [0] = {.a = 1},
    [1] = {.a = 1}
};

# clang-format -style=file test.h
Configuration file(s) do(es) not support Objective-C: /tmp/.clang-format

A workaround is to rename the file to "something.c" before formatting, or
reading it from stdin with "-assume-filename something.c".

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

Reply via email to