[llvm-bugs] [Bug 34081] New: clang-format doesn't break before a function brace in a javascript property

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 5 05:50:37 PDT 2017


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

            Bug ID: 34081
           Summary: clang-format doesn't break before a function brace in
                    a javascript property
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: thosrtanner58 at yahoo.co.uk
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

this ends up looking rather strange if everywhere else you have breaks.

Thus what I expect:

function func1()
{
  stuff();
}

const icon_observer = {
  on_drag_over : function(event) 
  {
    if (stuff())
    {
      return;
    }
  }
}

what I actually get is:

function func1()
{
  stuff();
}

const icon_observer = {
  on_drag_over : function(event) {
    if (stuff())
    {
      return;
    }
  }
}

I'm not sure if this is a bug or enhancement - there don't seem to be any brace
options that cover this (or the vaguely related - I'd like the { on a newline
after the '=' there).

-- 
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/20170805/b90834ca/attachment.html>


More information about the llvm-bugs mailing list