clang-tools 20.0.0git
Classes | Namespaces | Typedefs | Functions
PathMapping.h File Reference
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include <optional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  clang::clangd::PathMapping
 PathMappings are a collection of paired client and server paths. More...
 

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
namespace  clang::clangd
 FIXME: Skip testing on windows temporarily due to the different escaping code mode.
 

Typedefs

using clang::clangd::PathMappings = std::vector< PathMapping >
 

Functions

llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const PathMapping &M)
 
llvm::Expected< PathMappings > clang::clangd::parsePathMappings (llvm::StringRef RawPathMappings)
 Parse the command line RawPathMappings (e.g.
 
std::optional< std::string > clang::clangd::doPathMapping (llvm::StringRef S, PathMapping::Direction Dir, const PathMappings &Mappings)
 Returns a modified S with the first matching path in Mappings substituted, if applicable.
 
void clang::clangd::applyPathMappings (llvm::json::Value &Params, PathMapping::Direction Dir, const PathMappings &Mappings)
 Applies the Mappings to all the file:// URIs in Params.
 
std::unique_ptr< Transport > clang::clangd::createPathMappingTransport (std::unique_ptr< Transport > Transp, PathMappings Mappings)
 Creates a wrapping transport over Transp that applies the Mappings to all inbound and outbound LSP messages.