kadircet added a comment.

> To fix the issue, we keep the file handles open during the lifetime of their 
> corresponding UniqueID instances. Since handles will live longer now, this 
> requires particular attention when performing some file actions, such as file 
> deletions.

I am a little worried about this in general (what happens if some part of LLVM 
is keeping a fs::file_status object around when something deep down is trying 
to delete a file?) but specifically from clang-tooling perspective, especially 
clangd (i'd expect lldb to have similar concerns).
Today clangd is a long-lived process and it keeps uniqueid's around for the 
headers included inside a translation unit pretty much indefinitely. What 
happens if someone outside tries to delete/modify a file while we're keeping 
handles for it around? (it's quite common for people to switch branches in 
their VCS while clangd is working on these files)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146490

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to