<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Feature specify new lines between namespace declarations"
   href="https://llvm.org/bugs/show_bug.cgi?id=26829">26829</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Feature specify new lines between namespace declarations
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Formatter
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>gonzalobg88@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang-format currently does not modify any of the following three examples,
that is, the user still needs to handle style by hand. It would be nice if this
would be fixed. 

Example 1:
namespace A {
namespace B {
namespace C {

}  // namespace C
}  // namespace B
}  // namespace A

Example 2:
namespace A {
namespace B {
namespace C {

}  // namespace C

}  // namespace B

}  // namespace A

Example 3:
namespace A {

namespace B {

namespace C {

}  // namespace C

}  // namespace B

}  // namespace A


For example I would always want no new lines between namespaces and enclosing
brackets like in Example A, but some people might want to follow example 3.

I also sometimes document a new namespace when I introduce it and would like it
to be separately spaced, for example:

namespace A { // already exists
namespace B { // already exists

/// New namespace for C stuff
namespace C {

}  // namespace C

}  // namespace B  
}  // namespace A

where I don't introduce any space between A and B, but leave a line in between
when documenting a new namespace and want that to be respected on the enclosing
bracket.</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>