[clang-tools-extra] 962a247 - [clangd] Fix assertion in remote-index marshalling

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 11:40:47 PDT 2020


Author: Kadir Cetinkaya
Date: 2020-09-29T20:40:19+02:00
New Revision: 962a247aebba39bc8f2d6aa901ed512f5c09dc72

URL: https://github.com/llvm/llvm-project/commit/962a247aebba39bc8f2d6aa901ed512f5c09dc72
DIFF: https://github.com/llvm/llvm-project/commit/962a247aebba39bc8f2d6aa901ed512f5c09dc72.diff

LOG: [clangd] Fix assertion in remote-index marshalling

convert_to_slash is a no-op on posix style.

Added: 
    

Modified: 
    clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp b/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
index 839250982a03..31ce4a44ea55 100644
--- a/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
+++ b/clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
@@ -296,8 +296,7 @@ llvm::Expected<Relation> Marshaller::toProtobuf(const clangd::SymbolID &Subject,
 llvm::Expected<std::string>
 Marshaller::relativePathToURI(llvm::StringRef RelativePath) {
   assert(LocalIndexRoot);
-  assert(RelativePath == llvm::sys::path::convert_to_slash(
-                             RelativePath, llvm::sys::path::Style::posix));
+  assert(RelativePath == llvm::sys::path::convert_to_slash(RelativePath));
   if (RelativePath.empty())
     return error("Empty relative path.");
   if (llvm::sys::path::is_absolute(RelativePath))


        


More information about the cfe-commits mailing list