|
clang-tools 22.0.0git
|
#include <GlobalCompilationDatabase.h>
Public Member Functions | |
| DelegatingCDB (const GlobalCompilationDatabase *Base, std::optional< std::string > FallbackWorkingDirectory=std::nullopt) | |
| DelegatingCDB (std::unique_ptr< GlobalCompilationDatabase > Base, std::optional< std::string > FallbackWorkingDirectory=std::nullopt) | |
| std::optional< tooling::CompileCommand > | getCompileCommand (PathRef File) const override |
| If there are any known-good commands for building this file, returns one. | |
| std::optional< ProjectInfo > | getProjectInfo (PathRef File) const override |
Finds the closest project to File. | |
| std::unique_ptr< ProjectModules > | getProjectModules (PathRef File) const override |
Get the modules in the closest project to File. | |
| tooling::CompileCommand | getFallbackCommand (PathRef File) const override |
| Makes a guess at how to build a file. | |
| bool | blockUntilIdle (Deadline D) const override |
| If the CDB does any asynchronous work, wait for it to complete. | |
| Public Member Functions inherited from clang::clangd::GlobalCompilationDatabase | |
| GlobalCompilationDatabase (std::optional< std::string > FallbackWorkingDirectory=std::nullopt) | |
| virtual | ~GlobalCompilationDatabase ()=default |
| CommandChanged::Subscription | watch (CommandChanged::Listener L) const |
| The callback is notified when files may have new compile commands. | |
Additional Inherited Members | |
| Public Types inherited from clang::clangd::GlobalCompilationDatabase | |
| using | CommandChanged = Event<std::vector<std::string>> |
| Protected Attributes inherited from clang::clangd::GlobalCompilationDatabase | |
| std::optional< std::string > | FallbackWorkingDirectory |
| CommandChanged | OnCommandChanged |
Definition at line 80 of file GlobalCompilationDatabase.h.
| clang::clangd::DelegatingCDB::DelegatingCDB | ( | const GlobalCompilationDatabase * | Base, |
| std::optional< std::string > | FallbackWorkingDirectory = std::nullopt ) |
Definition at line 866 of file GlobalCompilationDatabase.cpp.
References clang::clangd::GlobalCompilationDatabase::FallbackWorkingDirectory, and clang::clangd::GlobalCompilationDatabase::GlobalCompilationDatabase().
Referenced by DelegatingCDB(), and clang::clangd::OverlayCDB::OverlayCDB().
| clang::clangd::DelegatingCDB::DelegatingCDB | ( | std::unique_ptr< GlobalCompilationDatabase > | Base, |
| std::optional< std::string > | FallbackWorkingDirectory = std::nullopt ) |
Definition at line 876 of file GlobalCompilationDatabase.cpp.
References DelegatingCDB(), and clang::clangd::GlobalCompilationDatabase::FallbackWorkingDirectory.
|
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 909 of file GlobalCompilationDatabase.cpp.
|
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 884 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File.
Referenced by clang::clangd::OverlayCDB::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 903 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File, and clang::clangd::GlobalCompilationDatabase::getFallbackCommand().
Referenced by clang::clangd::OverlayCDB::getFallbackCommand().
|
overridevirtual |
Finds the closest project to File.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Definition at line 890 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File.
|
overridevirtual |
Get the modules in the closest project to File.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Reimplemented in clang::clangd::OverlayCDB.
Definition at line 897 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File.
Referenced by clang::clangd::OverlayCDB::getProjectModules().