[llvm-bugs] [Bug 28546] New: clang-format: unnecessary line break

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 13 19:13:21 PDT 2016


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

            Bug ID: 28546
           Summary: clang-format: unnecessary line break
           Product: new-bugs
           Version: 3.8
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: schnetter at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

clang-format 3.8.0 (OS X) produces this formatting:
{{{
struct X {
  template <typename T1 = T, typename S = typename T1::scalar_t, typename S1>
  void storeu(const conserved_t<S1 * restrict> &vars, ptrdiff_t idx) const {
    map([&](T var,
            S1 *restrict varptr) { return var.storeu(varptr[idx]), var; },
        *this, vars);
  }
  template <typename T1 = T, typename S = typename T1::scalar_t, typename S1>
  void storeu_partial(const conserved_t<S1 * restrict> &vars, ptrdiff_t idx,
                      ptrdiff_t i, ptrdiff_t imin, ptrdiff_t imax) const {
    map(
        [&](T var, S1 *restrict varptr) {
          return var.storeu_partial(varptr[idx], i, imin, imax), var;
        },
        *this, vars);
  }
};
}}}

The first call to {{{map}}} is formatted fine. The second call has an
unnecessary line break between the opening parenthesis and the beginning of the
lambda expression.

-- 
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/20160714/2ca3e6ed/attachment.html>


More information about the llvm-bugs mailing list