clang 20.0.0git
Public Member Functions | Public Attributes | Friends | List of all members
clang::tooling::CompileCommand Struct Reference

Specifies the working directory and command of a compilation. More...

#include "clang/Tooling/CompilationDatabase.h"

Public Member Functions

 CompileCommand ()=default
 
 CompileCommand (const Twine &Directory, const Twine &Filename, std::vector< std::string > CommandLine, const Twine &Output)
 

Public Attributes

std::string Directory
 The working directory the command was executed from.
 
std::string Filename
 The source file associated with the command.
 
std::vector< std::string > CommandLine
 The command line that was executed.
 
std::string Output
 The output file associated with the command.
 
std::string Heuristic
 If this compile command was guessed rather than read from an authoritative source, a short human-readable explanation.
 

Friends

bool operator== (const CompileCommand &LHS, const CompileCommand &RHS)
 
bool operator!= (const CompileCommand &LHS, const CompileCommand &RHS)
 

Detailed Description

Specifies the working directory and command of a compilation.

Definition at line 44 of file CompilationDatabase.h.

Constructor & Destructor Documentation

◆ CompileCommand() [1/2]

clang::tooling::CompileCommand::CompileCommand ( )
default

◆ CompileCommand() [2/2]

clang::tooling::CompileCommand::CompileCommand ( const Twine &  Directory,
const Twine &  Filename,
std::vector< std::string >  CommandLine,
const Twine &  Output 
)
inline

Definition at line 46 of file CompilationDatabase.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const CompileCommand LHS,
const CompileCommand RHS 
)
friend

Definition at line 74 of file CompilationDatabase.h.

◆ operator==

bool operator== ( const CompileCommand LHS,
const CompileCommand RHS 
)
friend

Definition at line 68 of file CompilationDatabase.h.

Member Data Documentation

◆ CommandLine

std::vector<std::string> clang::tooling::CompileCommand::CommandLine

The command line that was executed.

Definition at line 58 of file CompilationDatabase.h.

Referenced by clang::tooling::ClangTool::run().

◆ Directory

std::string clang::tooling::CompileCommand::Directory

The working directory the command was executed from.

Definition at line 52 of file CompilationDatabase.h.

Referenced by clang::tooling::ClangTool::run().

◆ Filename

std::string clang::tooling::CompileCommand::Filename

The source file associated with the command.

Definition at line 55 of file CompilationDatabase.h.

Referenced by clang::tooling::ClangTool::run().

◆ Heuristic

std::string clang::tooling::CompileCommand::Heuristic

If this compile command was guessed rather than read from an authoritative source, a short human-readable explanation.

e.g. "inferred from foo/bar.h".

Definition at line 66 of file CompilationDatabase.h.

◆ Output

std::string clang::tooling::CompileCommand::Output

The output file associated with the command.

Definition at line 61 of file CompilationDatabase.h.


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