[llvm-bugs] [Bug 26125] New: Clang format creates unwanted temporary files when batching processing on windows

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 12 16:48:54 PST 2016


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

            Bug ID: 26125
           Summary: Clang format creates unwanted temporary files when
                    batching processing on windows
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jasjuang at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

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

-- 
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/20160113/456b52a8/attachment.html>


More information about the llvm-bugs mailing list