<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-format: resulted in multi-line comment warning"
   href="https://bugs.llvm.org/show_bug.cgi?id=41807">41807</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format: resulted in multi-line comment warning
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Shahzad.Malik.Muzaffar@cern.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,
  Running clang-format with configuration [a] suggested change [b] which when
compiled with gcc 7 generated multi-line comment warning [c].

  Is it a bug in clang-format or we are using wrong configuration?

Thanks,
--Shahzad

[a]
---
Language:        Cpp
BasedOnStyle:  Google
ColumnLimit:     120
NamespaceIndentation: All
SortIncludes:    false
IndentWidth:     2
AccessModifierOffset: -2
PenaltyBreakComment: 30
PenaltyExcessCharacter: 100
AlignAfterOpenBracket: Align
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackParameters: false
AlwaysBreakTemplateDeclarations: Yes
ReflowComments: false
BinPackArguments: false
BinPackParameters: false

[b]
diff --git a/foo.cc b/foo.cc
index 506f1155bb0..f4ce709cfc1 100644
--- a/foo.cc
+++ b/foo.cc
@@ -1,3 +1,3 @@
 #define NLev1                                                                 
    \
-  4   // Number of HalfCylinders in Endcap or number of Shells in Barrel,
which is
+  4   // Number of HalfCylinders in Endcap or number of Shells in Barrel,
which is \
       // bigger

[c]
<span class="quote">>gcc --version | head -1</span >
gcc (GCC) 7.4.1 20190129
<span class="quote">>clang-format -version</span >
clang-format version 7.1.0 
<span class="quote">>gcc -c -Wall x/y/src/foo.cc</span >
x/y/src/foo.cc:2:7: warning: multi-line comment [-Wcomment]
   4   // Number of HalfCylinders in Endcap or number of Shells in Barrel,
which is \
       ^</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>