clang-tools 22.0.0git
|
Gets compile args from tooling::CompilationDatabases built for parent directories. More...
#include <GlobalCompilationDatabase.h>
Classes | |
class | BroadcastThread |
class | DirectoryCache |
struct | Options |
Public Member Functions | |
DirectoryBasedGlobalCompilationDatabase (const Options &Opts) | |
~DirectoryBasedGlobalCompilationDatabase () override | |
std::optional< tooling::CompileCommand > | getCompileCommand (PathRef File) const override |
Scans File's parents looking for compilation databases. | |
std::optional< ProjectInfo > | getProjectInfo (PathRef File) const override |
Returns the path to first directory containing a compilation database in File's parents. | |
std::unique_ptr< ProjectModules > | getProjectModules (PathRef File) const override |
Get the modules in the closest project to File . | |
bool | blockUntilIdle (Deadline Timeout) const override |
If the CDB does any asynchronous work, wait for it to complete. | |
Public Member Functions inherited from clang::clangd::GlobalCompilationDatabase | |
virtual | ~GlobalCompilationDatabase ()=default |
virtual tooling::CompileCommand | getFallbackCommand (PathRef File) const |
Makes a guess at how to build a file. | |
CommandChanged::Subscription | watch (CommandChanged::Listener L) const |
The callback is notified when files may have new compile commands. |
Friends | |
class | DirectoryBasedGlobalCompilationDatabaseCacheTest |
Additional Inherited Members | |
Public Types inherited from clang::clangd::GlobalCompilationDatabase | |
using | CommandChanged = Event<std::vector<std::string>> |
Protected Attributes inherited from clang::clangd::GlobalCompilationDatabase | |
CommandChanged | OnCommandChanged |
Gets compile args from tooling::CompilationDatabases built for parent directories.
Definition at line 101 of file GlobalCompilationDatabase.h.
clang::clangd::DirectoryBasedGlobalCompilationDatabase::DirectoryBasedGlobalCompilationDatabase | ( | const Options & | Opts | ) |
Definition at line 350 of file GlobalCompilationDatabase.cpp.
References clang::clangd::DirectoryBasedGlobalCompilationDatabase::Options::ContextProvider.
Referenced by clang::clangd::DirectoryBasedGlobalCompilationDatabase::BroadcastThread::BroadcastThread(), and clang::clangd::DirectoryBasedGlobalCompilationDatabase::BroadcastThread::Filter::Filter().
|
overridedefault |
References clang::clangd::File.
|
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 728 of file GlobalCompilationDatabase.cpp.
|
overridevirtual |
Scans File's parents looking for compilation databases.
Any extra flags will be added. Might trigger OnCommandChanged, if CDB wasn't broadcasted yet.
Implements clang::clangd::GlobalCompilationDatabase.
Definition at line 363 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File, and clang::clangd::log().
|
overridevirtual |
Returns the path to first directory containing a compilation database in File's
parents.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Definition at line 734 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File.
|
overridevirtual |
Get the modules in the closest project to File
.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Definition at line 747 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File, and clang::clangd::scanningProjectModules().
|
friend |
Definition at line 174 of file GlobalCompilationDatabase.h.
References DirectoryBasedGlobalCompilationDatabaseCacheTest.
Referenced by DirectoryBasedGlobalCompilationDatabaseCacheTest.