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

            Bug ID: 38314
           Summary: Mis-counting of braces with redundant nested scopes
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: d...@getcruise.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

This code formats poorly:

namespace n {
void foo() {
    {
        {
            {
                statement();
                if (false) {
                }
            }
        }
        {

        }
    }
}
}

Formatter output (default settings, HEAD, reproduced here:
https://zed0.co.uk/clang-format-configurator/):

namespace n {
void foo() {
  {
    {{statement();
    if (false) {
    }
  }
}
{}
}
}
}

-- 
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