clang API Documentation
Public Member Functions | |
ArgumentsAdjustingCompilations (std::unique_ptr< CompilationDatabase > Compilations) | |
void | appendArgumentsAdjuster (std::unique_ptr< ArgumentsAdjuster > Adjuster) |
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. |
Definition at line 57 of file CommonOptionsParser.cpp.
ArgumentsAdjustingCompilations::ArgumentsAdjustingCompilations | ( | std::unique_ptr< CompilationDatabase > | Compilations | ) | [inline] |
Definition at line 59 of file CommonOptionsParser.cpp.
void ArgumentsAdjustingCompilations::appendArgumentsAdjuster | ( | std::unique_ptr< ArgumentsAdjuster > | Adjuster | ) | [inline] |
Definition at line 63 of file CommonOptionsParser.cpp.
std::vector<CompileCommand> ArgumentsAdjustingCompilations::getAllCompileCommands | ( | ) | const [inline, override, virtual] |
Returns all compile commands for all the files in the compilation database.
FIXME: Add a layer in Tooling that provides an interface to run a tool over all files in a compilation database. Not all build systems have the ability to provide a feasible implementation for getAllCompileCommands
.
Implements clang::tooling::CompilationDatabase.
Definition at line 76 of file CommonOptionsParser.cpp.
std::vector<std::string> ArgumentsAdjustingCompilations::getAllFiles | ( | ) | const [inline, override, virtual] |
Returns the list of all files available in the compilation database.
Implements clang::tooling::CompilationDatabase.
Definition at line 72 of file CommonOptionsParser.cpp.
std::vector<CompileCommand> ArgumentsAdjustingCompilations::getCompileCommands | ( | StringRef | FilePath | ) | const [inline, override, virtual] |
Returns all compile commands in which the specified file was compiled.
This includes compile comamnds that span multiple source files. For example, consider a project with the following compilations: $ clang++ -o test a.cc b.cc t.cc $ clang++ -o production a.cc b.cc -DPRODUCTION A compilation database representing the project would return both command lines for a.cc and b.cc and only the first command line for t.cc.
Implements clang::tooling::CompilationDatabase.
Definition at line 68 of file CommonOptionsParser.cpp.