[PATCH] D40527: [libclang] Record parsing invocation to a temporary file when requested by client

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 11:28:13 PST 2017


arphaman marked an inline comment as done.
arphaman added inline comments.


================
Comment at: tools/libclang/CIndexer.cpp:131
+  if (!File.empty())
+    llvm::sys::fs::remove(File);
+}
----------------
jkorous-apple wrote:
> Just a thought - since we are not propagating errors from constructor we are not really sure we were able to create the file in the first place (e. g. return from ctor at line 103). Should we still try to delete it?
If `createUniqueFile` failed in the constructor (return on line 103) then `File` will be empty. Therefore we won't try to remove the file.


Repository:
  rC Clang

https://reviews.llvm.org/D40527





More information about the cfe-commits mailing list