diff options
Diffstat (limited to 'include/clang-c/Index.h')
-rw-r--r-- | include/clang-c/Index.h | 81 |
1 files changed, 71 insertions, 10 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 13db2085ba69..47998859f674 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 35 +#define CINDEX_VERSION_MINOR 37 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -326,7 +326,7 @@ clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file); * * \param tu the translation unit * -* \param file_name the name of the file. + * \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. @@ -627,6 +627,15 @@ CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu, CXFile file); /** + * \brief 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. + */ +CINDEX_LINKAGE CXSourceRangeList *clang_getAllSkippedRanges(CXTranslationUnit tu); + +/** * \brief Destroy the given \c CXSourceRangeList. */ CINDEX_LINKAGE void clang_disposeSourceRangeList(CXSourceRangeList *ranges); @@ -2325,7 +2334,39 @@ enum CXCursorKind { */ CXCursor_OMPTargetParallelForSimdDirective = 269, - CXCursor_LastStmt = CXCursor_OMPTargetParallelForSimdDirective, + /** \brief OpenMP target simd directive. + */ + CXCursor_OMPTargetSimdDirective = 270, + + /** \brief OpenMP teams distribute directive. + */ + CXCursor_OMPTeamsDistributeDirective = 271, + + /** \brief OpenMP teams distribute simd directive. + */ + CXCursor_OMPTeamsDistributeSimdDirective = 272, + + /** \brief OpenMP teams distribute parallel for simd directive. + */ + CXCursor_OMPTeamsDistributeParallelForSimdDirective = 273, + + /** \brief OpenMP teams distribute parallel for directive. + */ + CXCursor_OMPTeamsDistributeParallelForDirective = 274, + + /** \brief OpenMP target teams directive. + */ + CXCursor_OMPTargetTeamsDirective = 275, + + /** \brief OpenMP target teams distribute directive. + */ + CXCursor_OMPTargetTeamsDistributeDirective = 276, + + /** \brief OpenMP target teams distribute parallel for directive. + */ + CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277, + + CXCursor_LastStmt = CXCursor_OMPTargetTeamsDistributeParallelForDirective, /** * \brief Cursor that represents the translation unit itself. @@ -2383,8 +2424,12 @@ enum CXCursorKind { * \brief A static_assert or _Static_assert node */ CXCursor_StaticAssert = 602, + /** + * \brief a friend declaration. + */ + CXCursor_FriendDecl = 603, CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl, - CXCursor_LastExtraDecl = CXCursor_StaticAssert, + CXCursor_LastExtraDecl = CXCursor_FriendDecl, /** * \brief A code completion overload candidate. @@ -3001,7 +3046,7 @@ enum CXCallingConv { CXCallingConv_X86Pascal = 5, CXCallingConv_AAPCS = 6, CXCallingConv_AAPCS_VFP = 7, - /* Value 8 was PnaclCall, but it was never used, so it could safely be re-used. */ + CXCallingConv_X86RegCall = 8, CXCallingConv_IntelOclBicc = 9, CXCallingConv_X86_64Win64 = 10, CXCallingConv_X86_64SysV = 11, @@ -3491,11 +3536,8 @@ enum CXRefQualifierKind { }; /** - * \brief Returns the number of template arguments for given class template - * specialization, or -1 if type \c T is not a class template specialization. - * - * Variadic argument packs count as only one argument, and can not be inspected - * further. + * \brief Returns the number of template arguments for given template + * specialization, or -1 if type \c T is not a template specialization. */ CINDEX_LINKAGE int clang_Type_getNumTemplateArguments(CXType T); @@ -5240,6 +5282,25 @@ CINDEX_LINKAGE CXEvalResultKind clang_EvalResult_getKind(CXEvalResult E); CINDEX_LINKAGE int clang_EvalResult_getAsInt(CXEvalResult E); /** + * \brief Returns the evaluation result as a long long integer if the + * kind is Int. This prevents overflows that may happen if the result is + * returned with clang_EvalResult_getAsInt. + */ +CINDEX_LINKAGE long long clang_EvalResult_getAsLongLong(CXEvalResult E); + +/** + * \brief Returns a non-zero value if the kind is Int and the evaluation + * result resulted in an unsigned integer. + */ +CINDEX_LINKAGE unsigned clang_EvalResult_isUnsignedInt(CXEvalResult E); + +/** + * \brief Returns the evaluation result as an unsigned integer if + * the kind is Int and clang_EvalResult_isUnsignedInt is non-zero. + */ +CINDEX_LINKAGE unsigned long long clang_EvalResult_getAsUnsigned(CXEvalResult E); + +/** * \brief Returns the evaluation result as double if the * kind is double. */ |