[llvm-bugs] [Bug 34693] New: clang-format sometimes ignores #ifdef-ed code

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 21 07:58:11 PDT 2017


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

            Bug ID: 34693
           Summary: clang-format sometimes ignores #ifdef-ed code
           Product: clang
           Version: 4.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: michal.kowalczyk at codilime.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

The following code is not touched by clang-format although I set max
line-length to 80:

#if 0
  function(very, long, line, with, arguments, aaaaaaaaaa, bbbbbbbbbbbb,
ccccccc, ddddddddddd);
#endif

but

#if defined(SOMETHING_WHICH_IS_DEFINITELY_NOT_DEFINED)
  function(very, long, line, with, arguments, aaaaaaaaaa, bbbbbbbbbbbb,
ccccccc, ddddddddddd);
#endif

is formatted correctly. Looks like a bug for me (I expected that both listings
would be formatted).

-- 
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/20170921/2988f2a6/attachment.html>


More information about the llvm-bugs mailing list