dextool.compilation_db

Modules

system_compiler
module dextool.compilation_db.system_compiler
user_filerange
module dextool.compilation_db.user_filerange

Public Imports

dextool.compilation_db.user_filerange
public import dextool.compilation_db.user_filerange;
dextool.compilation_db.system_compiler
public import dextool.compilation_db.system_compiler : deduceSystemIncludes, SystemIncludePath, Compiler;

Members

Functions

defaultCompilerFilter
CompileCommandFilter defaultCompilerFilter()
Undocumented in source. Be warned that the author may not have intended to support it.
defaultCompilerFlagFilter
auto defaultCompilerFlagFilter()
find
CompileCommandSearch find(CompileCommandDB db, string glob)

Find a best matching compile_command in the database against the path pattern glob.

fromArgCompileDb
CompileCommandDB fromArgCompileDb(AbsolutePath[] paths)
Undocumented in source. Be warned that the author may not have intended to support it.
fromArgCompileDb
CompileCommandDB fromArgCompileDb(string[] paths)

Import and merge many compilation databases into one DB.

fromFile
void fromFile(CompileDbFile filename, T app)
Undocumented in source. Be warned that the author may not have intended to support it.
fromFiles
void fromFiles(CompileDbFile[] fnames, T app)
Undocumented in source. Be warned that the author may not have intended to support it.
isMatch
bool isMatch(CompileCommand a, string glob)

Check if glob fuzzy matches a.

orDefaultDb
CompileDbFile[] orDefaultDb(string[] cli_path)

Return default path if argument is null.

parseFlag
ParseFlags parseFlag(CompileCommand cmd, CompileCommandFilter flag_filter)

Filter and normalize the compiler flags.

toCompileCommand
Nullable!CompileCommand toCompileCommand(string directory, string file, string[] command, AbsoluteCompileDbDirectory db_dir, string output)

Transform a json entry to a CompileCommand.

toCompileCommandDB
CompileCommandDB toCompileCommandDB(string data, Path path)

Convert the string to a CompileCommandDB.

toString
string toString(CompileCommand[] db)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString(CompileCommandDB db)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString(CompileCommandSearch search)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

raw_dummy1
enum raw_dummy1;
Undocumented in source.
raw_dummy2
enum raw_dummy2;
Undocumented in source.
raw_dummy3
enum raw_dummy3;
Undocumented in source.
raw_dummy4
enum raw_dummy4;
Undocumented in source.
raw_dummy5
enum raw_dummy5;
Undocumented in source.

Structs

AbsoluteCompileDbDirectory
struct AbsoluteCompileDbDirectory

The absolute path to the directory the compilation database reside at.

CompileCommand
struct CompileCommand

Hold an entry from the compilation database.

CompileCommandDB
struct CompileCommandDB

A complete compilation database.

CompileCommandFilter
struct CompileCommandFilter
Undocumented in source.
CompileCommandSearch
struct CompileCommandSearch
Undocumented in source.
CompileDbFile
struct CompileDbFile

The path to the compilation database.

FilterClangFlag
struct FilterClangFlag

Flags to exclude from the flags passed on to the clang parser.

ParseFlags
struct ParseFlags

Parsed compiler flags.

Variables

dummy_dir
string dummy_dir;
Undocumented in source.
dummy_path
string dummy_path;
Undocumented in source.

Examples

auto flags = dbs.appendOrError(dbs, null, "foo.cpp", defaultCompilerFlagFilter);

Meta

License

MPL-2

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Utility functions for Clang Compilation Databases.

# Usage Call the function fromArgCompileDb to create one, merged database.

Extract flags the flags for a file by calling appendOrError.