clang-tools  14.0.0git
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:
Inheritance graph
[legend]
Collaboration diagram for clang::clangd::TestScheme:
Collaboration graph
[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< URIuriFromAbsolutePath (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
inlineoverridevirtual

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
inlineoverridevirtual

Implements clang::clangd::URIScheme.

Definition at line 113 of file TestFS.cpp.

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: