<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 fails formatting basic C++11 code"
   href="https://bugs.llvm.org/show_bug.cgi?id=40046">40046</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format fails formatting basic C++11 code
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.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>Tooling
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>private@bernhard-lindner.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I evaluated clang-format with one of my projects. Evaluation failed due to
following problems

1. There is no way of adding missing empty lines (e.g. between function
definitions). There should be explicit options for mandatory empty lines.

2. I was not able to configure correct class indention (public: 3 spaces, class
members: 6 spaces, function definition: 3 spaces). There should be separate
options for indention of class members and function definitions.

3. Wrapping of constructor initialize lists fails as soon as
"BreakConstructorInitializers: AfterColon" is accompanied by a "ColumnLimit:
'160'". ColumnLimit seems to break BreakConstructorInitializers completely. See
also <a href="https://stackoverflow.com/q/53797967/1421332">https://stackoverflow.com/q/53797967/1421332</a>.

4. Wrapping of template specifications seems to work in one direction only. If
"template <typename T>" is in one line with the function, a line break is added
properly if required by "AlwaysBreakTemplateDeclarations: Yes". However when
having "template <typename T>" in a separate line, the line break is not
removed as required by "AlwaysBreakTemplateDeclarations: No".

Please fix these issues. clang-format is very promising. I am eager to evaluate
it again.</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>