clang.c.CXCompilationDatabase

Members

Aliases

CXCompilationDatabase
alias CXCompilationDatabase = void*

A compilation database holds all information used to compile files in a project. For each file in the database, it can be queried for the working directory or the command line used for the compiler invocation.

CXCompileCommand
alias CXCompileCommand = void*

\brief Represents the command line invocation to compile a specific file.

CXCompileCommands
alias CXCompileCommands = void*

\brief Contains the results of a search in the compilation database

Enums

CXCompilationDatabase_Error
enum CXCompilationDatabase_Error

\brief Error codes for Compilation Database

Functions

clang_CompilationDatabase_dispose
void clang_CompilationDatabase_dispose(CXCompilationDatabase)

\brief Free the given compilation database

clang_CompilationDatabase_fromDirectory
CXCompilationDatabase clang_CompilationDatabase_fromDirectory(const(char)* BuildDir, CXCompilationDatabase_Error* ErrorCode)

\brief Creates a compilation database from the database found in directory buildDir. For example, CMake can output a compile_commands.json which can be used to build the database.

clang_CompilationDatabase_getAllCompileCommands
CXCompileCommands clang_CompilationDatabase_getAllCompileCommands(CXCompilationDatabase)

\brief Get all the compile commands in the given compilation database.

clang_CompilationDatabase_getCompileCommands
CXCompileCommands clang_CompilationDatabase_getCompileCommands(CXCompilationDatabase, const(char)* CompleteFileName)

\brief Find the compile commands used for a file. The compile commands must be freed by \c clang_CompileCommands_dispose.

clang_CompileCommand_getArg
CXString clang_CompileCommand_getArg(CXCompileCommand, uint I)

\brief Get the I'th argument value in the compiler invocations

clang_CompileCommand_getDirectory
CXString clang_CompileCommand_getDirectory(CXCompileCommand)

\brief Get the working directory where the CompileCommand was executed from

clang_CompileCommand_getFilename
CXString clang_CompileCommand_getFilename(CXCompileCommand)

\brief Get the filename associated with the CompileCommand.

clang_CompileCommand_getMappedSourceContent
CXString clang_CompileCommand_getMappedSourceContent(CXCompileCommand, uint I)

\brief Get the I'th mapped source content for the compiler invocation.

clang_CompileCommand_getMappedSourcePath
CXString clang_CompileCommand_getMappedSourcePath(CXCompileCommand, uint I)

\brief Get the I'th mapped source path for the compiler invocation.

clang_CompileCommand_getNumArgs
uint clang_CompileCommand_getNumArgs(CXCompileCommand)

\brief Get the number of arguments in the compiler invocation.

clang_CompileCommand_getNumMappedSources
uint clang_CompileCommand_getNumMappedSources(CXCompileCommand)

\brief Get the number of source mappings for the compiler invocation.

clang_CompileCommands_dispose
void clang_CompileCommands_dispose(CXCompileCommands)

\brief Free the given CompileCommands

clang_CompileCommands_getCommand
CXCompileCommand clang_CompileCommands_getCommand(CXCompileCommands, uint I)

\brief Get the I'th CompileCommand for a file

clang_CompileCommands_getSize
uint clang_CompileCommands_getSize(CXCompileCommands)

\brief Get the number of CompileCommand we have for a file

Meta