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

            Bug ID: 26829
           Summary: Feature specify new lines between namespace
                    declarations
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: gonzalob...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to