clang-tools 10.0.0

Public Member Functions | Static Public Attributes | List of all members
clang::clangd::TestScheme Class Reference

unittest: is a scheme that refers to files relative to testRoot(). More...

Inheritance diagram for clang::clangd::TestScheme:
[legend]
Collaboration diagram for clang::clangd::TestScheme:
[legend]

## Public Member Functions
llvm::Expected< std::string > | getAbsolutePath (llvm::StringRef, llvm::StringRef Body, llvm::StringRef HintPath) const override
| Returns the absolute path of the file corresponding to the URI authority+body in the file system. More...
llvm::Expected< URI > | uriFromAbsolutePath (llvm::StringRef AbsolutePath) const override
Public Member Functions inherited from clang::clangd::URIScheme
virtual | ~URIScheme ()=default
virtual llvm::Expected< std::string > | getIncludeSpelling (const URI &U) const
| Returns the include path of the file (e.g. More...

## Static Public Attributes
static const char * | Scheme = "unittest"

## Detailed Description

unittest: is a scheme that refers to files relative to testRoot().

URI body is a path relative to testRoot() e.g. unittest:///x.h for /clangd-test/x.h.

Definition at line 95 of file TestFS.cpp.

## Member Function Documentation

## ◆ getAbsolutePath()

llvm::Expected<std::string> clang::clangd::TestScheme::getAbsolutePath | ( | llvm::StringRef | Authority,
|  | llvm::StringRef | Body,
|  | llvm::StringRef | HintPath
| ) |  | const
| inline override virtual

Returns the absolute path of the file corresponding to the URI authority+body in the file system.

See URI::resolve for semantics of `HintPath`.

Implements clang::clangd::URIScheme.

Definition at line 100 of file TestFS.cpp.

## ◆ uriFromAbsolutePath()

llvm::Expected<URI> clang::clangd::TestScheme::uriFromAbsolutePath | ( | llvm::StringRef | AbsolutePath | ) | const
| inline override virtual

Implements clang::clangd::URIScheme.

Definition at line 116 of file TestFS.cpp.

References clang::clangd::testRoot(), and clang::clangd::X().

## Member Data Documentation

## ◆ Scheme

const char * clang::clangd::TestScheme::Scheme = "unittest"
| static

Definition at line 97 of file TestFS.cpp.

The documentation for this class was generated from the following file:

- TestFS.cpp