[PATCH] D64293: [clangd] Don't insert absolute paths, give up instead.

Kadir Cetinkaya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 04:28:49 PDT 2019


kadircet accepted this revision.
kadircet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/Headers.cpp:206
+    SmallString<256> RelFile(InsertedHeader.File);
+    llvm::sys::path::replace_path_prefix(RelFile, IncludingDir, "./");
+    Suggested = llvm::sys::path::convert_to_slash(
----------------
why not directly replace with `""`?


================
Comment at: clang-tools-extra/clangd/unittests/HeadersTests.cpp:100
       return "";
-    std::string Path = Inserter.calculateIncludePath(Inserted, MainFile);
+    auto Path = Inserter.calculateIncludePath(Inserted, MainFile);
     Action.EndSourceFile();
----------------
can you also log the error ?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64293





More information about the llvm-commits mailing list