Go to the documentation of this file.
12 #ifndef LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_TESTFS_H
13 #define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_TESTFS_H
18 #include "llvm/ADT/IntrusiveRefCntPtr.h"
19 #include "llvm/ADT/None.h"
20 #include "llvm/ADT/Optional.h"
21 #include "llvm/Support/Path.h"
22 #include "llvm/Support/VirtualFileSystem.h"
29 llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>
30 buildTestFS(llvm::StringMap<std::string>
const &Files,
31 llvm::StringMap<time_t>
const &Timestamps = {});
36 IntrusiveRefCntPtr<llvm::vfs::FileSystem>
viewImpl()
const override {
41 llvm::StringMap<std::string>
Files;
54 StringRef RelPathPrefix = StringRef());
56 llvm::Optional<tooling::CompileCommand>
65 StringRef RelPathPrefix;
73 llvm::sys::path::Style = llvm::sys::path::Style::native);
std::string testPath(PathRef File, llvm::sys::path::Style Style)
IntrusiveRefCntPtr< llvm::vfs::FileSystem > viewImpl() const override
Overridden by implementations to provide a vfs::FileSystem.
Provides compilation arguments used for parsing C and C++ files.
volatile int UnittestSchemeAnchorSource
llvm::Optional< tooling::CompileCommand > getCompileCommand(PathRef File) const override
If there are any known-good commands for building this file, returns one.
MockCompilationDatabase(StringRef Directory=StringRef(), StringRef RelPathPrefix=StringRef())
If Directory is not empty, use that as the Directory field of the CompileCommand, and as project Sour...
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > buildTestFS(llvm::StringMap< std::string > const &Files, llvm::StringMap< time_t > const &Timestamps)
llvm::StringMap< time_t > Timestamps
llvm::Optional< ProjectInfo > getProjectInfo(PathRef File) const override
Finds the closest project to File.
llvm::StringRef PathRef
A typedef to represent a ref to file path.
Wrapper for vfs::FileSystem for use in multithreaded programs like clangd.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
llvm::StringMap< std::string > Files
std::vector< std::string > ExtraClangFlags