clang-tools
15.0.0git
|
#include <GlobalCompilationDatabase.h>
Public Member Functions | |
DelegatingCDB (const GlobalCompilationDatabase *Base) | |
DelegatingCDB (std::unique_ptr< GlobalCompilationDatabase > Base) | |
llvm::Optional< tooling::CompileCommand > | getCompileCommand (PathRef File) const override |
If there are any known-good commands for building this file, returns one. More... | |
llvm::Optional< ProjectInfo > | getProjectInfo (PathRef File) const override |
Finds the closest project to File . More... | |
tooling::CompileCommand | getFallbackCommand (PathRef File) const override |
Makes a guess at how to build a 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 |
Definition at line 68 of file GlobalCompilationDatabase.h.
clang::clangd::DelegatingCDB::DelegatingCDB | ( | const GlobalCompilationDatabase * | Base | ) |
Definition at line 791 of file GlobalCompilationDatabase.cpp.
References clang::clangd::Event< T >::broadcast(), Changes, and clang::clangd::GlobalCompilationDatabase::OnCommandChanged.
clang::clangd::DelegatingCDB::DelegatingCDB | ( | std::unique_ptr< GlobalCompilationDatabase > | Base | ) |
Definition at line 799 of file GlobalCompilationDatabase.cpp.
|
overridevirtual |
If the CDB does any asynchronous work, wait for it to complete.
For use in tests.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Definition at line 823 of file GlobalCompilationDatabase.cpp.
References clang::clangd::GlobalCompilationDatabase::blockUntilIdle(), and ns1::ns2::D.
|
overridevirtual |
If there are any known-good commands for building this file, returns one.
Implements clang::clangd::GlobalCompilationDatabase.
Reimplemented in clang::clangd::OverlayCDB.
Definition at line 805 of file GlobalCompilationDatabase.cpp.
References clang::clangd::GlobalCompilationDatabase::getCompileCommand().
|
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::GlobalCompilationDatabase.
Reimplemented in clang::clangd::OverlayCDB.
Definition at line 817 of file GlobalCompilationDatabase.cpp.
References clang::clangd::GlobalCompilationDatabase::getFallbackCommand().
|
overridevirtual |
Finds the closest project to File
.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Definition at line 811 of file GlobalCompilationDatabase.cpp.
References clang::clangd::GlobalCompilationDatabase::getProjectInfo().