<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 in Allman style always indents the contents of extern "C" blocks in C headers"
   href="https://bugs.llvm.org/show_bug.cgi?id=37272">37272</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format in Allman style always indents the contents of extern "C" blocks in C headers
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>shlomif@shlomifish.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>With this .clang-format:

<<<<<<<<<<<<<
---
BasedOnStyle:  LLVM
AlignAfterOpenBracket: DontAlign
BreakBeforeBraces: Allman
IndentWidth:     4
SortIncludes:    false
BraceWrapping:
    AfterExternBlock: false
<span class="quote">>>>>>>>>>>>>></span >

I am getting the contents of extern "C" indented in this simple C header and
all other headers I tried:

<<<<<<<<<<<<<
/*
 * This file is part of patsolve. It is subject to the license terms in
 * the LICENSE file found in the top-level directory of this distribution
 * and at <a href="https://bitbucket.org/shlomif/patsolve-shlomif/src/LICENSE">https://bitbucket.org/shlomif/patsolve-shlomif/src/LICENSE</a> . No
 * part of patsolve, including this file, may be copied, modified, propagated,
 * or distributed except according to the terms contained in the COPYING file.
 *
 * Copyright (c) 2002 Tom Holroyd
 */
#pragma once

#include <stdio.h>

#ifdef __cplusplus
extern "C"
{
#endif

    static inline void fc_solve_msg(const char *msg, ...)
    {
        va_list ap;

        va_start(ap, msg);
        vfprintf(stderr, msg, ap);
        va_end(ap);
    }

#ifdef __cplusplus
}
#endif

<span class="quote">>>>>>>>>>>>>></span >

I don't want that! Please provide an option to disable it.</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>