[clang-tools-extra] r335458 - [clangd] Always remove dots before converting paths to URIs in symbol collector.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 25 04:50:11 PDT 2018


Author: ioeric
Date: Mon Jun 25 04:50:11 2018
New Revision: 335458

URL: http://llvm.org/viewvc/llvm-project?rev=335458&view=rev
Log:
[clangd] Always remove dots before converting paths to URIs in symbol collector.

Modified:
    clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp

Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp?rev=335458&r1=335457&r2=335458&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp Mon Jun 25 04:50:11 2018
@@ -75,9 +75,10 @@ llvm::Optional<std::string> toURI(const
     }
   } else if (!Opts.FallbackDir.empty()) {
     llvm::sys::fs::make_absolute(Opts.FallbackDir, AbsolutePath);
-    llvm::sys::path::remove_dots(AbsolutePath, /*remove_dot_dot=*/true);
   }
 
+  llvm::sys::path::remove_dots(AbsolutePath, /*remove_dot_dot=*/true);
+
   std::string ErrMsg;
   for (const auto &Scheme : Opts.URISchemes) {
     auto U = URI::create(AbsolutePath, Scheme);




More information about the cfe-commits mailing list