[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:395 + SmallString<128> RealPathName; + if (!FS->getRealPath(InterndFileName, RealPathName)) +UFE->RealPathName = RealPathName.str(); ioeric wrote: > simark wrote: > > ioeric wrote: > > > It

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D49197#1159704, @ioeric wrote: > In https://reviews.llvm.org/D49197#1158972, @simark wrote: > > > Background: I'm trying to fix the cases why we receive a FileEntry without > > a real path computed in clangd, so we can avoid having to compute

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D49197#1158972, @simark wrote: > Background: I'm trying to fix the cases why we receive a FileEntry without a > real path computed in clangd, so we can avoid having to compute it ourselves. I'm curious how you use `getVirtualFile` in your cl

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-11 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:395 + SmallString<128> RealPathName; + if (!FS->getRealPath(InterndFileName, RealPathName)) +UFE->RealPathName = RealPathName.str(); ioeric wrote: > It seems that at this point, we have fai

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/FileManager.cpp:395 + SmallString<128> RealPathName; + if (!FS->getRealPath(InterndFileName, RealPathName)) +UFE->RealPathName = RealPathName.str(); It seems that at this point, we have failed to find `Fil

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-11 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Background: I'm trying to fix the cases why we receive a FileEntry without a real path computed in clangd, so we can avoid having to compute it ourselves. Repository: rC Clang https://reviews.llvm.org/D49197 ___ cfe-comm

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-11 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. I'm not sure who should review this patch, please add anybody you think is qualified/responsible. Repository: rC Clang https://reviews.llvm.org/D49197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-11 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 155027. simark added a comment. Update commit message. Repository: rC Clang https://reviews.llvm.org/D49197 Files: lib/Basic/FileManager.cpp unittests/Basic/FileManagerTest.cpp Index: unittests/Basic/FileManagerTest.cpp =

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-11 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added a subscriber: cfe-commits. I noticed that when getVirtualFile is called for a file, subsequent calls to getFile will return a FileEntry without the RealPathName computed: const FileEntry *VFE = Mgr->getVirtualFile("/foo/../bar", ...); const FileEntry