summaryrefslogtreecommitdiff
path: root/clang-tools-extra/clangd/PathMapping.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [NFC][clangd] cleanup llvm-else-after-return findingsChristian Kühnel2021-11-171-1/+2
| | | | | | | | | Cleanup of clang-tidy findings: removing "else" after a return statement to improve readability of the code. This patch was created by applying the clang-tidy fixes automatically. Differential Revision: https://reviews.llvm.org/D113892
* [clangd, llvm] Remove redundant calls to c_str() (NFC)Kazu Hirata2021-09-021-1/+1
| | | | Identified with readability-redundant-string-cstr.
* [clangd] Add error() function for creating formatv-style llvm::Errors. NFCSam McCall2020-09-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is considerably terser than the makeStringError and friends, and avoids verbosity cliffs that discourage adding log information. It follows the syntax used in log/elog/vlog/dlog that have been successful. The main caveats are: - it's strictly out-of-place in logger.h, though kind of fits thematically and in implementation - it claims the "error" identifier, which seems a bit too opinionated to put higher up in llvm I've updated some users of StringError mostly at random - there are lots more mechanical changes but I'd like to get this reviewed before making them all. Reviewers: kbobyrev, hokein Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83419
* [clang-tools-extra] NFC: Fix trivial typo in documents and commentsKazuaki Ishizaki2020-04-051-1/+1
| | | | Differential Revision: https://reviews.llvm.org/D77458
* Make llvm::StringRef to std::string conversions explicit.Benjamin Kramer2020-01-281-1/+1
| | | | | | | | | | This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
* [clangd] Add path mappings functionalitySam McCall2020-01-071-0/+199
Summary: Add path mappings to clangd which translate file URIs on inbound and outbound LSP messages. This mapping allows clangd to run in a remote environment (e.g. docker), where the source files and dependencies may be at different locations than the host. See http://lists.llvm.org/pipermail/clangd-dev/2019-January/000231.htm for more. Patch by William Wagner! Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: usaxena95, ormris, mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64305