diff --git a/BuildSystem.bf b/BuildSystem.bf
new file mode 100644
index 0000000..c2e720e
--- /dev/null
+++ b/BuildSystem.bf
@@ -0,0 +1,164 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*==-- clang-c/BuildSystem.h - Utilities for use by build systems -*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header provides various utilities for use by build systems. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+}
+
+extension Clang
+{
+
+
+
+
+
+
+
+
+
+/**
+ * \defgroup BUILD_SYSTEM Build system utilities
+ * @{
+ */
+
+/**
+ * Return the timestamp for use with Clang's
+ * \c -fbuild-session-timestamp= option.
+ */
+[Import(Clang.dll)] [LinkName("clang_getBuildSessionTimestamp")] public static extern c_ulonglong GetBuildSessionTimestamp();
+}
+
+/**
+ * Object encapsulating information about overlaying virtual
+ * file/directories over the real file system.
+ */
+[CRepr] public struct CXVirtualFileOverlayImpl; public struct CXVirtualFileOverlay : this(CXVirtualFileOverlayImpl* ptr);
+
+extension Clang
+{
+/**
+ * Create a \c CXVirtualFileOverlay object.
+ * Must be disposed with \c clang_VirtualFileOverlay_dispose().
+ *
+ * \param options is reserved, always pass 0.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_VirtualFileOverlay_create")] public static extern CXVirtualFileOverlay VirtualFileOverlay_Create(c_uint options);
+
+/**
+ * Map an absolute virtual file path to an absolute real one.
+ * The virtual path must be canonicalized (not contain "."/"..").
+ * \returns 0 for success, non-zero to indicate an error.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_VirtualFileOverlay_addFileMapping")] public static extern CXErrorCode VirtualFileOverlay_AddFileMapping(CXVirtualFileOverlay, c_char* virtualPath, c_char* realPath);
+
+/**
+ * Set the case sensitivity for the \c CXVirtualFileOverlay object.
+ * The \c CXVirtualFileOverlay object is case-sensitive by default, this
+ * option can be used to override the default.
+ * \returns 0 for success, non-zero to indicate an error.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_VirtualFileOverlay_setCaseSensitivity")] public static extern CXErrorCode VirtualFileOverlay_SetCaseSensitivity(CXVirtualFileOverlay, c_int caseSensitive);
+
+/**
+ * Write out the \c CXVirtualFileOverlay object to a char buffer.
+ *
+ * \param options is reserved, always pass 0.
+ * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
+ * disposed using \c clang_free().
+ * \param out_buffer_size pointer to receive the buffer size.
+ * \returns 0 for success, non-zero to indicate an error.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_VirtualFileOverlay_writeToBuffer")] public static extern CXErrorCode VirtualFileOverlay_WriteToBuffer(CXVirtualFileOverlay, c_uint options, c_char** out_buffer_ptr, c_uint* out_buffer_size);
+
+/**
+ * free memory allocated by libclang, such as the buffer returned by
+ * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer().
+ *
+ * \param buffer memory pointer to free.
+ */
+[Import(Clang.dll)] [LinkName("clang_free")] public static extern void Free(void* buffer);
+
+/**
+ * Dispose a \c CXVirtualFileOverlay object.
+ */
+[Import(Clang.dll)] [LinkName("clang_VirtualFileOverlay_dispose")] public static extern void VirtualFileOverlay_Dispose(CXVirtualFileOverlay);
+}
+
+/**
+ * Object encapsulating information about a module.map file.
+ */
+[CRepr] public struct CXModuleMapDescriptorImpl; public struct CXModuleMapDescriptor : this(CXModuleMapDescriptorImpl* ptr);
+
+extension Clang
+{
+/**
+ * Create a \c CXModuleMapDescriptor object.
+ * Must be disposed with \c clang_ModuleMapDescriptor_dispose().
+ *
+ * \param options is reserved, always pass 0.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ModuleMapDescriptor_create")] public static extern CXModuleMapDescriptor ModuleMapDescriptor_Create(c_uint options);
+
+/**
+ * Sets the framework module name that the module.map describes.
+ * \returns 0 for success, non-zero to indicate an error.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ModuleMapDescriptor_setFrameworkModuleName")] public static extern CXErrorCode ModuleMapDescriptor_SetFrameworkModuleName(CXModuleMapDescriptor, c_char* name);
+
+/**
+ * Sets the umbrella header name that the module.map describes.
+ * \returns 0 for success, non-zero to indicate an error.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ModuleMapDescriptor_setUmbrellaHeader")] public static extern CXErrorCode ModuleMapDescriptor_SetUmbrellaHeader(CXModuleMapDescriptor, c_char* name);
+
+/**
+ * Write out the \c CXModuleMapDescriptor object to a char buffer.
+ *
+ * \param options is reserved, always pass 0.
+ * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
+ * disposed using \c clang_free().
+ * \param out_buffer_size pointer to receive the buffer size.
+ * \returns 0 for success, non-zero to indicate an error.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ModuleMapDescriptor_writeToBuffer")] public static extern CXErrorCode ModuleMapDescriptor_WriteToBuffer(CXModuleMapDescriptor, c_uint options, c_char** out_buffer_ptr, c_uint* out_buffer_size);
+
+/**
+ * Dispose a \c CXModuleMapDescriptor object.
+ */
+[Import(Clang.dll)] [LinkName("clang_ModuleMapDescriptor_dispose")] public static extern void ModuleMapDescriptor_Dispose(CXModuleMapDescriptor);
+}
+
+/**
+ * @}
+ */
+
+
+
+/* CLANG_C_BUILD_SYSTEM_H */
diff --git a/CXCompilationDatabase.bf b/CXCompilationDatabase.bf
new file mode 100644
index 0000000..c4ed1e2
--- /dev/null
+++ b/CXCompilationDatabase.bf
@@ -0,0 +1,186 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*===-- clang-c/CXCompilationDatabase.h - Compilation database ---*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header provides a public interface to use CompilationDatabase without *|
+|* the full Clang C++ API. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+}
+
+
+
+
+
+
+
+
+
+/** \defgroup COMPILATIONDB CompilationDatabase functions
+ * \ingroup CINDEX
+ *
+ * @{
+ */
+
+/**
+ * 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.
+ *
+ * Must be freed by \c clang_CompilationDatabase_dispose
+ */
+public struct CXCompilationDatabase : this(void* ptr);
+
+/**
+ * Contains the results of a search in the compilation database
+ *
+ * When searching for the compile command for a file, the compilation db can
+ * return several commands, as the file may have been compiled with
+ * different options in different places of the project. This choice of compile
+ * commands is wrapped in this opaque data structure. It must be freed by
+ * \c clang_CompileCommands_dispose.
+ */
+public struct CXCompileCommands : this(void* ptr);
+
+/**
+ * Represents the command line invocation to compile a specific file.
+ */
+public struct CXCompileCommand : this(void* ptr);
+
+/**
+ * Error codes for Compilation Database
+ */
+[AllowDuplicates] public enum CXCompilationDatabase_Error : c_int {
+ /*
+ * No error occurred
+ */
+ NoError = 0,
+
+ /*
+ * Database can not be loaded
+ */
+ CanNotLoadDatabase = 1,
+
+}
+
+extension Clang
+{
+/**
+ * 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.
+ *
+ * It must be freed by \c clang_CompilationDatabase_dispose.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_fromDirectory")] public static extern CXCompilationDatabase CompilationDatabase_FromDirectory(c_char* BuildDir, CXCompilationDatabase_Error* ErrorCode);
+
+/**
+ * Free the given compilation database
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_dispose")] public static extern void CompilationDatabase_Dispose(CXCompilationDatabase);
+
+/**
+ * Find the compile commands used for a file. The compile commands
+ * must be freed by \c clang_CompileCommands_dispose.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_getCompileCommands")] public static extern CXCompileCommands CompilationDatabase_GetCompileCommands(CXCompilationDatabase, c_char* CompleteFileName);
+
+/**
+ * Get all the compile commands in the given compilation database.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompilationDatabase_getAllCompileCommands")] public static extern CXCompileCommands CompilationDatabase_GetAllCompileCommands(CXCompilationDatabase);
+
+/**
+ * Free the given CompileCommands
+ */
+[Import(Clang.dll)] [LinkName("clang_CompileCommands_dispose")] public static extern void CompileCommands_Dispose(CXCompileCommands);
+
+/**
+ * Get the number of CompileCommand we have for a file
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommands_getSize")] public static extern c_uint CompileCommands_GetSize(CXCompileCommands);
+
+/**
+ * Get the I'th CompileCommand for a file
+ *
+ * Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommands_getCommand")] public static extern CXCompileCommand CompileCommands_GetCommand(CXCompileCommands, c_uint I);
+
+/**
+ * Get the working directory where the CompileCommand was executed from
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getDirectory")] public static extern CXString CompileCommand_GetDirectory(CXCompileCommand);
+
+/**
+ * Get the filename associated with the CompileCommand.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getFilename")] public static extern CXString CompileCommand_GetFilename(CXCompileCommand);
+
+/**
+ * Get the number of arguments in the compiler invocation.
+ *
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getNumArgs")] public static extern c_uint CompileCommand_GetNumArgs(CXCompileCommand);
+
+/**
+ * Get the I'th argument value in the compiler invocations
+ *
+ * Invariant :
+ * - argument 0 is the compiler executable
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getArg")] public static extern CXString CompileCommand_GetArg(CXCompileCommand, c_uint I);
+
+/**
+ * Get the number of source mappings for the compiler invocation.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getNumMappedSources")] public static extern c_uint CompileCommand_GetNumMappedSources(CXCompileCommand);
+
+/**
+ * Get the I'th mapped source path for the compiler invocation.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getMappedSourcePath")] public static extern CXString CompileCommand_GetMappedSourcePath(CXCompileCommand, c_uint I);
+
+/**
+ * Get the I'th mapped source content for the compiler invocation.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CompileCommand_getMappedSourceContent")] public static extern CXString CompileCommand_GetMappedSourceContent(CXCompileCommand, c_uint I);
+}
+
+/**
+ * @}
+ */
+
+
+
+
diff --git a/CXErrorCode.bf b/CXErrorCode.bf
new file mode 100644
index 0000000..853bed5
--- /dev/null
+++ b/CXErrorCode.bf
@@ -0,0 +1,73 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header provides the CXErrorCode enumerators. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+}
+
+
+
+
+
+
+
+
+/**
+ * Error codes returned by libclang routines.
+ *
+ * Zero (\c CXError_Success) is the only error code indicating success. Other
+ * error codes, including not yet assigned non-zero values, indicate errors.
+ */
+[AllowDuplicates] public enum CXErrorCode : c_int {
+ /**
+ * No error.
+ */
+ Success = 0,
+
+ /**
+ * A generic error code, no further details are available.
+ *
+ * Errors of this kind can get their own specific error codes in future
+ * libclang versions.
+ */
+ Failure = 1,
+
+ /**
+ * libclang crashed while performing the requested operation.
+ */
+ Crashed = 2,
+
+ /**
+ * The function detected that the arguments violate the function
+ * contract.
+ */
+ InvalidArguments = 3,
+
+ /**
+ * An AST deserialization error has occurred.
+ */
+ ASTReadError = 4,
+}
+
+
+
+
diff --git a/CXString.bf b/CXString.bf
new file mode 100644
index 0000000..c904de1
--- /dev/null
+++ b/CXString.bf
@@ -0,0 +1,83 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header provides the interface to C Index strings. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+}
+
+
+
+
+
+
+
+
+/**
+ * \defgroup CINDEX_STRING String manipulation routines
+ * \ingroup CINDEX
+ *
+ * @{
+ */
+
+/**
+ * A character string.
+ *
+ * The \c CXString type is used to return strings from the interface when
+ * the ownership of that string might differ from one call to the next.
+ * Use \c clang_getCString() to retrieve the string data and, once finished
+ * with the string data, call \c clang_disposeString() to free the string.
+ */
+[CRepr] public struct CXString {
+ public void* data;
+ public c_uint private_flags;
+}
+
+[CRepr] public struct CXStringSet {
+ public CXString* Strings;
+ public c_uint Count;
+}
+
+extension Clang
+{
+/**
+ * Retrieve the character data associated with the given string.
+ */
+[Import(Clang.dll)] [LinkName("clang_getCString")] public static extern c_char* GetCString(CXString string);
+
+/**
+ * Free the given string.
+ */
+[Import(Clang.dll)] [LinkName("clang_disposeString")] public static extern void DisposeString(CXString string);
+
+/**
+ * Free the given string set.
+ */
+[Import(Clang.dll)] [LinkName("clang_disposeStringSet")] public static extern void DisposeStringSet(CXStringSet* set);
+}
+
+/**
+ * @}
+ */
+
+
+
+
diff --git a/Documentation.bf b/Documentation.bf
new file mode 100644
index 0000000..fadf509
--- /dev/null
+++ b/Documentation.bf
@@ -0,0 +1,569 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*==-- clang-c/Documentation.h - Utilities for comment processing -*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header provides a supplementary interface for inspecting *|
+|* documentation comments. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+}
+
+
+
+
+
+
+
+
+/**
+ * \defgroup CINDEX_COMMENT Comment introspection
+ *
+ * The routines in this group provide access to information in documentation
+ * comments. These facilities are distinct from the core and may be subject to
+ * their own schedule of stability and deprecation.
+ *
+ * @{
+ */
+
+/**
+ * A parsed comment.
+ */
+[CRepr] public struct CXComment {
+ public void* ASTNode;
+ public CXTranslationUnit TranslationUnit;
+}
+
+extension Clang
+{
+/**
+ * Given a cursor that represents a documentable entity (e.g.,
+ * declaration), return the associated parsed comment as a
+ * \c CXComment_FullComment AST node.
+ */
+[Import(Clang.dll)] [LinkName("clang_Cursor_getParsedComment")] public static extern CXComment Cursor_GetParsedComment(CXCursor C);
+}
+
+/**
+ * Describes the type of the comment AST node (\c CXComment). A comment
+ * node can be considered block content (e. g., paragraph), inline content
+ * (plain text) or neither (the root AST node).
+ */
+[AllowDuplicates] public enum CXCommentKind : c_int {
+ /**
+ * Null comment. No AST node is constructed at the requested location
+ * because there is no text or a syntax error.
+ */
+ Null = 0,
+
+ /**
+ * Plain text. Inline content.
+ */
+ Text = 1,
+
+ /**
+ * A command with word-like arguments that is considered inline content.
+ *
+ * For example: \\c command.
+ */
+ InlineCommand = 2,
+
+ /**
+ * HTML start tag with attributes (name-value pairs). Considered
+ * inline content.
+ *
+ * For example:
+ * \verbatim
+ *
+ * \endverbatim
+ */
+ HTMLStartTag = 3,
+
+ /**
+ * HTML end tag. Considered inline content.
+ *
+ * For example:
+ * \verbatim
+ *
+ * \endverbatim
+ */
+ HTMLEndTag = 4,
+
+ /**
+ * A paragraph, contains inline comment. The paragraph itself is
+ * block content.
+ */
+ Paragraph = 5,
+
+ /**
+ * A command that has zero or more word-like arguments (number of
+ * word-like arguments depends on command name) and a paragraph as an
+ * argument. Block command is block content.
+ *
+ * Paragraph argument is also a child of the block command.
+ *
+ * For example: \has 0 word-like arguments and a paragraph argument.
+ *
+ * AST nodes of special kinds that parser knows about (e. g., \\param
+ * command) have their own node kinds.
+ */
+ BlockCommand = 6,
+
+ /**
+ * A \\param or \\arg command that describes the function parameter
+ * (name, passing direction, description).
+ *
+ * For example: \\param [in] ParamName description.
+ */
+ ParamCommand = 7,
+
+ /**
+ * A \\tparam command that describes a template parameter (name and
+ * description).
+ *
+ * For example: \\tparam T description.
+ */
+ TParamCommand = 8,
+
+ /**
+ * A verbatim block command (e. g., preformatted code). Verbatim
+ * block has an opening and a closing command and contains multiple lines of
+ * text (\c CXComment_VerbatimBlockLine child nodes).
+ *
+ * For example:
+ * \\verbatim
+ * aaa
+ * \\endverbatim
+ */
+ VerbatimBlockCommand = 9,
+
+ /**
+ * A line of text that is contained within a
+ * CXComment_VerbatimBlockCommand node.
+ */
+ VerbatimBlockLine = 10,
+
+ /**
+ * A verbatim line command. Verbatim line has an opening command,
+ * a single line of text (up to the newline after the opening command) and
+ * has no closing command.
+ */
+ VerbatimLine = 11,
+
+ /**
+ * A full comment attached to a declaration, contains block content.
+ */
+ FullComment = 12,
+}
+
+/**
+ * The most appropriate rendering mode for an inline command, chosen on
+ * command semantics in Doxygen.
+ */
+[AllowDuplicates] public enum CXCommentInlineCommandRenderKind : c_int {
+ /**
+ * Command argument should be rendered in a normal font.
+ */
+ Normal,
+
+ /**
+ * Command argument should be rendered in a bold font.
+ */
+ Bold,
+
+ /**
+ * Command argument should be rendered in a monospaced font.
+ */
+ Monospaced,
+
+ /**
+ * Command argument should be rendered emphasized (typically italic
+ * font).
+ */
+ Emphasized,
+
+ /**
+ * Command argument should not be rendered (since it only defines an anchor).
+ */
+ Anchor,
+}
+
+/**
+ * Describes parameter passing direction for \\param or \\arg command.
+ */
+[AllowDuplicates] public enum CXCommentParamPassDirection : c_int {
+ /**
+ * The parameter is an input parameter.
+ */
+ In,
+
+ /**
+ * The parameter is an output parameter.
+ */
+ Out,
+
+ /**
+ * The parameter is an input and output parameter.
+ */
+ InOut,
+}
+
+extension Clang
+{
+/**
+ * \param Comment AST node of any kind.
+ *
+ * \returns the type of the AST node.
+ */
+[Import(Clang.dll)] [LinkName("clang_Comment_getKind")] public static extern CXCommentKind Comment_GetKind(CXComment Comment);
+
+/**
+ * \param Comment AST node of any kind.
+ *
+ * \returns number of children of the AST node.
+ */
+[Import(Clang.dll)] [LinkName("clang_Comment_getNumChildren")] public static extern c_uint Comment_GetNumChildren(CXComment Comment);
+
+/**
+ * \param Comment AST node of any kind.
+ *
+ * \param ChildIdx child index (zero-based).
+ *
+ * \returns the specified child of the AST node.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_Comment_getChild")] public static extern CXComment Comment_GetChild(CXComment Comment, c_uint ChildIdx);
+
+/**
+ * A \c CXComment_Paragraph node is considered whitespace if it contains
+ * only \c CXComment_Text nodes that are empty or whitespace.
+ *
+ * Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are
+ * never considered whitespace.
+ *
+ * \returns non-zero if \c Comment is whitespace.
+ */
+[Import(Clang.dll)] [LinkName("clang_Comment_isWhitespace")] public static extern c_uint Comment_IsWhitespace(CXComment Comment);
+
+/**
+ * \returns non-zero if \c Comment is inline content and has a newline
+ * immediately following it in the comment text. Newlines between paragraphs
+ * do not count.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_InlineContentComment_hasTrailingNewline")] public static extern c_uint InlineContentComment_HasTrailingNewline(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_Text AST node.
+ *
+ * \returns text contained in the AST node.
+ */
+[Import(Clang.dll)] [LinkName("clang_TextComment_getText")] public static extern CXString TextComment_GetText(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \returns name of the inline command.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_InlineCommandComment_getCommandName")] public static extern CXString InlineCommandComment_GetCommandName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \returns the most appropriate rendering mode, chosen on command
+ * semantics in Doxygen.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_InlineCommandComment_getRenderKind")] public static extern CXCommentInlineCommandRenderKind InlineCommandComment_GetRenderKind(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \returns number of command arguments.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_InlineCommandComment_getNumArgs")] public static extern c_uint InlineCommandComment_GetNumArgs(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_InlineCommand AST node.
+ *
+ * \param ArgIdx argument index (zero-based).
+ *
+ * \returns text of the specified argument.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_InlineCommandComment_getArgText")] public static extern CXString InlineCommandComment_GetArgText(CXComment Comment, c_uint ArgIdx);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
+ * node.
+ *
+ * \returns HTML tag name.
+ */
+[Import(Clang.dll)] [LinkName("clang_HTMLTagComment_getTagName")] public static extern CXString HTMLTagComment_GetTagName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \returns non-zero if tag is self-closing (for example, <br />).
+ */
+
+[Import(Clang.dll)] [LinkName("clang_HTMLStartTagComment_isSelfClosing")] public static extern c_uint HTMLStartTagComment_IsSelfClosing(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \returns number of attributes (name-value pairs) attached to the start tag.
+ */
+[Import(Clang.dll)] [LinkName("clang_HTMLStartTag_getNumAttrs")] public static extern c_uint HTMLStartTag_GetNumAttrs(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \param AttrIdx attribute index (zero-based).
+ *
+ * \returns name of the specified attribute.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_HTMLStartTag_getAttrName")] public static extern CXString HTMLStartTag_GetAttrName(CXComment Comment, c_uint AttrIdx);
+
+/**
+ * \param Comment a \c CXComment_HTMLStartTag AST node.
+ *
+ * \param AttrIdx attribute index (zero-based).
+ *
+ * \returns value of the specified attribute.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_HTMLStartTag_getAttrValue")] public static extern CXString HTMLStartTag_GetAttrValue(CXComment Comment, c_uint AttrIdx);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand AST node.
+ *
+ * \returns name of the block command.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_BlockCommandComment_getCommandName")] public static extern CXString BlockCommandComment_GetCommandName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand AST node.
+ *
+ * \returns number of word-like arguments.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_BlockCommandComment_getNumArgs")] public static extern c_uint BlockCommandComment_GetNumArgs(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand AST node.
+ *
+ * \param ArgIdx argument index (zero-based).
+ *
+ * \returns text of the specified word-like argument.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_BlockCommandComment_getArgText")] public static extern CXString BlockCommandComment_GetArgText(CXComment Comment, c_uint ArgIdx);
+
+/**
+ * \param Comment a \c CXComment_BlockCommand or
+ * \c CXComment_VerbatimBlockCommand AST node.
+ *
+ * \returns paragraph argument of the block command.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_BlockCommandComment_getParagraph")] public static extern CXComment BlockCommandComment_GetParagraph(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns parameter name.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ParamCommandComment_getParamName")] public static extern CXString ParamCommandComment_GetParamName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns non-zero if the parameter that this AST node represents was found
+ * in the function prototype and \c clang_ParamCommandComment_getParamIndex
+ * function will return a meaningful value.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ParamCommandComment_isParamIndexValid")] public static extern c_uint ParamCommandComment_IsParamIndexValid(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns zero-based parameter index in function prototype.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ParamCommandComment_getParamIndex")] public static extern c_uint ParamCommandComment_GetParamIndex(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns non-zero if parameter passing direction was specified explicitly in
+ * the comment.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ParamCommandComment_isDirectionExplicit")] public static extern c_uint ParamCommandComment_IsDirectionExplicit(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_ParamCommand AST node.
+ *
+ * \returns parameter passing direction.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_ParamCommandComment_getDirection")] public static extern CXCommentParamPassDirection ParamCommandComment_GetDirection(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns template parameter name.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_TParamCommandComment_getParamName")] public static extern CXString TParamCommandComment_GetParamName(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns non-zero if the parameter that this AST node represents was found
+ * in the template parameter list and
+ * \c clang_TParamCommandComment_getDepth and
+ * \c clang_TParamCommandComment_getIndex functions will return a meaningful
+ * value.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_TParamCommandComment_isParamPositionValid")] public static extern c_uint TParamCommandComment_IsParamPositionValid(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns zero-based nesting depth of this parameter in the template parameter list.
+ *
+ * For example,
+ * \verbatim
+ * template class TT>
+ * void test(TT aaa);
+ * \endverbatim
+ * for C and TT nesting depth is 0,
+ * for T nesting depth is 1.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_TParamCommandComment_getDepth")] public static extern c_uint TParamCommandComment_GetDepth(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_TParamCommand AST node.
+ *
+ * \returns zero-based parameter index in the template parameter list at a
+ * given nesting depth.
+ *
+ * For example,
+ * \verbatim
+ * template class TT>
+ * void test(TT aaa);
+ * \endverbatim
+ * for C and TT nesting depth is 0, so we can ask for index at depth 0:
+ * at depth 0 C's index is 0, TT's index is 1.
+ *
+ * For T nesting depth is 1, so we can ask for index at depth 0 and 1:
+ * at depth 0 T's index is 1 (same as TT's),
+ * at depth 1 T's index is 0.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_TParamCommandComment_getIndex")] public static extern c_uint TParamCommandComment_GetIndex(CXComment Comment, c_uint Depth);
+
+/**
+ * \param Comment a \c CXComment_VerbatimBlockLine AST node.
+ *
+ * \returns text contained in the AST node.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_VerbatimBlockLineComment_getText")] public static extern CXString VerbatimBlockLineComment_GetText(CXComment Comment);
+
+/**
+ * \param Comment a \c CXComment_VerbatimLine AST node.
+ *
+ * \returns text contained in the AST node.
+ */
+[Import(Clang.dll)] [LinkName("clang_VerbatimLineComment_getText")] public static extern CXString VerbatimLineComment_GetText(CXComment Comment);
+
+/**
+ * Convert an HTML tag AST node to string.
+ *
+ * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
+ * node.
+ *
+ * \returns string containing an HTML tag.
+ */
+[Import(Clang.dll)] [LinkName("clang_HTMLTagComment_getAsString")] public static extern CXString HTMLTagComment_GetAsString(CXComment Comment);
+
+/**
+ * Convert a given full parsed comment to an HTML fragment.
+ *
+ * Specific details of HTML layout are subject to change. Don't try to parse
+ * this HTML back into an AST, use other APIs instead.
+ *
+ * Currently the following CSS classes are used:
+ * \li "para-brief" for \paragraph and equivalent commands;
+ * \li "para-returns" for \\returns paragraph and equivalent commands;
+ * \li "word-returns" for the "Returns" word in \\returns paragraph.
+ *
+ * Function argument documentation is rendered as a \ list with arguments
+ * sorted in function prototype order. CSS classes used:
+ * \li "param-name-index-NUMBER" for parameter name (\- );
+ * \li "param-descr-index-NUMBER" for parameter description (\
- );
+ * \li "param-name-index-invalid" and "param-descr-index-invalid" are used if
+ * parameter index is invalid.
+ *
+ * Template parameter documentation is rendered as a \
list with
+ * parameters sorted in template parameter list order. CSS classes used:
+ * \li "tparam-name-index-NUMBER" for parameter name (\- );
+ * \li "tparam-descr-index-NUMBER" for parameter description (\
- );
+ * \li "tparam-name-index-other" and "tparam-descr-index-other" are used for
+ * names inside template template parameters;
+ * \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if
+ * parameter position is invalid.
+ *
+ * \param Comment a \c CXComment_FullComment AST node.
+ *
+ * \returns string containing an HTML fragment.
+ */
+[Import(Clang.dll)] [LinkName("clang_FullComment_getAsHTML")] public static extern CXString FullComment_GetAsHTML(CXComment Comment);
+
+/**
+ * Convert a given full parsed comment to an XML document.
+ *
+ * A Relax NG schema for the XML can be found in comment-xml-schema.rng file
+ * inside clang source tree.
+ *
+ * \param Comment a \c CXComment_FullComment AST node.
+ *
+ * \returns string containing an XML document.
+ */
+[Import(Clang.dll)] [LinkName("clang_FullComment_getAsXML")] public static extern CXString FullComment_GetAsXML(CXComment Comment);
+}
+
+/**
+ * @}
+ */
+
+
+
+/* CLANG_C_DOCUMENTATION_H */
diff --git a/ExternC.bf b/ExternC.bf
new file mode 100644
index 0000000..8969476
--- /dev/null
+++ b/ExternC.bf
@@ -0,0 +1,52 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*===- clang-c/ExternC.h - Wrapper for 'extern "C"' ---------------*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This file defines an 'extern "C"' wrapper. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+
+
+public const let LLVM_CLANG_C_STRICT_PROTOTYPES_BEGIN
+ = _Pragma("clang diagnostic push")
+ _Pragma("clang diagnostic error \"-Wstrict-prototypes\"");
+
+
+public const let LLVM_CLANG_C_STRICT_PROTOTYPES_END = _Pragma("clang diagnostic pop");
+
+
+
+
+
+
+
+
+
+
+
+
+
+public const let LLVM_CLANG_C_EXTERN_C_BEGIN = LLVM_CLANG_C_STRICT_PROTOTYPES_BEGIN;
+public const let LLVM_CLANG_C_EXTERN_C_END = LLVM_CLANG_C_STRICT_PROTOTYPES_END;
+}
+
+
+
+
diff --git a/FatalErrorHandler.bf b/FatalErrorHandler.bf
new file mode 100644
index 0000000..fb14646
--- /dev/null
+++ b/FatalErrorHandler.bf
@@ -0,0 +1,44 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*===-- clang-c/FatalErrorHandler.h - Fatal Error Handling --------*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+}
+
+extension Clang
+{
+
+
+
+
+
+
+/**
+ * Installs error handler that prints error message to stderr and calls abort().
+ * Replaces currently installed error handler (if any).
+ */
+[Import(Clang.dll)] [LinkName("clang_install_aborting_llvm_fatal_error_handler")] public static extern void Install_Aborting_Llvm_Fatal_Error_Handler();
+
+/**
+ * Removes currently installed error handler (if any).
+ * If no error handler is intalled, the default strategy is to print error
+ * message to stderr and call exit(1).
+ */
+[Import(Clang.dll)] [LinkName("clang_uninstall_llvm_fatal_error_handler")] public static extern void Uninstall_Llvm_Fatal_Error_Handler();
+}
+
diff --git a/Index.bf b/Index.bf
new file mode 100644
index 0000000..e5ab7bf
--- /dev/null
+++ b/Index.bf
@@ -0,0 +1,6864 @@
+// This file was auto-generated by Cpp2Beef
+
+using System;
+using System.Interop;
+
+namespace LibClang;
+
+static
+{
+/*===-- clang-c/Index.h - Indexing Public C Interface -------------*- C -*-===*\
+|* *|
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
+|* Exceptions. *|
+|* See https://llvm.org/LICENSE.txt for license information. *|
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
+|* *|
+|*===----------------------------------------------------------------------===*|
+|* *|
+|* This header provides a public interface to a Clang library for extracting *|
+|* high-level symbol information from source files without exposing the full *|
+|* Clang C++ API. *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+
+
+
+
+
+
+
+
+
+
+
+/**
+ * The version constants for the libclang API.
+ * CINDEX_VERSION_MINOR should increase when there are API additions.
+ * CINDEX_VERSION_MAJOR is intended for "major" source/ABI breaking changes.
+ *
+ * The policy about the libclang API was always to keep it source and ABI
+ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
+ */
+public const let CINDEX_VERSION_MAJOR = 0;
+public const let CINDEX_VERSION_MINOR = 62;
+
+
+
+public const let CINDEX_VERSION
+ = CINDEX_VERSION_ENCODE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR);
+
+
+
+
+
+
+public const let CINDEX_VERSION_STRING
+ = CINDEX_VERSION_STRINGIZE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR);
+}
+
+
+
+
+
+
+/** \defgroup CINDEX libclang: C Interface to Clang
+ *
+ * The C Interface to Clang provides a relatively small API that exposes
+ * facilities for parsing source code into an abstract syntax tree (AST),
+ * loading already-parsed ASTs, traversing the AST, associating
+ * physical source locations with elements within the AST, and other
+ * facilities that support Clang-based development tools.
+ *
+ * This C interface to Clang will never provide all of the information
+ * representation stored in Clang's C++ AST, nor should it: the intent is to
+ * maintain an API that is relatively stable from one release to the next,
+ * providing only the basic functionality needed to support development tools.
+ *
+ * To avoid namespace pollution, data types are prefixed with "CX" and
+ * functions are prefixed with "clang_".
+ *
+ * @{
+ */
+
+/**
+ * An "index" that consists of a set of translation units that would
+ * typically be linked together into an executable or library.
+ */
+public struct CXIndex : this(void* ptr);
+
+/**
+ * An opaque type representing target information for a given translation
+ * unit.
+ */
+[CRepr] public struct CXTargetInfoImpl; public struct CXTargetInfo : this(CXTargetInfoImpl* ptr);
+
+/**
+ * A single translation unit, which resides in an index.
+ */
+[CRepr] public struct CXTranslationUnitImpl; public struct CXTranslationUnit : this(CXTranslationUnitImpl* ptr);
+
+/**
+ * Opaque pointer representing client data that will be passed through
+ * to various callbacks and visitors.
+ */
+public typealias CXClientData = void*;
+
+/**
+ * Provides the contents of a file that has not yet been saved to disk.
+ *
+ * Each CXUnsavedFile instance provides the name of a file on the
+ * system along with the current contents of that file that have not
+ * yet been saved to disk.
+ */
+[CRepr] public struct CXUnsavedFile {
+ /**
+ * The file whose contents have not yet been saved.
+ *
+ * This file must already exist in the file system.
+ */
+ public c_char* Filename;
+
+ /**
+ * A buffer containing the unsaved contents of this file.
+ */
+ public c_char* Contents;
+
+ /**
+ * The length of the unsaved contents of this buffer.
+ */
+ public c_ulong Length;
+}
+
+/**
+ * Describes the availability of a particular entity, which indicates
+ * whether the use of this entity will result in a warning or error due to
+ * it being deprecated or unavailable.
+ */
+[AllowDuplicates] public enum CXAvailabilityKind : c_int {
+ /**
+ * The entity is available.
+ */
+ Available,
+ /**
+ * The entity is available, but has been deprecated (and its use is
+ * not recommended).
+ */
+ Deprecated,
+ /**
+ * The entity is not available; any use of it will be an error.
+ */
+ NotAvailable,
+ /**
+ * The entity is available, but not accessible; any use of it will be
+ * an error.
+ */
+ NotAccessible,
+}
+
+/**
+ * Describes a version number of the form major.minor.subminor.
+ */
+[CRepr] public struct CXVersion {
+ /**
+ * The major version number, e.g., the '10' in '10.7.3'. A negative
+ * value indicates that there is no version number at all.
+ */
+ public c_int Major;
+ /**
+ * The minor version number, e.g., the '7' in '10.7.3'. This value
+ * will be negative if no minor version number was provided, e.g., for
+ * version '10'.
+ */
+ public c_int Minor;
+ /**
+ * The subminor version number, e.g., the '3' in '10.7.3'. This value
+ * will be negative if no minor or subminor version number was provided,
+ * e.g., in version '10' or '10.7'.
+ */
+ public c_int Subminor;
+}
+
+/**
+ * Describes the exception specification of a cursor.
+ *
+ * A negative value indicates that the cursor is not a function declaration.
+ */
+[AllowDuplicates] public enum CXCursor_ExceptionSpecificationKind : c_int {
+ /**
+ * The cursor has no exception specification.
+ */
+ None,
+
+ /**
+ * The cursor has exception specification throw()
+ */
+ DynamicNone,
+
+ /**
+ * The cursor has exception specification throw(T1, T2)
+ */
+ Dynamic,
+
+ /**
+ * The cursor has exception specification throw(...).
+ */
+ MSAny,
+
+ /**
+ * The cursor has exception specification basic noexcept.
+ */
+ BasicNoexcept,
+
+ /**
+ * The cursor has exception specification computed noexcept.
+ */
+ ComputedNoexcept,
+
+ /**
+ * The exception specification has not yet been evaluated.
+ */
+ Unevaluated,
+
+ /**
+ * The exception specification has not yet been instantiated.
+ */
+ Uninstantiated,
+
+ /**
+ * The exception specification has not been parsed yet.
+ */
+ Unparsed,
+
+ /**
+ * The cursor has a __declspec(nothrow) exception specification.
+ */
+ NoThrow,
+}
+
+extension Clang
+{
+/**
+ * Provides a shared context for creating translation units.
+ *
+ * It provides two options:
+ *
+ * - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local"
+ * declarations (when loading any new translation units). A "local" declaration
+ * is one that belongs in the translation unit itself and not in a precompiled
+ * header that was used by the translation unit. If zero, all declarations
+ * will be enumerated.
+ *
+ * Here is an example:
+ *
+ * \code
+ * // excludeDeclsFromPCH = 1, displayDiagnostics=1
+ * Idx = clang_createIndex(1, 1);
+ *
+ * // IndexTest.pch was produced with the following command:
+ * // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch"
+ * TU = clang_createTranslationUnit(Idx, "IndexTest.pch");
+ *
+ * // This will load all the symbols from 'IndexTest.pch'
+ * clang_visitChildren(clang_getTranslationUnitCursor(TU),
+ * TranslationUnitVisitor, 0);
+ * clang_disposeTranslationUnit(TU);
+ *
+ * // This will load all the symbols from 'IndexTest.c', excluding symbols
+ * // from 'IndexTest.pch'.
+ * char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" };
+ * TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args,
+ * 0, 0);
+ * clang_visitChildren(clang_getTranslationUnitCursor(TU),
+ * TranslationUnitVisitor, 0);
+ * clang_disposeTranslationUnit(TU);
+ * \endcode
+ *
+ * This process of creating the 'pch', loading it separately, and using it (via
+ * -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks
+ * (which gives the indexer the same performance benefit as the compiler).
+ */
+[Import(Clang.dll)] [LinkName("clang_createIndex")] public static extern CXIndex CreateIndex(c_int excludeDeclarationsFromPCH, c_int displayDiagnostics);
+
+/**
+ * Destroy the given index.
+ *
+ * The index must not be destroyed until all of the translation units created
+ * within that index have been destroyed.
+ */
+[Import(Clang.dll)] [LinkName("clang_disposeIndex")] public static extern void DisposeIndex(CXIndex index);
+}
+
+[AllowDuplicates] public enum CXGlobalOptFlags : c_int {
+ /**
+ * Used to indicate that no special CXIndex options are needed.
+ */
+ None = 0x0,
+
+ /**
+ * Used to indicate that threads that libclang creates for indexing
+ * purposes should use background priority.
+ *
+ * Affects #clang_indexSourceFile, #clang_indexTranslationUnit,
+ * #clang_parseTranslationUnit, #clang_saveTranslationUnit.
+ */
+ ThreadBackgroundPriorityForIndexing = 0x1,
+
+ /**
+ * Used to indicate that threads that libclang creates for editing
+ * purposes should use background priority.
+ *
+ * Affects #clang_reparseTranslationUnit, #clang_codeCompleteAt,
+ * #clang_annotateTokens
+ */
+ ThreadBackgroundPriorityForEditing = 0x2,
+
+ /**
+ * Used to indicate that all threads that libclang creates should use
+ * background priority.
+ */
+ ThreadBackgroundPriorityForAll =
+ ThreadBackgroundPriorityForIndexing |
+ ThreadBackgroundPriorityForEditing,
+
+}
+
+extension Clang
+{
+/**
+ * Sets general options associated with a CXIndex.
+ *
+ * For example:
+ * \code
+ * CXIndex idx = ...;
+ * clang_CXIndex_setGlobalOptions(idx,
+ * clang_CXIndex_getGlobalOptions(idx) |
+ * CXGlobalOpt_ThreadBackgroundPriorityForIndexing);
+ * \endcode
+ *
+ * \param options A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags.
+ */
+[Import(Clang.dll)] [LinkName("clang_CXIndex_setGlobalOptions")] public static extern void CXIndex_SetGlobalOptions(CXIndex, c_uint options);
+
+/**
+ * Gets the general options associated with a CXIndex.
+ *
+ * \returns A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags that
+ * are associated with the given CXIndex object.
+ */
+[Import(Clang.dll)] [LinkName("clang_CXIndex_getGlobalOptions")] public static extern c_uint CXIndex_GetGlobalOptions(CXIndex);
+
+/**
+ * Sets the invocation emission path option in a CXIndex.
+ *
+ * The invocation emission path specifies a path which will contain log
+ * files for certain libclang invocations. A null value (default) implies that
+ * libclang invocations are not logged..
+ */
+
+[Import(Clang.dll)] [LinkName("clang_CXIndex_setInvocationEmissionPathOption")] public static extern void CXIndex_SetInvocationEmissionPathOption(CXIndex, c_char* Path);
+}
+
+/**
+ * \defgroup CINDEX_FILES File manipulation routines
+ *
+ * @{
+ */
+
+/**
+ * A particular source file that is part of a translation unit.
+ */
+public struct CXFile : this(void* ptr);
+
+extension Clang
+{
+/**
+ * Retrieve the complete file and path name of the given file.
+ */
+[Import(Clang.dll)] [LinkName("clang_getFileName")] public static extern CXString GetFileName(CXFile SFile);
+
+/**
+ * Retrieve the last modification time of the given file.
+ */
+[Import(Clang.dll)] [LinkName("clang_getFileTime")] public static extern time_t GetFileTime(CXFile SFile);
+}
+
+/**
+ * Uniquely identifies a CXFile, that refers to the same underlying file,
+ * across an indexing session.
+ */
+[CRepr] public struct CXFileUniqueID {
+ public c_ulonglong[3] data;
+}
+
+extension Clang
+{
+/**
+ * Retrieve the unique ID for the given \c file.
+ *
+ * \param file the file to get the ID for.
+ * \param outID stores the returned CXFileUniqueID.
+ * \returns If there was a failure getting the unique ID, returns non-zero,
+ * otherwise returns 0.
+ */
+[Import(Clang.dll)] [LinkName("clang_getFileUniqueID")] public static extern c_int GetFileUniqueID(CXFile file, CXFileUniqueID* outID);
+
+/**
+ * Determine whether the given header is guarded against
+ * multiple inclusions, either with the conventional
+ * \#ifndef/\#define/\#endif macro guards or with \#pragma once.
+ */
+[Import(Clang.dll)] [LinkName("clang_isFileMultipleIncludeGuarded")] public static extern c_uint IsFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file);
+
+/**
+ * Retrieve a file handle within the given translation unit.
+ *
+ * \param tu the translation unit
+ *
+ * \param file_name the name of the file.
+ *
+ * \returns the file handle for the named file in the translation unit \p tu,
+ * or a NULL file handle if the file was not a part of this translation unit.
+ */
+[Import(Clang.dll)] [LinkName("clang_getFile")] public static extern CXFile GetFile(CXTranslationUnit tu, c_char* file_name);
+
+/**
+ * Retrieve the buffer associated with the given file.
+ *
+ * \param tu the translation unit
+ *
+ * \param file the file for which to retrieve the buffer.
+ *
+ * \param size [out] if non-NULL, will be set to the size of the buffer.
+ *
+ * \returns a pointer to the buffer in memory that holds the contents of
+ * \p file, or a NULL pointer when the file is not loaded.
+ */
+[Import(Clang.dll)] [LinkName("clang_getFileContents")] public static extern c_char* GetFileContents(CXTranslationUnit tu, CXFile file, out c_size size);
+
+/**
+ * Returns non-zero if the \c file1 and \c file2 point to the same file,
+ * or they are both NULL.
+ */
+[Import(Clang.dll)] [LinkName("clang_File_isEqual")] public static extern c_int File_IsEqual(CXFile file1, CXFile file2);
+
+/**
+ * Returns the real path name of \c file.
+ *
+ * An empty string may be returned. Use \c clang_getFileName() in that case.
+ */
+[Import(Clang.dll)] [LinkName("clang_File_tryGetRealPathName")] public static extern CXString File_TryGetRealPathName(CXFile file);
+}
+
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_LOCATIONS Physical source locations
+ *
+ * Clang represents physical source locations in its abstract syntax tree in
+ * great detail, with file, line, and column information for the majority of
+ * the tokens parsed in the source code. These data types and functions are
+ * used to represent source location information, either for a particular
+ * point in the program or for a range of points in the program, and extract
+ * specific location information from those data types.
+ *
+ * @{
+ */
+
+/**
+ * Identifies a specific source location within a translation
+ * unit.
+ *
+ * Use clang_getExpansionLocation() or clang_getSpellingLocation()
+ * to map a source location to a particular file, line, and column.
+ */
+[CRepr] public struct CXSourceLocation {
+ public void*[2] ptr_data;
+ public c_uint int_data;
+}
+
+/**
+ * Identifies a half-open character range in the source code.
+ *
+ * Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the
+ * starting and end locations from a source range, respectively.
+ */
+[CRepr] public struct CXSourceRange {
+ public void*[2] ptr_data;
+ public c_uint begin_int_data;
+ public c_uint end_int_data;
+}
+
+extension Clang
+{
+/**
+ * Retrieve a NULL (invalid) source location.
+ */
+[Import(Clang.dll)] [LinkName("clang_getNullLocation")] public static extern CXSourceLocation GetNullLocation();
+
+/**
+ * Determine whether two source locations, which must refer into
+ * the same translation unit, refer to exactly the same point in the source
+ * code.
+ *
+ * \returns non-zero if the source locations refer to the same location, zero
+ * if they refer to different locations.
+ */
+[Import(Clang.dll)] [LinkName("clang_equalLocations")] public static extern c_uint EqualLocations(CXSourceLocation loc1, CXSourceLocation loc2);
+
+/**
+ * Retrieves the source location associated with a given file/line/column
+ * in a particular translation unit.
+ */
+[Import(Clang.dll)] [LinkName("clang_getLocation")] public static extern CXSourceLocation GetLocation(CXTranslationUnit tu, CXFile file, c_uint line, c_uint column);
+/**
+ * Retrieves the source location associated with a given character offset
+ * in a particular translation unit.
+ */
+[Import(Clang.dll)] [LinkName("clang_getLocationForOffset")] public static extern CXSourceLocation GetLocationForOffset(CXTranslationUnit tu, CXFile file, c_uint offset);
+
+/**
+ * Returns non-zero if the given source location is in a system header.
+ */
+[Import(Clang.dll)] [LinkName("clang_Location_isInSystemHeader")] public static extern c_int Location_IsInSystemHeader(CXSourceLocation location);
+
+/**
+ * Returns non-zero if the given source location is in the main file of
+ * the corresponding translation unit.
+ */
+[Import(Clang.dll)] [LinkName("clang_Location_isFromMainFile")] public static extern c_int Location_IsFromMainFile(CXSourceLocation location);
+
+/**
+ * Retrieve a NULL (invalid) source range.
+ */
+[Import(Clang.dll)] [LinkName("clang_getNullRange")] public static extern CXSourceRange GetNullRange();
+
+/**
+ * Retrieve a source range given the beginning and ending source
+ * locations.
+ */
+[Import(Clang.dll)] [LinkName("clang_getRange")] public static extern CXSourceRange GetRange(CXSourceLocation begin, CXSourceLocation end);
+
+/**
+ * Determine whether two ranges are equivalent.
+ *
+ * \returns non-zero if the ranges are the same, zero if they differ.
+ */
+[Import(Clang.dll)] [LinkName("clang_equalRanges")] public static extern c_uint EqualRanges(CXSourceRange range1, CXSourceRange range2);
+
+/**
+ * Returns non-zero if \p range is null.
+ */
+[Import(Clang.dll)] [LinkName("clang_Range_isNull")] public static extern c_int Range_IsNull(CXSourceRange range);
+
+/**
+ * Retrieve the file, line, column, and offset represented by
+ * the given source location.
+ *
+ * If the location refers into a macro expansion, retrieves the
+ * location of the macro expansion.
+ *
+ * \param location the location within a source file that will be decomposed
+ * into its parts.
+ *
+ * \param file [out] if non-NULL, will be set to the file to which the given
+ * source location points.
+ *
+ * \param line [out] if non-NULL, will be set to the line to which the given
+ * source location points.
+ *
+ * \param column [out] if non-NULL, will be set to the column to which the given
+ * source location points.
+ *
+ * \param offset [out] if non-NULL, will be set to the offset into the
+ * buffer to which the given source location points.
+ */
+[Import(Clang.dll)] [LinkName("clang_getExpansionLocation")] public static extern void GetExpansionLocation(CXSourceLocation location, out CXFile file, out c_uint line, out c_uint column, out c_uint offset);
+
+/**
+ * Retrieve the file, line and column represented by the given source
+ * location, as specified in a # line directive.
+ *
+ * Example: given the following source code in a file somefile.c
+ *
+ * \code
+ * #123 "dummy.c" 1
+ *
+ * static int func(void)
+ * {
+ * return 0;
+ * }
+ * \endcode
+ *
+ * the location information returned by this function would be
+ *
+ * File: dummy.c Line: 124 Column: 12
+ *
+ * whereas clang_getExpansionLocation would have returned
+ *
+ * File: somefile.c Line: 3 Column: 12
+ *
+ * \param location the location within a source file that will be decomposed
+ * into its parts.
+ *
+ * \param filename [out] if non-NULL, will be set to the filename of the
+ * source location. Note that filenames returned will be for "virtual" files,
+ * which don't necessarily exist on the machine running clang - e.g. when
+ * parsing preprocessed output obtained from a different environment. If
+ * a non-NULL value is passed in, remember to dispose of the returned value
+ * using \c clang_disposeString() once you've finished with it. For an invalid
+ * source location, an empty string is returned.
+ *
+ * \param line [out] if non-NULL, will be set to the line number of the
+ * source location. For an invalid source location, zero is returned.
+ *
+ * \param column [out] if non-NULL, will be set to the column number of the
+ * source location. For an invalid source location, zero is returned.
+ */
+[Import(Clang.dll)] [LinkName("clang_getPresumedLocation")] public static extern void GetPresumedLocation(CXSourceLocation location, out CXString filename, out c_uint line, out c_uint column);
+
+/**
+ * Legacy API to retrieve the file, line, column, and offset represented
+ * by the given source location.
+ *
+ * This interface has been replaced by the newer interface
+ * #clang_getExpansionLocation(). See that interface's documentation for
+ * details.
+ */
+[Import(Clang.dll)] [LinkName("clang_getInstantiationLocation")] public static extern void GetInstantiationLocation(CXSourceLocation location, CXFile* file, c_uint* line, c_uint* column, c_uint* offset);
+
+/**
+ * Retrieve the file, line, column, and offset represented by
+ * the given source location.
+ *
+ * If the location refers into a macro instantiation, return where the
+ * location was originally spelled in the source file.
+ *
+ * \param location the location within a source file that will be decomposed
+ * into its parts.
+ *
+ * \param file [out] if non-NULL, will be set to the file to which the given
+ * source location points.
+ *
+ * \param line [out] if non-NULL, will be set to the line to which the given
+ * source location points.
+ *
+ * \param column [out] if non-NULL, will be set to the column to which the given
+ * source location points.
+ *
+ * \param offset [out] if non-NULL, will be set to the offset into the
+ * buffer to which the given source location points.
+ */
+[Import(Clang.dll)] [LinkName("clang_getSpellingLocation")] public static extern void GetSpellingLocation(CXSourceLocation location, out CXFile file, out c_uint line, out c_uint column, out c_uint offset);
+
+/**
+ * Retrieve the file, line, column, and offset represented by
+ * the given source location.
+ *
+ * If the location refers into a macro expansion, return where the macro was
+ * expanded or where the macro argument was written, if the location points at
+ * a macro argument.
+ *
+ * \param location the location within a source file that will be decomposed
+ * into its parts.
+ *
+ * \param file [out] if non-NULL, will be set to the file to which the given
+ * source location points.
+ *
+ * \param line [out] if non-NULL, will be set to the line to which the given
+ * source location points.
+ *
+ * \param column [out] if non-NULL, will be set to the column to which the given
+ * source location points.
+ *
+ * \param offset [out] if non-NULL, will be set to the offset into the
+ * buffer to which the given source location points.
+ */
+[Import(Clang.dll)] [LinkName("clang_getFileLocation")] public static extern void GetFileLocation(CXSourceLocation location, out CXFile file, out c_uint line, out c_uint column, out c_uint offset);
+
+/**
+ * Retrieve a source location representing the first character within a
+ * source range.
+ */
+[Import(Clang.dll)] [LinkName("clang_getRangeStart")] public static extern CXSourceLocation GetRangeStart(CXSourceRange range);
+
+/**
+ * Retrieve a source location representing the last character within a
+ * source range.
+ */
+[Import(Clang.dll)] [LinkName("clang_getRangeEnd")] public static extern CXSourceLocation GetRangeEnd(CXSourceRange range);
+}
+
+/**
+ * Identifies an array of ranges.
+ */
+[CRepr] public struct CXSourceRangeList {
+ /** The number of ranges in the \c ranges array. */
+ public c_uint count;
+ /**
+ * An array of \c CXSourceRanges.
+ */
+ public CXSourceRange* ranges;
+}
+
+extension Clang
+{
+/**
+ * Retrieve all ranges that were skipped by the preprocessor.
+ *
+ * The preprocessor will skip lines when they are surrounded by an
+ * if/ifdef/ifndef directive whose condition does not evaluate to true.
+ */
+[Import(Clang.dll)] [LinkName("clang_getSkippedRanges")] public static extern CXSourceRangeList* GetSkippedRanges(CXTranslationUnit tu, CXFile file);
+
+/**
+ * Retrieve all ranges from all files that were skipped by the
+ * preprocessor.
+ *
+ * The preprocessor will skip lines when they are surrounded by an
+ * if/ifdef/ifndef directive whose condition does not evaluate to true.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_getAllSkippedRanges")] public static extern CXSourceRangeList* GetAllSkippedRanges(CXTranslationUnit tu);
+
+/**
+ * Destroy the given \c CXSourceRangeList.
+ */
+[Import(Clang.dll)] [LinkName("clang_disposeSourceRangeList")] public static extern void DisposeSourceRangeList(CXSourceRangeList* ranges);
+}
+
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_DIAG Diagnostic reporting
+ *
+ * @{
+ */
+
+/**
+ * Describes the severity of a particular diagnostic.
+ */
+[AllowDuplicates] public enum CXDiagnosticSeverity : c_int {
+ /**
+ * A diagnostic that has been suppressed, e.g., by a command-line
+ * option.
+ */
+ Ignored = 0,
+
+ /**
+ * This diagnostic is a note that should be attached to the
+ * previous (non-note) diagnostic.
+ */
+ Note = 1,
+
+ /**
+ * This diagnostic indicates suspicious code that may not be
+ * wrong.
+ */
+ Warning = 2,
+
+ /**
+ * This diagnostic indicates that the code is ill-formed.
+ */
+ Error = 3,
+
+ /**
+ * This diagnostic indicates that the code is ill-formed such
+ * that future parser recovery is unlikely to produce useful
+ * results.
+ */
+ Fatal = 4,
+}
+
+/**
+ * A single diagnostic, containing the diagnostic's severity,
+ * location, text, source ranges, and fix-it hints.
+ */
+public struct CXDiagnostic : this(void* ptr);
+
+/**
+ * A group of CXDiagnostics.
+ */
+public struct CXDiagnosticSet : this(void* ptr);
+
+extension Clang
+{
+/**
+ * Determine the number of diagnostics in a CXDiagnosticSet.
+ */
+[Import(Clang.dll)] [LinkName("clang_getNumDiagnosticsInSet")] public static extern c_uint GetNumDiagnosticsInSet(CXDiagnosticSet Diags);
+
+/**
+ * Retrieve a diagnostic associated with the given CXDiagnosticSet.
+ *
+ * \param Diags the CXDiagnosticSet to query.
+ * \param Index the zero-based diagnostic number to retrieve.
+ *
+ * \returns the requested diagnostic. This diagnostic must be freed
+ * via a call to \c clang_disposeDiagnostic().
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticInSet")] public static extern CXDiagnostic GetDiagnosticInSet(CXDiagnosticSet Diags, c_uint Index);
+}
+
+/**
+ * Describes the kind of error that occurred (if any) in a call to
+ * \c clang_loadDiagnostics.
+ */
+[AllowDuplicates] public enum CXLoadDiag_Error : c_int {
+ /**
+ * Indicates that no error occurred.
+ */
+ None = 0,
+
+ /**
+ * Indicates that an unknown error occurred while attempting to
+ * deserialize diagnostics.
+ */
+ Unknown = 1,
+
+ /**
+ * Indicates that the file containing the serialized diagnostics
+ * could not be opened.
+ */
+ CannotLoad = 2,
+
+ /**
+ * Indicates that the serialized diagnostics file is invalid or
+ * corrupt.
+ */
+ InvalidFile = 3,
+}
+
+extension Clang
+{
+/**
+ * Deserialize a set of diagnostics from a Clang diagnostics bitcode
+ * file.
+ *
+ * \param file The name of the file to deserialize.
+ * \param error A pointer to a enum value recording if there was a problem
+ * deserializing the diagnostics.
+ * \param errorString A pointer to a CXString for recording the error string
+ * if the file was not successfully loaded.
+ *
+ * \returns A loaded CXDiagnosticSet if successful, and NULL otherwise. These
+ * diagnostics should be released using clang_disposeDiagnosticSet().
+ */
+[Import(Clang.dll)] [LinkName("clang_loadDiagnostics")] public static extern CXDiagnosticSet LoadDiagnostics(c_char* file, CXLoadDiag_Error* error, CXString* errorString);
+
+/**
+ * Release a CXDiagnosticSet and all of its contained diagnostics.
+ */
+[Import(Clang.dll)] [LinkName("clang_disposeDiagnosticSet")] public static extern void DisposeDiagnosticSet(CXDiagnosticSet Diags);
+
+/**
+ * Retrieve the child diagnostics of a CXDiagnostic.
+ *
+ * This CXDiagnosticSet does not need to be released by
+ * clang_disposeDiagnosticSet.
+ */
+[Import(Clang.dll)] [LinkName("clang_getChildDiagnostics")] public static extern CXDiagnosticSet GetChildDiagnostics(CXDiagnostic D);
+
+/**
+ * Determine the number of diagnostics produced for the given
+ * translation unit.
+ */
+[Import(Clang.dll)] [LinkName("clang_getNumDiagnostics")] public static extern c_uint GetNumDiagnostics(CXTranslationUnit Unit);
+
+/**
+ * Retrieve a diagnostic associated with the given translation unit.
+ *
+ * \param Unit the translation unit to query.
+ * \param Index the zero-based diagnostic number to retrieve.
+ *
+ * \returns the requested diagnostic. This diagnostic must be freed
+ * via a call to \c clang_disposeDiagnostic().
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnostic")] public static extern CXDiagnostic GetDiagnostic(CXTranslationUnit Unit, c_uint Index);
+
+/**
+ * Retrieve the complete set of diagnostics associated with a
+ * translation unit.
+ *
+ * \param Unit the translation unit to query.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticSetFromTU")] public static extern CXDiagnosticSet GetDiagnosticSetFromTU(CXTranslationUnit Unit);
+
+/**
+ * Destroy a diagnostic.
+ */
+[Import(Clang.dll)] [LinkName("clang_disposeDiagnostic")] public static extern void DisposeDiagnostic(CXDiagnostic Diagnostic);
+}
+
+/**
+ * Options to control the display of diagnostics.
+ *
+ * The values in this enum are meant to be combined to customize the
+ * behavior of \c clang_formatDiagnostic().
+ */
+[AllowDuplicates] public enum CXDiagnosticDisplayOptions : c_int {
+ /**
+ * Display the source-location information where the
+ * diagnostic was located.
+ *
+ * When set, diagnostics will be prefixed by the file, line, and
+ * (optionally) column to which the diagnostic refers. For example,
+ *
+ * \code
+ * test.c:28: warning: extra tokens at end of #endif directive
+ * \endcode
+ *
+ * This option corresponds to the clang flag \c -fshow-source-location.
+ */
+ DisplaySourceLocation = 0x01,
+
+ /**
+ * If displaying the source-location information of the
+ * diagnostic, also include the column number.
+ *
+ * This option corresponds to the clang flag \c -fshow-column.
+ */
+ DisplayColumn = 0x02,
+
+ /**
+ * If displaying the source-location information of the
+ * diagnostic, also include information about source ranges in a
+ * machine-parsable format.
+ *
+ * This option corresponds to the clang flag
+ * \c -fdiagnostics-print-source-range-info.
+ */
+ DisplaySourceRanges = 0x04,
+
+ /**
+ * Display the option name associated with this diagnostic, if any.
+ *
+ * The option name displayed (e.g., -Wconversion) will be placed in brackets
+ * after the diagnostic text. This option corresponds to the clang flag
+ * \c -fdiagnostics-show-option.
+ */
+ DisplayOption = 0x08,
+
+ /**
+ * Display the category number associated with this diagnostic, if any.
+ *
+ * The category number is displayed within brackets after the diagnostic text.
+ * This option corresponds to the clang flag
+ * \c -fdiagnostics-show-category=id.
+ */
+ DisplayCategoryId = 0x10,
+
+ /**
+ * Display the category name associated with this diagnostic, if any.
+ *
+ * The category name is displayed within brackets after the diagnostic text.
+ * This option corresponds to the clang flag
+ * \c -fdiagnostics-show-category=name.
+ */
+ DisplayCategoryName = 0x20,
+}
+
+extension Clang
+{
+/**
+ * Format the given diagnostic in a manner that is suitable for display.
+ *
+ * This routine will format the given diagnostic to a string, rendering
+ * the diagnostic according to the various options given. The
+ * \c clang_defaultDiagnosticDisplayOptions() function returns the set of
+ * options that most closely mimics the behavior of the clang compiler.
+ *
+ * \param Diagnostic The diagnostic to print.
+ *
+ * \param Options A set of options that control the diagnostic display,
+ * created by combining \c CXDiagnosticDisplayOptions values.
+ *
+ * \returns A new string containing for formatted diagnostic.
+ */
+[Import(Clang.dll)] [LinkName("clang_formatDiagnostic")] public static extern CXString FormatDiagnostic(CXDiagnostic Diagnostic, c_uint Options);
+
+/**
+ * Retrieve the set of display options most similar to the
+ * default behavior of the clang compiler.
+ *
+ * \returns A set of display options suitable for use with \c
+ * clang_formatDiagnostic().
+ */
+[Import(Clang.dll)] [LinkName("clang_defaultDiagnosticDisplayOptions")] public static extern c_uint DefaultDiagnosticDisplayOptions();
+
+/**
+ * Determine the severity of the given diagnostic.
+ */
+
+ [Import(Clang.dll)] [LinkName("clang_getDiagnosticSeverity")] public static extern CXDiagnosticSeverity GetDiagnosticSeverity(CXDiagnostic);
+
+/**
+ * Retrieve the source location of the given diagnostic.
+ *
+ * This location is where Clang would print the caret ('^') when
+ * displaying the diagnostic on the command line.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticLocation")] public static extern CXSourceLocation GetDiagnosticLocation(CXDiagnostic);
+
+/**
+ * Retrieve the text of the given diagnostic.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticSpelling")] public static extern CXString GetDiagnosticSpelling(CXDiagnostic);
+
+/**
+ * Retrieve the name of the command-line option that enabled this
+ * diagnostic.
+ *
+ * \param Diag The diagnostic to be queried.
+ *
+ * \param Disable If non-NULL, will be set to the option that disables this
+ * diagnostic (if any).
+ *
+ * \returns A string that contains the command-line option used to enable this
+ * warning, such as "-Wconversion" or "-pedantic".
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticOption")] public static extern CXString GetDiagnosticOption(CXDiagnostic Diag, CXString* Disable);
+
+/**
+ * Retrieve the category number for this diagnostic.
+ *
+ * Diagnostics can be categorized into groups along with other, related
+ * diagnostics (e.g., diagnostics under the same warning flag). This routine
+ * retrieves the category number for the given diagnostic.
+ *
+ * \returns The number of the category that contains this diagnostic, or zero
+ * if this diagnostic is uncategorized.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticCategory")] public static extern c_uint GetDiagnosticCategory(CXDiagnostic);
+
+/**
+ * Retrieve the name of a particular diagnostic category. This
+ * is now deprecated. Use clang_getDiagnosticCategoryText()
+ * instead.
+ *
+ * \param Category A diagnostic category number, as returned by
+ * \c clang_getDiagnosticCategory().
+ *
+ * \returns The name of the given diagnostic category.
+ */
+
+[Import(Clang.dll)] [Obsolete] [LinkName("clang_getDiagnosticCategoryName")] public static extern CXString GetDiagnosticCategoryName(c_uint Category);
+
+/**
+ * Retrieve the diagnostic category text for a given diagnostic.
+ *
+ * \returns The text of the given diagnostic category.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticCategoryText")] public static extern CXString GetDiagnosticCategoryText(CXDiagnostic);
+
+/**
+ * Determine the number of source ranges associated with the given
+ * diagnostic.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticNumRanges")] public static extern c_uint GetDiagnosticNumRanges(CXDiagnostic);
+
+/**
+ * Retrieve a source range associated with the diagnostic.
+ *
+ * A diagnostic's source ranges highlight important elements in the source
+ * code. On the command line, Clang displays source ranges by
+ * underlining them with '~' characters.
+ *
+ * \param Diagnostic the diagnostic whose range is being extracted.
+ *
+ * \param Range the zero-based index specifying which range to
+ *
+ * \returns the requested source range.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticRange")] public static extern CXSourceRange GetDiagnosticRange(CXDiagnostic Diagnostic, c_uint Range);
+
+/**
+ * Determine the number of fix-it hints associated with the
+ * given diagnostic.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticNumFixIts")] public static extern c_uint GetDiagnosticNumFixIts(CXDiagnostic Diagnostic);
+
+/**
+ * Retrieve the replacement information for a given fix-it.
+ *
+ * Fix-its are described in terms of a source range whose contents
+ * should be replaced by a string. This approach generalizes over
+ * three kinds of operations: removal of source code (the range covers
+ * the code to be removed and the replacement string is empty),
+ * replacement of source code (the range covers the code to be
+ * replaced and the replacement string provides the new code), and
+ * insertion (both the start and end of the range point at the
+ * insertion location, and the replacement string provides the text to
+ * insert).
+ *
+ * \param Diagnostic The diagnostic whose fix-its are being queried.
+ *
+ * \param FixIt The zero-based index of the fix-it.
+ *
+ * \param ReplacementRange The source range whose contents will be
+ * replaced with the returned replacement string. Note that source
+ * ranges are half-open ranges [a, b), so the source code should be
+ * replaced from a and up to (but not including) b.
+ *
+ * \returns A string containing text that should be replace the source
+ * code indicated by the \c ReplacementRange.
+ */
+[Import(Clang.dll)] [LinkName("clang_getDiagnosticFixIt")] public static extern CXString GetDiagnosticFixIt(CXDiagnostic Diagnostic, c_uint FixIt, CXSourceRange* ReplacementRange);
+
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_TRANSLATION_UNIT Translation unit manipulation
+ *
+ * The routines in this group provide the ability to create and destroy
+ * translation units from files, either by parsing the contents of the files or
+ * by reading in a serialized representation of a translation unit.
+ *
+ * @{
+ */
+
+/**
+ * Get the original translation unit source file name.
+ */
+
+[Import(Clang.dll)] [LinkName("clang_getTranslationUnitSpelling")] public static extern CXString GetTranslationUnitSpelling(CXTranslationUnit CTUnit);
+
+/**
+ * Return the CXTranslationUnit for a given source file and the provided
+ * command line arguments one would pass to the compiler.
+ *
+ * Note: The 'source_filename' argument is optional. If the caller provides a
+ * NULL pointer, the name of the source file is expected to reside in the
+ * specified command line arguments.
+ *
+ * Note: When encountered in 'clang_command_line_args', the following options
+ * are ignored:
+ *
+ * '-c'
+ * '-emit-ast'
+ * '-fsyntax-only'
+ * '-o \