[PATCH] D32480: clang-format: Add CompactNamespaces option

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 04:26:38 PDT 2017


djasper added a comment.

That's what I meant by "The name NamespaceIndentation might then be a bit confusing, but not sure whether it's worth changing it.".

I am honestly not sure. Let's get a third opinion.

If we add this additional option, I think we need to fix the behavior and make what people expect:

With NI_None:

  namespace A { namespace B {
  int i;
  namespace C {
  int j;
  } // namespace C
  }} // namespace A::B

With NI_Inner:

  namespace A { namespace B {
  int i;
  namespace C {
    int j;
  } // namespace C
  }} // namespace A::B

With NI_All:

  namespace A { namespace B {
    int i;
    namespace C {
      int j;
    } // namespace C
  }} // namespace A::B


https://reviews.llvm.org/D32480





More information about the cfe-commits mailing list