[llvm-bugs] [Bug 51074] New: [clang-format] K&R C function definitions are formatted incorrectly

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 13 04:35:11 PDT 2021


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

            Bug ID: 51074
           Summary: [clang-format] K&R C function definitions are
                    formatted incorrectly
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: owenpiano at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

.clang-format:
BaseOnStyle: LLVM

Input:
char f(s, i)
const char *s;
unsigned short i;
{ return s[i]; }

Incorrect output:
char f(s, i) const char *s;
unsigned short i;
{ return s[i]; }

The correct output should be exactly the same as the input.

-- 
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/20210713/b6f3e96c/attachment.html>


More information about the llvm-bugs mailing list