|
clang 24.0.0git
|
#include "clang/Tooling/JSONCompilationDatabase.h"
Public Member Functions | |
| std::vector< CompileCommand > | getCompileCommands (StringRef FilePath) const override |
| Returns all compile commands in which the specified file was compiled. | |
| std::vector< std::string > | getAllFiles () const override |
| Returns the list of all files available in the compilation database. | |
| std::vector< CompileCommand > | getAllCompileCommands () const override |
| Returns all compile commands for all the files in the compilation database. | |
| Public Member Functions inherited from clang::tooling::CompilationDatabase | |
| virtual | ~CompilationDatabase () |
Static Public Member Functions | |
| static std::unique_ptr< JSONCompilationDatabase > | loadFromFile (StringRef FilePath, std::string &ErrorMessage, JSONCommandLineSyntax Syntax) |
| Loads a JSON compilation database from the specified file. | |
| static std::unique_ptr< JSONCompilationDatabase > | loadFromBuffer (StringRef BaseDirectory, StringRef DatabaseString, std::string &ErrorMessage, JSONCommandLineSyntax Syntax) |
| Loads a JSON compilation database from a data buffer. | |
| Static Public Member Functions inherited from clang::tooling::CompilationDatabase | |
| static std::unique_ptr< CompilationDatabase > | loadFromDirectory (StringRef BuildDirectory, std::string &ErrorMessage) |
| Loads a compilation database from a build directory. | |
| static std::unique_ptr< CompilationDatabase > | autoDetectFromSource (StringRef SourceFile, std::string &ErrorMessage) |
| Tries to detect a compilation database location and load it. | |
| static std::unique_ptr< CompilationDatabase > | autoDetectFromDirectory (StringRef SourceDir, std::string &ErrorMessage) |
| Tries to detect a compilation database location and load it. | |
Definition at line 62 of file JSONCompilationDatabase.h.
|
overridevirtual |
Returns all compile commands for all the files in the compilation database.
Reimplemented from clang::tooling::CompilationDatabase.
Definition at line 251 of file JSONCompilationDatabase.cpp.
|
overridevirtual |
Returns the list of all files available in the compilation database.
These are the 'file' entries of the JSON objects.
Reimplemented from clang::tooling::CompilationDatabase.
Definition at line 243 of file JSONCompilationDatabase.cpp.
References clang::Result.
|
overridevirtual |
Returns all compile commands in which the specified file was compiled.
FIXME: Currently FilePath must be an absolute path inside the source directory which does not have symlinks resolved.
Implements clang::tooling::CompilationDatabase.
Definition at line 225 of file JSONCompilationDatabase.cpp.
References clang::Error, and clang::Match.
|
static |
Loads a JSON compilation database from a data buffer.
If BaseDirectory is non-empty, a relative "directory" is resolved against it.
Returns NULL and sets ErrorMessage if the database could not be loaded.
Definition at line 211 of file JSONCompilationDatabase.cpp.
|
static |
Loads a JSON compilation database from the specified file.
A relative "directory" is resolved against the directory containing the file.
Returns NULL and sets ErrorMessage if the database could not be loaded from the given file.
Definition at line 188 of file JSONCompilationDatabase.cpp.
References clang::Result.