clang-tools
7.0.0
|
Gets compile args from tooling::CompilationDatabases built for parent directories. More...
#include <GlobalCompilationDatabase.h>
Public Member Functions | |
DirectoryBasedGlobalCompilationDatabase (llvm::Optional< Path > CompileCommandsDir) | |
~DirectoryBasedGlobalCompilationDatabase () override | |
llvm::Optional< tooling::CompileCommand > | getCompileCommand (PathRef File) const override |
Scans File's parents looking for compilation databases. More... | |
tooling::CompileCommand | getFallbackCommand (PathRef File) const override |
Uses the default fallback command, adding any extra flags. More... | |
void | setCompileCommandsDir (Path P) |
Set the compile commands directory to P . More... | |
void | setExtraFlagsForFile (PathRef File, std::vector< std::string > ExtraFlags) |
Sets the extra flags that should be added to a file. More... | |
![]() | |
virtual | ~GlobalCompilationDatabase ()=default |
Gets compile args from tooling::CompilationDatabases built for parent directories.
Definition at line 50 of file GlobalCompilationDatabase.h.
clang::clangd::DirectoryBasedGlobalCompilationDatabase::DirectoryBasedGlobalCompilationDatabase | ( | llvm::Optional< Path > | CompileCommandsDir | ) |
Definition at line 34 of file GlobalCompilationDatabase.cpp.
References ~DirectoryBasedGlobalCompilationDatabase().
Referenced by clang::clangd::GlobalCompilationDatabase::getFallbackCommand().
|
overridedefault |
Referenced by DirectoryBasedGlobalCompilationDatabase().
|
overridevirtual |
Scans File's parents looking for compilation databases.
Any extra flags will be added.
Implements clang::clangd::GlobalCompilationDatabase.
Definition at line 42 of file GlobalCompilationDatabase.cpp.
References clang::clangd::log(), and clang::clangd::None.
|
overridevirtual |
Uses the default fallback command, adding any extra flags.
Reimplemented from clang::clangd::GlobalCompilationDatabase.
Definition at line 56 of file GlobalCompilationDatabase.cpp.
References clang::clangd::GlobalCompilationDatabase::getFallbackCommand().
void clang::clangd::DirectoryBasedGlobalCompilationDatabase::setCompileCommandsDir | ( | Path | P | ) |
Set the compile commands directory to P
.
Definition at line 63 of file GlobalCompilationDatabase.cpp.
void clang::clangd::DirectoryBasedGlobalCompilationDatabase::setExtraFlagsForFile | ( | PathRef | File, |
std::vector< std::string > | ExtraFlags | ||
) |
Sets the extra flags that should be added to a file.
Definition at line 69 of file GlobalCompilationDatabase.cpp.
References clang::clangd::File.