<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 creates unwanted temporary files when batching processing on windows"
   href="https://llvm.org/bugs/show_bug.cgi?id=26125">26125</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang format creates unwanted temporary files when batching processing on windows
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </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>jasjuang@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I am on windows 7 with clang-format built from source with visual studio 2013,
clang-format works fine when executed on a single file, however when using the
below shell script to execute on a batch of files

FOR /R %%k in (*.cpp *.h *) DO C:\llvm\build\Release\bin\clang-format.exe -i
%%k

the console output shows

#0 0x000000013f7d9497 (C:\llvm\build\Release\bin\clang-format.exe+0x29497)
#1 0x000000013f7dad6a (C:\llvm\build\Release\bin\clang-format.exe+0x2ad6a)
#2 0x000000013f81a833 (C:\llvm\build\Release\bin\clang-format.exe+0x6a833)
#3 0x000000013f81ae57 (C:\llvm\build\Release\bin\clang-format.exe+0x6ae57)
#4 0x000000013f7b560f (C:\llvm\build\Release\bin\clang-format.exe+0x560f)
#5 0x000000013f7b6f1a (C:\llvm\build\Release\bin\clang-format.exe+0x6f1a)
#6 0x000000013f85dacf (C:\llvm\build\Release\bin\clang-format.exe+0xadacf)
#7 0x0000000077a95a4d BaseThreadInitThunk
(C:\Windows\system32\kernel32.dll+0x15a4d)
#8 0x0000000077ccb831 RtlUserThreadStart
(C:\Windows\SYSTEM32\ntdll.dll+0x2b831)

and some temporary files got created  

git status shows

 include/test1.h-c27f6afe
 src/test1.cpp~RF1f2aeaee.TMP
 src/test2.cpp~RF1f2aeb1c.TMP
 src/test3.cpp~RF1f2aeb3c.TMP

A quick google tells me it's because clang format is not exiting correctly
therefore the tmp files were not deleted. Any thoughts?

Thanks,
Jason</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>