ClangContext

Convenient context of items needed to practically create a clang AST.

"Creating a clang AST" means calling makeTranslationUnit.

Assumes that the scope of a ClangContext is the same as that stated for a clang Index. Namely that those translation units that are created are the same as those that would be linked together into an executable or library.

Items are: - An index that all translation units use as input. - A VFS providing access to the files that the translation unites are derived from.

Disabled Default Constructor

A disabled default is present on this object. To use it, use one of the other constructors or a factory function.

Constructors

this
this(Flag!"useInternalHeaders" useInternalHeaders, Flag!"prependParamSyntaxOnly" prependParamSyntaxOnly)

Create an instance.

Postblit

Copying this object is disabled.

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

makeTranslationUnit
auto makeTranslationUnit(in string sourceFilename, in string[] commandLineArgs = null, uint options = CXTranslationUnit_Flags.detailedPreprocessingRecord)

Create a translation unit from the context.

Variables

virtualFileSystem
VirtualFileSystem virtualFileSystem;

Access to the virtual filesystem used when instantiating translation units.

Meta