<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-format: cannot correctly format the C source code with CPP keywords."
   href="https://bugs.llvm.org/show_bug.cgi?id=47571">47571</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format: cannot correctly format the C source code with CPP keywords.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Formatter
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>shanyaoxing12@outlook.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is my configuration file:

```
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AllowShortIfStatementsOnASingleLine: false
BasedOnStyle: LLVM
BreakBeforeBraces: WebKit
ColumnLimit: 0
IndentWidth: 4
IndentCaseLabels: false
Language: Cpp
TabWidth: 4
UseTab: Never
```

This is part of my code, it has been formatted:

```c
/* linkedlist.h */
#ifndef LINKEDLIST_H
#define LINKEDLIST_H

typedef struct node *link;
struct node {
    unsigned char item;
    link next;
};

link make_node(unsigned char item);
void free_node(link p);
link search(unsigned char key);
void insert(link p);
void delete (link p);
void traverse(void (*visit)(link));
void destroy(void);
void push(link p);
link pop(void);

#endif
```

In theory, my `delete` function declaration should be formatted as: `void
delete(link p)`;
However, the formatter added a space between `delete` and `(`. This seems to
treat my `delete` signature as a keyword.
This is wrong for C code.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>