[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2022-05-03 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D92160#3485400 , @Kale wrote: > In D92160#2449507 , @dexonsmith > wrote: > >> But it's possible we don't need this. If it's safe for us to update the >> tests and make `FileManager:

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2022-05-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added reviewers: benlangmuir, bnbarham, jansvoboda11. dexonsmith added subscribers: bnbarham, benlangmuir. dexonsmith added a comment. Adding @bnbarham, @jansvoboda11, and @benlangmuir, who have been looking at various FileManager issues recently. If you post a follow up I suggest keep

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2022-05-02 Thread Kale Chen via Phabricator via cfe-commits
Kale added a comment. Herald added a subscriber: StephenFan. Herald added a project: All. In D92160#2449507 , @dexonsmith wrote: > But it's possible we don't need this. If it's safe for us to update the tests > and make `FileManager::getFileRef` always ca

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2021-01-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. (Marking as "Request Changes" to drop this from my queue; feel free to reach out if the direction I suggested isn't working well...) Repository: rG LLVM Github Monorepo C

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92160#2453814 , @OikawaKirie wrote: > Replies from the original author Hao Zhang > > --- > > Sorry for replying late. > >> I think it would be good to understand why the tests failed. Are some >> clients relying on the nam

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Replies from the original author Hao Zhang --- Sorry for replying late. > I think it would be good to understand why the tests failed. Are some clients > relying on the name matching the query? If so, why? I'm currently working on this. Maybe try making `FileMana

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92160#2447861 , @OikawaKirie wrote: > Replies from the original author Hao Zhang > > llvm::ErrorOr > FileManager::getFile(StringRef Filename, bool openFile, bool CacheFailure) { > // Froce using the absolute path to

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-10 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Replies from the original author Hao Zhang -- > ...split the data structures between relative and absolute paths. The > existing data structures would only store absolute paths, but there are new > ones f

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92160#2447586 , @dexonsmith wrote: > /// Current working directory. Grabbed from the (new) VFS whenever it's > /// changed, and updated if the file manager is notified that the VFS's > /// CWD changes. > std::string

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added subscribers: Bigcheese, jansvoboda11, arphaman. dexonsmith added a comment. In D92160#2444732 , @OikawaKirie wrote: > - In my solution, I use a pretty straightforward approach, which is to have > an individual cache (for `FileEntry` and a

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Replies from the original author Hao Zhang (Sorry for the wrong email address in the previous reply.) -- Thanks for your reply. I noticed this problem when I was using clang-check to analyze a project whic

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D92160#2443405 , @dexonsmith wrote: > In D92160#2443413 , @dexonsmith wrote: > Replies on my own: > Can you tell me more about the scenario this happens? You can first manual

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92160#2443405 , @dexonsmith wrote: > - Don't specifically track relative paths / absolute paths. > - Add an API, something like: `dropRelativePaths()`, which drops all > `{File,Directory}Entry{,Ref}` that are somehow based

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks for your patience; I missed this when I was on holiday, and I'm just noticing it now. Can you tell me more about the scenario this happens? Why is the `FileManager` being reused after the working directory change? Do the `FileEntry`s need to remain valid? I'

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-11-26 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: dexonsmith, harlanhaskins, rsmith, arphaman, MaskRay, bkramer, ilya-biryukov. OikawaKirie added a project: clang. Herald added a subscriber: cfe-commits. OikawaKirie requested review of this revision. ClangTool will make FileManager