This revision was automatically updated to reflect the committed changes. Closed by commit rL350306: [clangd] Always try to build absolute path (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits.
Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56263/new/ https://reviews.llvm.org/D56263 Files: clang-tools-extra/trunk/clangd/SourceCode.cpp Index: clang-tools-extra/trunk/clangd/SourceCode.cpp =================================================================== --- clang-tools-extra/trunk/clangd/SourceCode.cpp +++ clang-tools-extra/trunk/clangd/SourceCode.cpp @@ -187,15 +187,8 @@ const SourceManager &SourceMgr) { if (!F) return None; - // Ideally, we get the real path from the FileEntry object. - SmallString<128> FilePath = F->tryGetRealPathName(); - if (!FilePath.empty() && sys::path::is_absolute(FilePath)) - return FilePath.str().str(); - - // Otherwise, we try to compute ourselves. - FilePath = F->getName(); - vlog("FileEntry for {0} did not contain the real path.", FilePath); + SmallString<128> FilePath = F->getName(); if (!sys::path::is_absolute(FilePath)) { if (auto EC = SourceMgr.getFileManager().getVirtualFileSystem()->makeAbsolute(
Index: clang-tools-extra/trunk/clangd/SourceCode.cpp =================================================================== --- clang-tools-extra/trunk/clangd/SourceCode.cpp +++ clang-tools-extra/trunk/clangd/SourceCode.cpp @@ -187,15 +187,8 @@ const SourceManager &SourceMgr) { if (!F) return None; - // Ideally, we get the real path from the FileEntry object. - SmallString<128> FilePath = F->tryGetRealPathName(); - if (!FilePath.empty() && sys::path::is_absolute(FilePath)) - return FilePath.str().str(); - - // Otherwise, we try to compute ourselves. - FilePath = F->getName(); - vlog("FileEntry for {0} did not contain the real path.", FilePath); + SmallString<128> FilePath = F->getName(); if (!sys::path::is_absolute(FilePath)) { if (auto EC = SourceMgr.getFileManager().getVirtualFileSystem()->makeAbsolute(
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits