[PATCH] D102736: Fix tmp files being left on Windows builds.

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 16:51:41 PDT 2021


aganea added a comment.

Do you think the existing crash tests can be modified to validate that .tmp files are deleted indeed?



================
Comment at: clang/lib/Frontend/CompilerInstance.cpp:829
+        Binary ? llvm::sys::fs::OF_None : llvm::sys::fs::OF_Text;
+    // Use OF_Delete on Windows so that file can be marked for deletion.
+#ifdef _WIN32
----------------
What do you think about having the comment inside the `#idef _WIN32` ?


================
Comment at: llvm/include/llvm/Support/FileSystem.h:994
+// closed. On non-Windows, this is a no-op.
+std::error_code UnmarkFileForDeletion(file_t Handle);
+
----------------
It is unclear to me what is the right formatting for function names here? Is it what clang-tidy suggests or lowercase first, like the other functions?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102736/new/

https://reviews.llvm.org/D102736



More information about the llvm-commits mailing list