Author: sammccall Date: Tue Jan 30 03:23:11 2018 New Revision: 323751 URL: http://llvm.org/viewvc/llvm-project?rev=323751&view=rev Log: [clangd] Fix windows path manipulation
Modified: clang-tools-extra/trunk/clangd/Protocol.cpp Modified: clang-tools-extra/trunk/clangd/Protocol.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Protocol.cpp?rev=323751&r1=323750&r2=323751&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/Protocol.cpp (original) +++ clang-tools-extra/trunk/clangd/Protocol.cpp Tue Jan 30 03:23:11 2018 @@ -37,8 +37,12 @@ bool fromJSON(const json::Expr &E, URIFo "Clangd only supports 'file' URI scheme for workspace files: " + *S); return false; } - // We know that body of a file URI is absolute path. - R.file = U->body(); + auto Path = URI::resolve(*U); + if (!Path) { + log(Context::empty(), llvm::toString(Path.takeError())); + return false; + } + R.file = *Path; return true; } return false; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits