[llvm-bugs] [Bug 34385] New: Formatting some comments in macro causes a -Wcomment comment

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 30 13:27:04 PDT 2017


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

            Bug ID: 34385
           Summary: Formatting some comments in macro causes a  -Wcomment
                    comment
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sylvestre at debian.org
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

foo.cpp
----
#define MAX_COLSPAN 1000 // limit as IE and opera do.  If this ever changes,
                         // change COL_SPAN_OFFSET/COL_SPAN_SHIFT accordingly.
----
is converted to:
----
#define MAX_COLSPAN                                                           
\
  1000 // limit as IE and opera do.  If this ever changes,                    
\
       // change COL_SPAN_OFFSET/COL_SPAN_SHIFT accordingly.
----

Which triggers:
$ gcc -c -Wcomment foo4.cpp foo3.cpp 
foo4.cpp:2:8: warning: multi-line comment [-Wcomment]
   1000 // limit as IE and opera do.  If this ever changes,                    
\

-- 
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/20170830/27afff60/attachment.html>


More information about the llvm-bugs mailing list