[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 06:38:37 PDT 2018


erichkeane added inline comments.


================
Comment at: lib/Tooling/CompilationDatabase.cpp:303
+  // Remove temp files.
+  Compilation->CleanupFileList(Compilation->getTempFiles());
+
----------------
It seems to me that this would be best called from the destructor of the Compilation object.  I realize nothing returns before this, but IMO this seems universal enough that if it doesn't break anything, putting this in the destructor would be a proper place for cleanup.


Repository:
  rC Clang

https://reviews.llvm.org/D45686





More information about the cfe-commits mailing list