clang-tools
7.0.0
|
Provides compilation arguments used for parsing C and C++ files. More...
#include <GlobalCompilationDatabase.h>
Public Member Functions | |
virtual | ~GlobalCompilationDatabase ()=default |
virtual llvm::Optional< tooling::CompileCommand > | getCompileCommand (PathRef File) const =0 |
If there are any known-good commands for building this file, returns one. More... | |
virtual tooling::CompileCommand | getFallbackCommand (PathRef File) const |
Makes a guess at how to build a file. More... | |
Provides compilation arguments used for parsing C and C++ files.
Definition at line 31 of file GlobalCompilationDatabase.h.
|
virtualdefault |
|
pure virtual |
If there are any known-good commands for building this file, returns one.
Implemented in clang::clangd::CachingCompilationDb, and clang::clangd::DirectoryBasedGlobalCompilationDatabase.
Referenced by clang::clangd::CachingCompilationDb::getCompileCommand().
|
virtual |
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 in clang::clangd::CachingCompilationDb, and clang::clangd::DirectoryBasedGlobalCompilationDatabase.
Definition at line 20 of file GlobalCompilationDatabase.cpp.
References clang::clangd::DirectoryBasedGlobalCompilationDatabase::DirectoryBasedGlobalCompilationDatabase().
Referenced by clang::clangd::DirectoryBasedGlobalCompilationDatabase::getFallbackCommand(), and clang::clangd::CachingCompilationDb::getFallbackCommand().