clang API Documentation

Public Member Functions
ArgumentsAdjustingCompilations Class Reference
Inheritance diagram for ArgumentsAdjustingCompilations:
Inheritance graph
[legend]
Collaboration diagram for ArgumentsAdjustingCompilations:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ArgumentsAdjustingCompilations (std::unique_ptr< CompilationDatabase > Compilations)
void appendArgumentsAdjuster (std::unique_ptr< ArgumentsAdjuster > Adjuster)
std::vector< CompileCommandgetCompileCommands (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< CompileCommandgetAllCompileCommands () const override
 Returns all compile commands for all the files in the compilation database.

Detailed Description

Definition at line 57 of file CommonOptionsParser.cpp.


Constructor & Destructor Documentation

Definition at line 59 of file CommonOptionsParser.cpp.


Member Function Documentation

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.


The documentation for this class was generated from the following file: