<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 needs to run twice"
   href="https://bugs.llvm.org/show_bug.cgi?id=47255">47255</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format needs to run twice
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Formatter
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Scott.Bauer@gd-ms.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23867" name="attach_23867" title="The .clang-format configuration we are using">attachment 23867</a> <a href="attachment.cgi?id=23867&action=edit" title="The .clang-format configuration we are using">[details]</a></span>
The .clang-format configuration we are using

The file temp.h needs to be run through clang-format twice in order for it to
be fully formatted.

temp.h
const int64_t MAX_COLLECTION = 1; //parasoft-suppress MISRA2008 "ignore global
namespace"
const uint32_t NUM_BIT_FUNCTIONS = 10;

sbauer@fozzie ~/source/
$ git add temp.h

sbauer@fozzie ~/source/
$ cat temp.h
const int64_t MAX_COLLECTION = 1; //parasoft-suppress MISRA2008 "ignore global
namespace"
const uint32_t NUM_BIT_FUNCTIONS = 10;

sbauer@fozzie ~/source/
$ clang-format -style=file temp.h -i

sbauer@fozzie ~/source/
$ git diff
diff --git a/temp.h b/temp.h
index 65afc77f..b6962bcf 100644
--- a/temp.h
+++ b/temp.h
@@ -1,2 +1,2 @@
-const int64_t MAX_COLLECTION = 1; //parasoft-suppress MISRA2008 "ignore global
namespace"
+const int64_t  MAX_COLLECTION = 1;    // parasoft-suppress MISRA2008 "ignore
global namespace"
const uint32_t NUM_BIT_FUNCTIONS = 10;

sbauer@fozzie ~/source/
$ git add temp.h

sbauer@fozzie ~/source/
$ clang-format -style=file temp.h -i

sbauer@fozzie ~/source/
$ git diff
diff --git a/temp.h b/temp.h
index b6962bcf..ea1585f2 100644
--- a/temp.h
+++ b/temp.h
@@ -1,2 +1,2 @@
-const int64_t  MAX_COLLECTION = 1;    // parasoft-suppress MISRA2008 "ignore
global namespace"
+const int64_t  MAX_COLLECTION    = 1;    // parasoft-suppress MISRA2008
"ignore global namespace"
const uint32_t NUM_BIT_FUNCTIONS = 10;

sbauer@fozzie ~/source/
$ git status
On branch feature/los_882
Your branch is behind 'origin/feature/los_882' by 1 commit, and can be
fast-forwarded.
  (use "git pull" to update your local branch)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   temp.h

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   temp.h</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>