clang-tools
15.0.0git
|
Wraps another compilation database, and supports overriding the commands using an in-memory mapping. More...
#include <GlobalCompilationDatabase.h>
Public Member Functions | |
OverlayCDB (const GlobalCompilationDatabase *Base, std::vector< std::string > FallbackFlags={}, tooling::ArgumentsAdjuster Adjuster=nullptr) | |
llvm::Optional< tooling::CompileCommand > | getCompileCommand (PathRef File) const override |
If there are any known-good commands for building this file, returns one. More... | |
tooling::CompileCommand | getFallbackCommand (PathRef File) const override |
Makes a guess at how to build a file. More... | |
void | setCompileCommand (PathRef File, llvm::Optional< tooling::CompileCommand > CompilationCommand) |
Sets or clears the compilation command for a particular file. More... | |
![]() | |
DelegatingCDB (const GlobalCompilationDatabase *Base) | |
DelegatingCDB (std::unique_ptr< GlobalCompilationDatabase > Base) | |
llvm::Optional< ProjectInfo > | getProjectInfo (PathRef File) const override |
Finds the closest project to File . More... | |
bool | blockUntilIdle (Deadline D) const override |
If the CDB does any asynchronous work, wait for it to complete. More... | |
![]() | |
virtual | ~GlobalCompilationDatabase ()=default |
CommandChanged::Subscription | watch (CommandChanged::Listener L) const |
The callback is notified when files may have new compile commands. More... | |
Additional Inherited Members | |
![]() | |
using | CommandChanged = Event< std::vector< std::string > > |
![]() | |
CommandChanged | OnCommandChanged |
Wraps another compilation database, and supports overriding the commands using an in-memory mapping.
Definition at line 172 of file GlobalCompilationDatabase.h.
clang::clangd::OverlayCDB::OverlayCDB | ( | const GlobalCompilationDatabase * | Base, |
std::vector< std::string > | FallbackFlags = {} , |
||
tooling::ArgumentsAdjuster | Adjuster = nullptr |
||
) |
Definition at line 741 of file GlobalCompilationDatabase.cpp.
|
overridevirtual |
If there are any known-good commands for building this file, returns one.
Reimplemented from clang::clangd::DelegatingCDB.
Definition at line 748 of file GlobalCompilationDatabase.cpp.
|
overridevirtual |
Makes a guess at how to build a file.
The default implementation just runs clang on the file. Clangd should treat the results as unreliable.
Reimplemented from clang::clangd::DelegatingCDB.
Definition at line 765 of file GlobalCompilationDatabase.cpp.
void clang::clangd::OverlayCDB::setCompileCommand | ( | PathRef | File, |
llvm::Optional< tooling::CompileCommand > | CompilationCommand | ||
) |
Sets or clears the compilation command for a particular file.
Definition at line 775 of file GlobalCompilationDatabase.cpp.