[PATCH] D56655: [clangd] Fix mac buildbot failure.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 14 01:33:54 PST 2019


hokein updated this revision to Diff 181502.
hokein added a comment.

remove unrelated blank changes.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D56655

Files:
  clangd/index/Background.cpp


Index: clangd/index/Background.cpp
===================================================================
--- clangd/index/Background.cpp
+++ clangd/index/Background.cpp
@@ -484,7 +484,7 @@
   // Goes over each dependency.
   for (size_t CurrentDependency = 0; CurrentDependency < Dependencies.size();
        CurrentDependency++) {
-    llvm::StringRef CurDependencyPath = Dependencies[CurrentDependency].Path;
+    std::string CurDependencyPath = Dependencies[CurrentDependency].Path;
     // If we have already seen this shard before(either loaded or failed) don't
     // re-try again. Since the information in the shard won't change from one TU
     // to another.
@@ -504,11 +504,16 @@
     // These are the edges in the include graph for current dependency.
     for (const auto &I : *Shard->Sources) {
       auto U = URI::parse(I.getKey());
-      if (!U)
+      if (!U) {
+        elog("Failed to parse URI {0}: {1}", I.getKey(), U.takeError());
         continue;
+      }
       auto AbsolutePath = URI::resolve(*U, CurDependencyPath);
-      if (!AbsolutePath)
+      if (!AbsolutePath) {
+        elog("Failed to resolve URI {0}: {1}", I.getKey(),
+             AbsolutePath.takeError());
         continue;
+      }
       // Add file as dependency if haven't seen before.
       if (InQueue.try_emplace(*AbsolutePath).second)
         Dependencies.emplace_back(*AbsolutePath, true);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56655.181502.patch
Type: text/x-patch
Size: 1396 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190114/ee7e79d3/attachment.bin>


More information about the cfe-commits mailing list