[llvm-bugs] [Bug 52228] New: clang-format csharp inconsistant nested namespace indentation

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 19 12:57:06 PDT 2021


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

            Bug ID: 52228
           Summary: clang-format csharp inconsistant nested namespace
                    indentation
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm at evilazrael.de
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

OS: Win10 64bit 
Clang-format version: 13.0.0, precompiled binary
Language C#

Multilevel namespaces get their content indented when NamespaceIndentation:
None is set, single level namespaces are formatted correctly.

## Example Code:
namespace namespace1
{
    public interface IName1
    {        
    }
}

namespace namespace1.namespace2
{
    public interface IName2
    {        
    }
}

## Command:
clang-format --style="{NamespaceIndentation: None }"   test.cs

## Output:
namespace namespace1 {
public interface IName1 {}
}

namespace namespace1.namespace2 {
  public interface IName2 {}
}

## Expected Output:
namespace namespace1
{
public interface IName1
{        
}
}

namespace namespace1.namespace2
{
public interface IName2
{        
}
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211019/d5c605e5/attachment.html>


More information about the llvm-bugs mailing list