[llvm-bugs] [Bug 39216] New: [clang-format] C99 designated initializers confused for Objective-C code

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 8 05:18:15 PDT 2018


            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: unassignedclangbugs at nondot.org
          Reporter: jens.goldberg at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181008/f41369cb/attachment.html>

More information about the llvm-bugs mailing list