diff options
Diffstat (limited to 'contrib/llvm/tools/clang/include/clang-c/Index.h')
-rw-r--r-- | contrib/llvm/tools/clang/include/clang-c/Index.h | 70 |
1 files changed, 60 insertions, 10 deletions
diff --git a/contrib/llvm/tools/clang/include/clang-c/Index.h b/contrib/llvm/tools/clang/include/clang-c/Index.h index 4d08e3b..95d54c2 100644 --- a/contrib/llvm/tools/clang/include/clang-c/Index.h +++ b/contrib/llvm/tools/clang/include/clang-c/Index.h @@ -16,9 +16,7 @@ #ifndef CLANG_C_INDEX_H #define CLANG_C_INDEX_H -#include <sys/stat.h> #include <time.h> -#include <stdio.h> #include "clang-c/Platform.h" #include "clang-c/CXString.h" @@ -32,7 +30,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 19 +#define CINDEX_VERSION_MINOR 20 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -414,6 +412,12 @@ CINDEX_LINKAGE CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu, CINDEX_LINKAGE int clang_Location_isInSystemHeader(CXSourceLocation location); /** + * \brief Returns non-zero if the given source location is in the main file of + * the corresponding translation unit. + */ +CINDEX_LINKAGE int clang_Location_isFromMainFile(CXSourceLocation location); + +/** * \brief Retrieve a NULL (invalid) source range. */ CINDEX_LINKAGE CXSourceRange clang_getNullRange(void); @@ -723,7 +727,7 @@ CINDEX_LINKAGE void clang_disposeDiagnosticSet(CXDiagnosticSet Diags); * \brief Retrieve the child diagnostics of a CXDiagnostic. * * This CXDiagnosticSet does not need to be released by - * clang_diposeDiagnosticSet. + * clang_disposeDiagnosticSet. */ CINDEX_LINKAGE CXDiagnosticSet clang_getChildDiagnostics(CXDiagnostic D); @@ -763,7 +767,7 @@ CINDEX_LINKAGE void clang_disposeDiagnostic(CXDiagnostic Diagnostic); * \brief Options to control the display of diagnostics. * * The values in this enum are meant to be combined to customize the - * behavior of \c clang_displayDiagnostic(). + * behavior of \c clang_formatDiagnostic(). */ enum CXDiagnosticDisplayOptions { /** @@ -850,7 +854,7 @@ CINDEX_LINKAGE CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, * default behavior of the clang compiler. * * \returns A set of display options suitable for use with \c - * clang_displayDiagnostic(). + * clang_formatDiagnostic(). */ CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions(void); @@ -1942,7 +1946,7 @@ enum CXCursorKind { */ CXCursor_CompoundStmt = 202, - /** \brief A case statment. + /** \brief A case statement. */ CXCursor_CaseStmt = 203, @@ -2062,7 +2066,11 @@ enum CXCursorKind { */ CXCursor_DeclStmt = 231, - CXCursor_LastStmt = CXCursor_DeclStmt, + /** \brief OpenMP parallel directive. + */ + CXCursor_OMPParallelDirective = 232, + + CXCursor_LastStmt = CXCursor_OMPParallelDirective, /** * \brief Cursor that represents the translation unit itself. @@ -2087,7 +2095,8 @@ enum CXCursorKind { CXCursor_CXXOverrideAttr = 405, CXCursor_AnnotateAttr = 406, CXCursor_AsmLabelAttr = 407, - CXCursor_LastAttr = CXCursor_AsmLabelAttr, + CXCursor_PackedAttr = 408, + CXCursor_LastAttr = CXCursor_PackedAttr, /* Preprocessing */ CXCursor_PreprocessingDirective = 500, @@ -2666,7 +2675,11 @@ enum CXTypeKind { CXType_FunctionNoProto = 110, CXType_FunctionProto = 111, CXType_ConstantArray = 112, - CXType_Vector = 113 + CXType_Vector = 113, + CXType_IncompleteArray = 114, + CXType_VariableArray = 115, + CXType_DependentSizedArray = 116, + CXType_MemberPointer = 117 }; /** @@ -2957,6 +2970,13 @@ enum CXTypeLayoutError { CINDEX_LINKAGE long long clang_Type_getAlignOf(CXType T); /** + * \brief Return the class type of an member pointer type. + * + * If a non-member-pointer type is passed in, an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_Type_getClassType(CXType T); + +/** * \brief Return the size of a type in bytes as per C++[expr.sizeof] standard. * * If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. @@ -2982,6 +3002,23 @@ CINDEX_LINKAGE long long clang_Type_getSizeOf(CXType T); */ CINDEX_LINKAGE long long clang_Type_getOffsetOf(CXType T, const char *S); +enum CXRefQualifierKind { + /** \brief No ref-qualifier was provided. */ + CXRefQualifier_None = 0, + /** \brief An lvalue ref-qualifier was provided (\c &). */ + CXRefQualifier_LValue, + /** \brief An rvalue ref-qualifier was provided (\c &&). */ + CXRefQualifier_RValue +}; + +/** + * \brief Retrieve the ref-qualifier kind of a function or method. + * + * The ref-qualifier is returned for C++ functions or methods. For other types + * or non-C++ declarations, CXRefQualifier_None is returned. + */ +CINDEX_LINKAGE enum CXRefQualifierKind clang_Type_getCXXRefQualifier(CXType T); + /** * \brief Returns non-zero if the cursor specifies a Record member that is a * bitfield. @@ -3416,6 +3453,13 @@ typedef enum { CINDEX_LINKAGE unsigned clang_Cursor_getObjCDeclQualifiers(CXCursor C); /** + * \brief Given a cursor that represents an ObjC method or property declaration, + * return non-zero if the declaration was affected by "@optional". + * Returns zero if the cursor is not such a declaration or it is "@required". + */ +CINDEX_LINKAGE unsigned clang_Cursor_isObjCOptional(CXCursor C); + +/** * \brief Returns non-zero if the given cursor is a variadic function or method. */ CINDEX_LINKAGE unsigned clang_Cursor_isVariadic(CXCursor C); @@ -4037,6 +4081,12 @@ CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment); */ /** + * \brief Determine if a C++ member function or member function template is + * pure virtual. + */ +CINDEX_LINKAGE unsigned clang_CXXMethod_isPureVirtual(CXCursor C); + +/** * \brief Determine if a C++ member function or member function template is * declared 'static'. */ |