[llvm-bugs] [Bug 39280] New: "// clang-format off" comment should not be formatted

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 13 12:51:53 PDT 2018


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

            Bug ID: 39280
           Summary: "// clang-format off" comment should not be formatted
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sylvestre at debian.org
                CC: andi at mozilla.com, djasper at google.com,
                    klimek at google.com, llvm-bugs at lists.llvm.org

with this code:
---
static const uint32_t gWinEventMap[] = {
  // clang-format off
  1,
  2,
  3
// clang-format on
};
---

% clang-format-7 foo.cpp
returns:
---
static const uint32_t gWinEventMap[] = {
    // clang-format off
  1,
  2,
  3
    // clang-format on
};
---

Because // clang-format off is all about disabling coding style, I believe we
should not touch this comment.

-- 
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/20181013/7acb1e3d/attachment.html>


More information about the llvm-bugs mailing list