[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 01:16:08 PDT 2018


sammccall added inline comments.


================
Comment at: clangd/SourceCode.cpp:194
+  if (!llvm::sys::path::is_absolute(FilePath)) {
+    if (!SourceMgr.getFileManager().makeAbsolutePath(FilePath)) {
+      log("Could not turn relative path to absolute: " + FilePath);
----------------
sammccall wrote:
> the common case when tryGetRealPathName() is empty seems to be when it's a file that was part of the preamble we're reusing.
> Does this fallback tend to give the same answer in that case? (If so, great! I know some other places we should reuse this function!)
Sorry, I just noticed this is only being moved. Please disregard (and thangs for moving it somewhere common).
Note that D48687 modifies this function, let's make sure not to lose anything in the merge.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47846





More information about the cfe-commits mailing list