Initial commit.
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
/*==-- clang-c/BuildSystem.h - Utilities for use by build systems -*- C -*-===*\
|
||||
|* *|
|
||||
|* The LLVM Compiler Infrastructure *|
|
||||
|* *|
|
||||
|* This file is distributed under the University of Illinois Open Source *|
|
||||
|* License. See LICENSE.TXT for details. *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides various utilities for use by build systems. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLVM_CLANG_C_BUILDSYSTEM_H
|
||||
#define LLVM_CLANG_C_BUILDSYSTEM_H
|
||||
|
||||
#include "clang-c/Platform.h"
|
||||
#include "clang-c/CXErrorCode.h"
|
||||
#include "clang-c/CXString.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup BUILD_SYSTEM Build system utilities
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Return the timestamp for use with Clang's
|
||||
* \c -fbuild-session-timestamp= option.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void);
|
||||
|
||||
/**
|
||||
* \brief Object encapsulating information about overlaying virtual
|
||||
* file/directories over the real file system.
|
||||
*/
|
||||
typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay;
|
||||
|
||||
/**
|
||||
* \brief Create a \c CXVirtualFileOverlay object.
|
||||
* Must be disposed with \c clang_VirtualFileOverlay_dispose().
|
||||
*
|
||||
* \param options is reserved, always pass 0.
|
||||
*/
|
||||
CINDEX_LINKAGE CXVirtualFileOverlay
|
||||
clang_VirtualFileOverlay_create(unsigned options);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXErrorCode
|
||||
clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay,
|
||||
const char *virtualPath,
|
||||
const char *realPath);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXErrorCode
|
||||
clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay,
|
||||
int caseSensitive);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXErrorCode
|
||||
clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options,
|
||||
char **out_buffer_ptr,
|
||||
unsigned *out_buffer_size);
|
||||
|
||||
/**
|
||||
* \brief free memory allocated by libclang, such as the buffer returned by
|
||||
* \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer().
|
||||
*
|
||||
* \param buffer memory pointer to free.
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_free(void *buffer);
|
||||
|
||||
/**
|
||||
* \brief Dispose a \c CXVirtualFileOverlay object.
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay);
|
||||
|
||||
/**
|
||||
* \brief Object encapsulating information about a module.map file.
|
||||
*/
|
||||
typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor;
|
||||
|
||||
/**
|
||||
* \brief Create a \c CXModuleMapDescriptor object.
|
||||
* Must be disposed with \c clang_ModuleMapDescriptor_dispose().
|
||||
*
|
||||
* \param options is reserved, always pass 0.
|
||||
*/
|
||||
CINDEX_LINKAGE CXModuleMapDescriptor
|
||||
clang_ModuleMapDescriptor_create(unsigned options);
|
||||
|
||||
/**
|
||||
* \brief Sets the framework module name that the module.map describes.
|
||||
* \returns 0 for success, non-zero to indicate an error.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXErrorCode
|
||||
clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* \brief Sets the umbrealla header name that the module.map describes.
|
||||
* \returns 0 for success, non-zero to indicate an error.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXErrorCode
|
||||
clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXErrorCode
|
||||
clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor, unsigned options,
|
||||
char **out_buffer_ptr,
|
||||
unsigned *out_buffer_size);
|
||||
|
||||
/**
|
||||
* \brief Dispose a \c CXModuleMapDescriptor object.
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CLANG_C_BUILD_SYSTEM_H */
|
||||
|
@@ -0,0 +1,170 @@
|
||||
/*===-- clang-c/CXCompilationDatabase.h - Compilation database ---*- C -*-===*\
|
||||
|* *|
|
||||
|* The LLVM Compiler Infrastructure *|
|
||||
|* *|
|
||||
|* This file is distributed under the University of Illinois Open Source *|
|
||||
|* License. See LICENSE.TXT for details. *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides a public inferface to use CompilationDatabase without *|
|
||||
|* the full Clang C++ API. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLVM_CLANG_C_CXCOMPILATIONDATABASE_H
|
||||
#define LLVM_CLANG_C_CXCOMPILATIONDATABASE_H
|
||||
|
||||
#include "clang-c/Platform.h"
|
||||
#include "clang-c/CXString.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \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
|
||||
*/
|
||||
typedef void * CXCompilationDatabase;
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
typedef void * CXCompileCommands;
|
||||
|
||||
/**
|
||||
* \brief Represents the command line invocation to compile a specific file.
|
||||
*/
|
||||
typedef void * CXCompileCommand;
|
||||
|
||||
/**
|
||||
* \brief Error codes for Compilation Database
|
||||
*/
|
||||
typedef enum {
|
||||
/*
|
||||
* \brief No error occurred
|
||||
*/
|
||||
CXCompilationDatabase_NoError = 0,
|
||||
|
||||
/*
|
||||
* \brief Database can not be loaded
|
||||
*/
|
||||
CXCompilationDatabase_CanNotLoadDatabase = 1
|
||||
|
||||
} CXCompilationDatabase_Error;
|
||||
|
||||
/**
|
||||
* \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.
|
||||
*
|
||||
* It must be freed by \c clang_CompilationDatabase_dispose.
|
||||
*/
|
||||
CINDEX_LINKAGE CXCompilationDatabase
|
||||
clang_CompilationDatabase_fromDirectory(const char *BuildDir,
|
||||
CXCompilationDatabase_Error *ErrorCode);
|
||||
|
||||
/**
|
||||
* \brief Free the given compilation database
|
||||
*/
|
||||
CINDEX_LINKAGE void
|
||||
clang_CompilationDatabase_dispose(CXCompilationDatabase);
|
||||
|
||||
/**
|
||||
* \brief Find the compile commands used for a file. The compile commands
|
||||
* must be freed by \c clang_CompileCommands_dispose.
|
||||
*/
|
||||
CINDEX_LINKAGE CXCompileCommands
|
||||
clang_CompilationDatabase_getCompileCommands(CXCompilationDatabase,
|
||||
const char *CompleteFileName);
|
||||
|
||||
/**
|
||||
* \brief Get all the compile commands in the given compilation database.
|
||||
*/
|
||||
CINDEX_LINKAGE CXCompileCommands
|
||||
clang_CompilationDatabase_getAllCompileCommands(CXCompilationDatabase);
|
||||
|
||||
/**
|
||||
* \brief Free the given CompileCommands
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_CompileCommands_dispose(CXCompileCommands);
|
||||
|
||||
/**
|
||||
* \brief Get the number of CompileCommand we have for a file
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned
|
||||
clang_CompileCommands_getSize(CXCompileCommands);
|
||||
|
||||
/**
|
||||
* \brief Get the I'th CompileCommand for a file
|
||||
*
|
||||
* Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)
|
||||
*/
|
||||
CINDEX_LINKAGE CXCompileCommand
|
||||
clang_CompileCommands_getCommand(CXCompileCommands, unsigned I);
|
||||
|
||||
/**
|
||||
* \brief Get the working directory where the CompileCommand was executed from
|
||||
*/
|
||||
CINDEX_LINKAGE CXString
|
||||
clang_CompileCommand_getDirectory(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* \brief Get the number of arguments in the compiler invocation.
|
||||
*
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned
|
||||
clang_CompileCommand_getNumArgs(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* \brief Get the I'th argument value in the compiler invocations
|
||||
*
|
||||
* Invariant :
|
||||
* - argument 0 is the compiler executable
|
||||
*/
|
||||
CINDEX_LINKAGE CXString
|
||||
clang_CompileCommand_getArg(CXCompileCommand, unsigned I);
|
||||
|
||||
/**
|
||||
* \brief Get the number of source mappings for the compiler invocation.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned
|
||||
clang_CompileCommand_getNumMappedSources(CXCompileCommand);
|
||||
|
||||
/**
|
||||
* \brief Get the I'th mapped source path for the compiler invocation.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString
|
||||
clang_CompileCommand_getMappedSourcePath(CXCompileCommand, unsigned I);
|
||||
|
||||
/**
|
||||
* \brief Get the I'th mapped source content for the compiler invocation.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString
|
||||
clang_CompileCommand_getMappedSourceContent(CXCompileCommand, unsigned I);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -0,0 +1,64 @@
|
||||
/*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\
|
||||
|* *|
|
||||
|* The LLVM Compiler Infrastructure *|
|
||||
|* *|
|
||||
|* This file is distributed under the University of Illinois Open Source *|
|
||||
|* License. See LICENSE.TXT for details. *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides the CXErrorCode enumerators. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLVM_CLANG_C_CXERRORCODE_H
|
||||
#define LLVM_CLANG_C_CXERRORCODE_H
|
||||
|
||||
#include "clang-c/Platform.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
enum CXErrorCode {
|
||||
/**
|
||||
* \brief No error.
|
||||
*/
|
||||
CXError_Success = 0,
|
||||
|
||||
/**
|
||||
* \brief A generic error code, no further details are available.
|
||||
*
|
||||
* Errors of this kind can get their own specific error codes in future
|
||||
* libclang versions.
|
||||
*/
|
||||
CXError_Failure = 1,
|
||||
|
||||
/**
|
||||
* \brief libclang crashed while performing the requested operation.
|
||||
*/
|
||||
CXError_Crashed = 2,
|
||||
|
||||
/**
|
||||
* \brief The function detected that the arguments violate the function
|
||||
* contract.
|
||||
*/
|
||||
CXError_InvalidArguments = 3,
|
||||
|
||||
/**
|
||||
* \brief An AST deserialization error has occurred.
|
||||
*/
|
||||
CXError_ASTReadError = 4
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -0,0 +1,61 @@
|
||||
/*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\
|
||||
|* *|
|
||||
|* The LLVM Compiler Infrastructure *|
|
||||
|* *|
|
||||
|* This file is distributed under the University of Illinois Open Source *|
|
||||
|* License. See LICENSE.TXT for details. *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides the interface to C Index strings. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLVM_CLANG_C_CXSTRING_H
|
||||
#define LLVM_CLANG_C_CXSTRING_H
|
||||
|
||||
#include "clang-c/Platform.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup CINDEX_STRING String manipulation routines
|
||||
* \ingroup CINDEX
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
typedef struct {
|
||||
const void *data;
|
||||
unsigned private_flags;
|
||||
} CXString;
|
||||
|
||||
/**
|
||||
* \brief Retrieve the character data associated with the given string.
|
||||
*/
|
||||
CINDEX_LINKAGE const char *clang_getCString(CXString string);
|
||||
|
||||
/**
|
||||
* \brief Free the given string.
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_disposeString(CXString string);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -0,0 +1,554 @@
|
||||
/*==-- clang-c/Documentation.h - Utilities for comment processing -*- C -*-===*\
|
||||
|* *|
|
||||
|* The LLVM Compiler Infrastructure *|
|
||||
|* *|
|
||||
|* This file is distributed under the University of Illinois Open Source *|
|
||||
|* License. See LICENSE.TXT for details. *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides a supplementary interface for inspecting *|
|
||||
|* documentation comments. *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLVM_CLANG_C_DOCUMENTATION_H
|
||||
#define LLVM_CLANG_C_DOCUMENTATION_H
|
||||
|
||||
#include "clang-c/Index.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \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.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief A parsed comment.
|
||||
*/
|
||||
typedef struct {
|
||||
const void *ASTNode;
|
||||
CXTranslationUnit TranslationUnit;
|
||||
} CXComment;
|
||||
|
||||
/**
|
||||
* \brief Given a cursor that represents a documentable entity (e.g.,
|
||||
* declaration), return the associated parsed comment as a
|
||||
* \c CXComment_FullComment AST node.
|
||||
*/
|
||||
CINDEX_LINKAGE CXComment clang_Cursor_getParsedComment(CXCursor C);
|
||||
|
||||
/**
|
||||
* \brief 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).
|
||||
*/
|
||||
enum CXCommentKind {
|
||||
/**
|
||||
* \brief Null comment. No AST node is constructed at the requested location
|
||||
* because there is no text or a syntax error.
|
||||
*/
|
||||
CXComment_Null = 0,
|
||||
|
||||
/**
|
||||
* \brief Plain text. Inline content.
|
||||
*/
|
||||
CXComment_Text = 1,
|
||||
|
||||
/**
|
||||
* \brief A command with word-like arguments that is considered inline content.
|
||||
*
|
||||
* For example: \\c command.
|
||||
*/
|
||||
CXComment_InlineCommand = 2,
|
||||
|
||||
/**
|
||||
* \brief HTML start tag with attributes (name-value pairs). Considered
|
||||
* inline content.
|
||||
*
|
||||
* For example:
|
||||
* \verbatim
|
||||
* <br> <br /> <a href="http://example.org/">
|
||||
* \endverbatim
|
||||
*/
|
||||
CXComment_HTMLStartTag = 3,
|
||||
|
||||
/**
|
||||
* \brief HTML end tag. Considered inline content.
|
||||
*
|
||||
* For example:
|
||||
* \verbatim
|
||||
* </a>
|
||||
* \endverbatim
|
||||
*/
|
||||
CXComment_HTMLEndTag = 4,
|
||||
|
||||
/**
|
||||
* \brief A paragraph, contains inline comment. The paragraph itself is
|
||||
* block content.
|
||||
*/
|
||||
CXComment_Paragraph = 5,
|
||||
|
||||
/**
|
||||
* \brief 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: \\brief 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.
|
||||
*/
|
||||
CXComment_BlockCommand = 6,
|
||||
|
||||
/**
|
||||
* \brief A \\param or \\arg command that describes the function parameter
|
||||
* (name, passing direction, description).
|
||||
*
|
||||
* For example: \\param [in] ParamName description.
|
||||
*/
|
||||
CXComment_ParamCommand = 7,
|
||||
|
||||
/**
|
||||
* \brief A \\tparam command that describes a template parameter (name and
|
||||
* description).
|
||||
*
|
||||
* For example: \\tparam T description.
|
||||
*/
|
||||
CXComment_TParamCommand = 8,
|
||||
|
||||
/**
|
||||
* \brief 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
|
||||
*/
|
||||
CXComment_VerbatimBlockCommand = 9,
|
||||
|
||||
/**
|
||||
* \brief A line of text that is contained within a
|
||||
* CXComment_VerbatimBlockCommand node.
|
||||
*/
|
||||
CXComment_VerbatimBlockLine = 10,
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CXComment_VerbatimLine = 11,
|
||||
|
||||
/**
|
||||
* \brief A full comment attached to a declaration, contains block content.
|
||||
*/
|
||||
CXComment_FullComment = 12
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief The most appropriate rendering mode for an inline command, chosen on
|
||||
* command semantics in Doxygen.
|
||||
*/
|
||||
enum CXCommentInlineCommandRenderKind {
|
||||
/**
|
||||
* \brief Command argument should be rendered in a normal font.
|
||||
*/
|
||||
CXCommentInlineCommandRenderKind_Normal,
|
||||
|
||||
/**
|
||||
* \brief Command argument should be rendered in a bold font.
|
||||
*/
|
||||
CXCommentInlineCommandRenderKind_Bold,
|
||||
|
||||
/**
|
||||
* \brief Command argument should be rendered in a monospaced font.
|
||||
*/
|
||||
CXCommentInlineCommandRenderKind_Monospaced,
|
||||
|
||||
/**
|
||||
* \brief Command argument should be rendered emphasized (typically italic
|
||||
* font).
|
||||
*/
|
||||
CXCommentInlineCommandRenderKind_Emphasized
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Describes parameter passing direction for \\param or \\arg command.
|
||||
*/
|
||||
enum CXCommentParamPassDirection {
|
||||
/**
|
||||
* \brief The parameter is an input parameter.
|
||||
*/
|
||||
CXCommentParamPassDirection_In,
|
||||
|
||||
/**
|
||||
* \brief The parameter is an output parameter.
|
||||
*/
|
||||
CXCommentParamPassDirection_Out,
|
||||
|
||||
/**
|
||||
* \brief The parameter is an input and output parameter.
|
||||
*/
|
||||
CXCommentParamPassDirection_InOut
|
||||
};
|
||||
|
||||
/**
|
||||
* \param Comment AST node of any kind.
|
||||
*
|
||||
* \returns the type of the AST node.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment AST node of any kind.
|
||||
*
|
||||
* \returns number of children of the AST node.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXComment clang_Comment_getChild(CXComment Comment, unsigned ChildIdx);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_InlineContentComment_hasTrailingNewline(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_Text AST node.
|
||||
*
|
||||
* \returns text contained in the AST node.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_TextComment_getText(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_InlineCommand AST node.
|
||||
*
|
||||
* \returns name of the inline command.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_InlineCommandComment_getCommandName(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_InlineCommand AST node.
|
||||
*
|
||||
* \returns the most appropriate rendering mode, chosen on command
|
||||
* semantics in Doxygen.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXCommentInlineCommandRenderKind
|
||||
clang_InlineCommandComment_getRenderKind(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_InlineCommand AST node.
|
||||
*
|
||||
* \returns number of command arguments.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_InlineCommandComment_getNumArgs(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_InlineCommand AST node.
|
||||
*
|
||||
* \param ArgIdx argument index (zero-based).
|
||||
*
|
||||
* \returns text of the specified argument.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_InlineCommandComment_getArgText(CXComment Comment,
|
||||
unsigned ArgIdx);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
|
||||
* node.
|
||||
*
|
||||
* \returns HTML tag name.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_HTMLTagComment_getTagName(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
||||
*
|
||||
* \returns non-zero if tag is self-closing (for example, <br />).
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_HTMLStartTagComment_isSelfClosing(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
||||
*
|
||||
* \returns number of attributes (name-value pairs) attached to the start tag.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_HTMLStartTag_getNumAttrs(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
||||
*
|
||||
* \param AttrIdx attribute index (zero-based).
|
||||
*
|
||||
* \returns name of the specified attribute.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_HTMLStartTag_getAttrName(CXComment Comment, unsigned AttrIdx);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
||||
*
|
||||
* \param AttrIdx attribute index (zero-based).
|
||||
*
|
||||
* \returns value of the specified attribute.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, unsigned AttrIdx);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_BlockCommand AST node.
|
||||
*
|
||||
* \returns name of the block command.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_BlockCommandComment_getCommandName(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_BlockCommand AST node.
|
||||
*
|
||||
* \returns number of word-like arguments.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_BlockCommandComment_getArgText(CXComment Comment,
|
||||
unsigned ArgIdx);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_BlockCommand or
|
||||
* \c CXComment_VerbatimBlockCommand AST node.
|
||||
*
|
||||
* \returns paragraph argument of the block command.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXComment clang_BlockCommandComment_getParagraph(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_ParamCommand AST node.
|
||||
*
|
||||
* \returns parameter name.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_ParamCommandComment_isParamIndexValid(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_ParamCommand AST node.
|
||||
*
|
||||
* \returns zero-based parameter index in function prototype.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_ParamCommandComment_isDirectionExplicit(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_ParamCommand AST node.
|
||||
*
|
||||
* \returns parameter passing direction.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
enum CXCommentParamPassDirection clang_ParamCommandComment_getDirection(
|
||||
CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_TParamCommand AST node.
|
||||
*
|
||||
* \returns template parameter name.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_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<typename C, template<typename T> class TT>
|
||||
* void test(TT<int> aaa);
|
||||
* \endverbatim
|
||||
* for C and TT nesting depth is 0,
|
||||
* for T nesting depth is 1.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_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<typename C, template<typename T> class TT>
|
||||
* void test(TT<int> 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.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
unsigned clang_TParamCommandComment_getIndex(CXComment Comment, unsigned Depth);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_VerbatimBlockLine AST node.
|
||||
*
|
||||
* \returns text contained in the AST node.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_VerbatimBlockLineComment_getText(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \param Comment a \c CXComment_VerbatimLine AST node.
|
||||
*
|
||||
* \returns text contained in the AST node.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_VerbatimLineComment_getText(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_HTMLTagComment_getAsString(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \brief 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 \\brief 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 \<dl\> list with arguments
|
||||
* sorted in function prototype order. CSS classes used:
|
||||
* \li "param-name-index-NUMBER" for parameter name (\<dt\>);
|
||||
* \li "param-descr-index-NUMBER" for parameter description (\<dd\>);
|
||||
* \li "param-name-index-invalid" and "param-descr-index-invalid" are used if
|
||||
* parameter index is invalid.
|
||||
*
|
||||
* Template parameter documentation is rendered as a \<dl\> list with
|
||||
* parameters sorted in template parameter list order. CSS classes used:
|
||||
* \li "tparam-name-index-NUMBER" for parameter name (\<dt\>);
|
||||
* \li "tparam-descr-index-NUMBER" for parameter description (\<dd\>);
|
||||
* \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.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_FullComment_getAsHTML(CXComment Comment);
|
||||
|
||||
/**
|
||||
* \brief 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.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CLANG_C_DOCUMENTATION_H */
|
||||
|
5755
.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Index.h
Normal file
5755
.emacs.d/elpa/ac-clang-20150906.1008/clang-server/clang-c/Index.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
CLANG_LEVEL := ../..
|
||||
DIRS :=
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
IntIncludeDir = $(DESTDIR)$(PROJ_internal_prefix)/include
|
||||
|
||||
install-local::
|
||||
$(Echo) Installing Clang C API include files
|
||||
$(Verb) $(MKDIR) $(IntIncludeDir)
|
||||
$(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \
|
||||
cd $(PROJ_SRC_DIR)/.. && \
|
||||
for hdr in `find clang-c -type f '!' '(' -name '*~' \
|
||||
-o -name '.#*' -o -name '*.in' -o -name '*.txt' \
|
||||
-o -name 'Makefile' -o -name '*.td' ')' -print \
|
||||
| grep -v CVS | grep -v .svn | grep -v .dir` ; do \
|
||||
instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
$(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
||||
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang-c" ; then \
|
||||
cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
|
||||
for hdr in `find clang-c -type f '!' '(' -name 'Makefile' ')' -print \
|
||||
| grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
|
||||
instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
$(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
endif
|
@@ -0,0 +1,45 @@
|
||||
/*===-- clang-c/Platform.h - C Index platform decls -------------*- C -*-===*\
|
||||
|* *|
|
||||
|* The LLVM Compiler Infrastructure *|
|
||||
|* *|
|
||||
|* This file is distributed under the University of Illinois Open Source *|
|
||||
|* License. See LICENSE.TXT for details. *|
|
||||
|* *|
|
||||
|*===----------------------------------------------------------------------===*|
|
||||
|* *|
|
||||
|* This header provides platform specific macros (dllimport, deprecated, ...) *|
|
||||
|* *|
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef LLVM_CLANG_C_PLATFORM_H
|
||||
#define LLVM_CLANG_C_PLATFORM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* MSVC DLL import/export. */
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _CINDEX_LIB_
|
||||
#define CINDEX_LINKAGE __declspec(dllexport)
|
||||
#else
|
||||
#define CINDEX_LINKAGE __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define CINDEX_LINKAGE
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define CINDEX_DEPRECATED __attribute__((deprecated))
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#define CINDEX_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define CINDEX_DEPRECATED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
@@ -0,0 +1,4 @@
|
||||
module Clang_C {
|
||||
umbrella "."
|
||||
module * { export * }
|
||||
}
|
Reference in New Issue
Block a user