diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 | 
| commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
| tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /clang/include/clang-c | |
| parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) | |
Notes
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/BuildSystem.h | 2 | ||||
| -rw-r--r-- | clang/include/clang-c/Index.h | 1065 | ||||
| -rw-r--r-- | clang/include/clang-c/Platform.h | 23 | 
3 files changed, 535 insertions, 555 deletions
| diff --git a/clang/include/clang-c/BuildSystem.h b/clang/include/clang-c/BuildSystem.h index 4e9f6dee0279..296e61247cef 100644 --- a/clang/include/clang-c/BuildSystem.h +++ b/clang/include/clang-c/BuildSystem.h @@ -117,7 +117,7 @@ clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,                                                   const char *name);  /** - * Sets the umbrealla header name that the module.map describes. + * Sets the umbrella header name that the module.map describes.   * \returns 0 for success, non-zero to indicate an error.   */  CINDEX_LINKAGE enum CXErrorCode diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index b653995ebbd0..5fa728d6d66c 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -33,24 +33,19 @@   * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.   */  #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 59 +#define CINDEX_VERSION_MINOR 60 -#define CINDEX_VERSION_ENCODE(major, minor) ( \ -      ((major) * 10000)                       \ -    + ((minor) *     1)) +#define CINDEX_VERSION_ENCODE(major, minor) (((major)*10000) + ((minor)*1)) -#define CINDEX_VERSION CINDEX_VERSION_ENCODE( \ -    CINDEX_VERSION_MAJOR,                     \ -    CINDEX_VERSION_MINOR ) +#define CINDEX_VERSION                                                         \ +  CINDEX_VERSION_ENCODE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR) -#define CINDEX_VERSION_STRINGIZE_(major, minor)   \ -    #major"."#minor -#define CINDEX_VERSION_STRINGIZE(major, minor)    \ -    CINDEX_VERSION_STRINGIZE_(major, minor) +#define CINDEX_VERSION_STRINGIZE_(major, minor) #major "." #minor +#define CINDEX_VERSION_STRINGIZE(major, minor)                                 \ +  CINDEX_VERSION_STRINGIZE_(major, minor) -#define CINDEX_VERSION_STRING CINDEX_VERSION_STRINGIZE( \ -    CINDEX_VERSION_MAJOR,                               \ -    CINDEX_VERSION_MINOR) +#define CINDEX_VERSION_STRING                                                  \ +  CINDEX_VERSION_STRINGIZE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)  LLVM_CLANG_C_EXTERN_C_BEGIN @@ -382,7 +377,7 @@ typedef struct {   * \param outID stores the returned CXFileUniqueID.   * \returns If there was a failure getting the unique ID, returns non-zero,   * otherwise returns 0. -*/ + */  CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);  /** @@ -390,8 +385,8 @@ CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);   * multiple inclusions, either with the conventional   * \#ifndef/\#define/\#endif macro guards or with \#pragma once.   */ -CINDEX_LINKAGE unsigned -clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file); +CINDEX_LINKAGE unsigned clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, +                                                           CXFile file);  /**   * Retrieve a file handle within the given translation unit. @@ -496,8 +491,7 @@ CINDEX_LINKAGE unsigned clang_equalLocations(CXSourceLocation loc1,   * in a particular translation unit.   */  CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu, -                                                  CXFile file, -                                                  unsigned line, +                                                  CXFile file, unsigned line,                                                    unsigned column);  /**   * Retrieves the source location associated with a given character offset @@ -566,8 +560,7 @@ CINDEX_LINKAGE int clang_Range_isNull(CXSourceRange range);   * buffer to which the given source location points.   */  CINDEX_LINKAGE void clang_getExpansionLocation(CXSourceLocation location, -                                               CXFile *file, -                                               unsigned *line, +                                               CXFile *file, unsigned *line,                                                 unsigned *column,                                                 unsigned *offset); @@ -613,8 +606,7 @@ CINDEX_LINKAGE void clang_getExpansionLocation(CXSourceLocation location,   */  CINDEX_LINKAGE void clang_getPresumedLocation(CXSourceLocation location,                                                CXString *filename, -                                              unsigned *line, -                                              unsigned *column); +                                              unsigned *line, unsigned *column);  /**   * Legacy API to retrieve the file, line, column, and offset represented @@ -625,8 +617,7 @@ CINDEX_LINKAGE void clang_getPresumedLocation(CXSourceLocation location,   * details.   */  CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location, -                                                   CXFile *file, -                                                   unsigned *line, +                                                   CXFile *file, unsigned *line,                                                     unsigned *column,                                                     unsigned *offset); @@ -653,8 +644,7 @@ CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location,   * buffer to which the given source location points.   */  CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location, -                                              CXFile *file, -                                              unsigned *line, +                                              CXFile *file, unsigned *line,                                                unsigned *column,                                                unsigned *offset); @@ -682,10 +672,8 @@ CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location,   * buffer to which the given source location points.   */  CINDEX_LINKAGE void clang_getFileLocation(CXSourceLocation location, -                                          CXFile *file, -                                          unsigned *line, -                                          unsigned *column, -                                          unsigned *offset); +                                          CXFile *file, unsigned *line, +                                          unsigned *column, unsigned *offset);  /**   * Retrieve a source location representing the first character within a @@ -727,7 +715,8 @@ CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu,   * 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); +CINDEX_LINKAGE CXSourceRangeList * +clang_getAllSkippedRanges(CXTranslationUnit tu);  /**   * Destroy the given \c CXSourceRangeList. @@ -758,7 +747,7 @@ enum CXDiagnosticSeverity {     * This diagnostic is a note that should be attached to the     * previous (non-note) diagnostic.     */ -  CXDiagnostic_Note    = 1, +  CXDiagnostic_Note = 1,    /**     * This diagnostic indicates suspicious code that may not be @@ -769,14 +758,14 @@ enum CXDiagnosticSeverity {    /**     * This diagnostic indicates that the code is ill-formed.     */ -  CXDiagnostic_Error   = 3, +  CXDiagnostic_Error = 3,    /**     * This diagnostic indicates that the code is ill-formed such     * that future parser recovery is unlikely to produce useful     * results.     */ -  CXDiagnostic_Fatal   = 4 +  CXDiagnostic_Fatal = 4  };  /** @@ -849,9 +838,8 @@ enum CXLoadDiag_Error {   * \returns A loaded CXDiagnosticSet if successful, and NULL otherwise.  These   * diagnostics should be released using clang_disposeDiagnosticSet().   */ -CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(const char *file, -                                                  enum CXLoadDiag_Error *error, -                                                  CXString *errorString); +CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics( +    const char *file, enum CXLoadDiag_Error *error, CXString *errorString);  /**   * Release a CXDiagnosticSet and all of its contained diagnostics. @@ -891,7 +879,7 @@ CINDEX_LINKAGE CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit,   * \param Unit the translation unit to query.   */  CINDEX_LINKAGE CXDiagnosticSet -  clang_getDiagnosticSetFromTU(CXTranslationUnit Unit); +clang_getDiagnosticSetFromTU(CXTranslationUnit Unit);  /**   * Destroy a diagnostic. @@ -997,7 +985,7 @@ CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions(void);   * Determine the severity of the given diagnostic.   */  CINDEX_LINKAGE enum CXDiagnosticSeverity -clang_getDiagnosticSeverity(CXDiagnostic); +    clang_getDiagnosticSeverity(CXDiagnostic);  /**   * Retrieve the source location of the given diagnostic. @@ -1049,8 +1037,8 @@ CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic);   *   * \returns The name of the given diagnostic category.   */ -CINDEX_DEPRECATED CINDEX_LINKAGE -CXString clang_getDiagnosticCategoryName(unsigned Category); +CINDEX_DEPRECATED CINDEX_LINKAGE CXString +clang_getDiagnosticCategoryName(unsigned Category);  /**   * Retrieve the diagnostic category text for a given diagnostic. @@ -1112,9 +1100,8 @@ CINDEX_LINKAGE unsigned clang_getDiagnosticNumFixIts(CXDiagnostic Diagnostic);   * \returns A string containing text that should be replace the source   * code indicated by the \c ReplacementRange.   */ -CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, -                                                 unsigned FixIt, -                                               CXSourceRange *ReplacementRange); +CINDEX_LINKAGE CXString clang_getDiagnosticFixIt( +    CXDiagnostic Diagnostic, unsigned FixIt, CXSourceRange *ReplacementRange);  /**   * @} @@ -1177,12 +1164,9 @@ clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit);   * guarantee their validity until the call to this function returns.   */  CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( -                                         CXIndex CIdx, -                                         const char *source_filename, -                                         int num_clang_command_line_args, -                                   const char * const *clang_command_line_args, -                                         unsigned num_unsaved_files, -                                         struct CXUnsavedFile *unsaved_files); +    CXIndex CIdx, const char *source_filename, int num_clang_command_line_args, +    const char *const *clang_command_line_args, unsigned num_unsaved_files, +    struct CXUnsavedFile *unsaved_files);  /**   * Same as \c clang_createTranslationUnit2, but returns @@ -1190,9 +1174,8 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile(   * routine returns a \c NULL \c CXTranslationUnit, without further detailed   * error codes.   */ -CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit( -    CXIndex CIdx, -    const char *ast_filename); +CINDEX_LINKAGE CXTranslationUnit +clang_createTranslationUnit(CXIndex CIdx, const char *ast_filename);  /**   * Create a translation unit from an AST file (\c -emit-ast). @@ -1202,10 +1185,9 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(   *   * \returns Zero on success, otherwise returns an error code.   */ -CINDEX_LINKAGE enum CXErrorCode clang_createTranslationUnit2( -    CXIndex CIdx, -    const char *ast_filename, -    CXTranslationUnit *out_TU); +CINDEX_LINKAGE enum CXErrorCode +clang_createTranslationUnit2(CXIndex CIdx, const char *ast_filename, +                             CXTranslationUnit *out_TU);  /**   * Flags that control the creation of translation units. @@ -1383,14 +1365,11 @@ CINDEX_LINKAGE unsigned clang_defaultEditingTranslationUnitOptions(void);   * routine returns a \c NULL \c CXTranslationUnit, without further detailed   * error codes.   */ -CINDEX_LINKAGE CXTranslationUnit -clang_parseTranslationUnit(CXIndex CIdx, -                           const char *source_filename, -                           const char *const *command_line_args, -                           int num_command_line_args, -                           struct CXUnsavedFile *unsaved_files, -                           unsigned num_unsaved_files, -                           unsigned options); +CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit( +    CXIndex CIdx, const char *source_filename, +    const char *const *command_line_args, int num_command_line_args, +    struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files, +    unsigned options);  /**   * Parse the given source file and the translation unit corresponding @@ -1436,15 +1415,11 @@ clang_parseTranslationUnit(CXIndex CIdx,   *   * \returns Zero on success, otherwise returns an error code.   */ -CINDEX_LINKAGE enum CXErrorCode -clang_parseTranslationUnit2(CXIndex CIdx, -                            const char *source_filename, -                            const char *const *command_line_args, -                            int num_command_line_args, -                            struct CXUnsavedFile *unsaved_files, -                            unsigned num_unsaved_files, -                            unsigned options, -                            CXTranslationUnit *out_TU); +CINDEX_LINKAGE enum CXErrorCode clang_parseTranslationUnit2( +    CXIndex CIdx, const char *source_filename, +    const char *const *command_line_args, int num_command_line_args, +    struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files, +    unsigned options, CXTranslationUnit *out_TU);  /**   * Same as clang_parseTranslationUnit2 but requires a full command line @@ -1623,14 +1598,14 @@ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU);   * \c clang_disposeTranslationUnit(TU).  The error codes returned by this   * routine are described by the \c CXErrorCode enum.   */ -CINDEX_LINKAGE int clang_reparseTranslationUnit(CXTranslationUnit TU, -                                                unsigned num_unsaved_files, -                                          struct CXUnsavedFile *unsaved_files, -                                                unsigned options); +CINDEX_LINKAGE int +clang_reparseTranslationUnit(CXTranslationUnit TU, unsigned num_unsaved_files, +                             struct CXUnsavedFile *unsaved_files, +                             unsigned options);  /** -  * Categorizes how memory is being used by a translation unit. -  */ + * Categorizes how memory is being used by a translation unit. + */  enum CXTUResourceUsageKind {    CXTUResourceUsage_AST = 1,    CXTUResourceUsage_Identifiers = 2, @@ -1648,16 +1623,16 @@ enum CXTUResourceUsageKind {    CXTUResourceUsage_Preprocessor_HeaderSearch = 14,    CXTUResourceUsage_MEMORY_IN_BYTES_BEGIN = CXTUResourceUsage_AST,    CXTUResourceUsage_MEMORY_IN_BYTES_END = -    CXTUResourceUsage_Preprocessor_HeaderSearch, +      CXTUResourceUsage_Preprocessor_HeaderSearch,    CXTUResourceUsage_First = CXTUResourceUsage_AST,    CXTUResourceUsage_Last = CXTUResourceUsage_Preprocessor_HeaderSearch  };  /** -  * Returns the human-readable null-terminated C string that represents -  *  the name of the memory category.  This string should never be freed. -  */ + * Returns the human-readable null-terminated C string that represents + *  the name of the memory category.  This string should never be freed. + */  CINDEX_LINKAGE  const char *clang_getTUResourceUsageName(enum CXTUResourceUsageKind kind); @@ -1670,8 +1645,8 @@ typedef struct CXTUResourceUsageEntry {  } CXTUResourceUsageEntry;  /** -  * The memory usage of a CXTranslationUnit, broken into categories. -  */ + * The memory usage of a CXTranslationUnit, broken into categories. + */  typedef struct CXTUResourceUsage {    /* Private data member, used for queries. */    void *data; @@ -1686,10 +1661,11 @@ typedef struct CXTUResourceUsage {  } CXTUResourceUsage;  /** -  * Return the memory usage of a translation unit.  This object -  *  should be released with clang_disposeCXTUResourceUsage(). -  */ -CINDEX_LINKAGE CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU); + * Return the memory usage of a translation unit.  This object + *  should be released with clang_disposeCXTUResourceUsage(). + */ +CINDEX_LINKAGE CXTUResourceUsage +clang_getCXTUResourceUsage(CXTranslationUnit TU);  CINDEX_LINKAGE void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage); @@ -1704,24 +1680,21 @@ clang_getTranslationUnitTargetInfo(CXTranslationUnit CTUnit);  /**   * Destroy the CXTargetInfo object.   */ -CINDEX_LINKAGE void -clang_TargetInfo_dispose(CXTargetInfo Info); +CINDEX_LINKAGE void clang_TargetInfo_dispose(CXTargetInfo Info);  /**   * Get the normalized target triple as a string.   *   * Returns the empty string in case of any error.   */ -CINDEX_LINKAGE CXString -clang_TargetInfo_getTriple(CXTargetInfo Info); +CINDEX_LINKAGE CXString clang_TargetInfo_getTriple(CXTargetInfo Info);  /**   * Get the pointer width of the target in bits.   *   * Returns -1 in case of error.   */ -CINDEX_LINKAGE int -clang_TargetInfo_getPointerWidth(CXTargetInfo Info); +CINDEX_LINKAGE int clang_TargetInfo_getPointerWidth(CXTargetInfo Info);  /**   * @} @@ -1741,95 +1714,95 @@ enum CXCursorKind {     * spelling, find their definitions, etc. However, the specific kind     * of the declaration is not reported.     */ -  CXCursor_UnexposedDecl                 = 1, +  CXCursor_UnexposedDecl = 1,    /** A C or C++ struct. */ -  CXCursor_StructDecl                    = 2, +  CXCursor_StructDecl = 2,    /** A C or C++ union. */ -  CXCursor_UnionDecl                     = 3, +  CXCursor_UnionDecl = 3,    /** A C++ class. */ -  CXCursor_ClassDecl                     = 4, +  CXCursor_ClassDecl = 4,    /** An enumeration. */ -  CXCursor_EnumDecl                      = 5, +  CXCursor_EnumDecl = 5,    /**     * A field (in C) or non-static data member (in C++) in a     * struct, union, or C++ class.     */ -  CXCursor_FieldDecl                     = 6, +  CXCursor_FieldDecl = 6,    /** An enumerator constant. */ -  CXCursor_EnumConstantDecl              = 7, +  CXCursor_EnumConstantDecl = 7,    /** A function. */ -  CXCursor_FunctionDecl                  = 8, +  CXCursor_FunctionDecl = 8,    /** A variable. */ -  CXCursor_VarDecl                       = 9, +  CXCursor_VarDecl = 9,    /** A function or method parameter. */ -  CXCursor_ParmDecl                      = 10, +  CXCursor_ParmDecl = 10,    /** An Objective-C \@interface. */ -  CXCursor_ObjCInterfaceDecl             = 11, +  CXCursor_ObjCInterfaceDecl = 11,    /** An Objective-C \@interface for a category. */ -  CXCursor_ObjCCategoryDecl              = 12, +  CXCursor_ObjCCategoryDecl = 12,    /** An Objective-C \@protocol declaration. */ -  CXCursor_ObjCProtocolDecl              = 13, +  CXCursor_ObjCProtocolDecl = 13,    /** An Objective-C \@property declaration. */ -  CXCursor_ObjCPropertyDecl              = 14, +  CXCursor_ObjCPropertyDecl = 14,    /** An Objective-C instance variable. */ -  CXCursor_ObjCIvarDecl                  = 15, +  CXCursor_ObjCIvarDecl = 15,    /** An Objective-C instance method. */ -  CXCursor_ObjCInstanceMethodDecl        = 16, +  CXCursor_ObjCInstanceMethodDecl = 16,    /** An Objective-C class method. */ -  CXCursor_ObjCClassMethodDecl           = 17, +  CXCursor_ObjCClassMethodDecl = 17,    /** An Objective-C \@implementation. */ -  CXCursor_ObjCImplementationDecl        = 18, +  CXCursor_ObjCImplementationDecl = 18,    /** An Objective-C \@implementation for a category. */ -  CXCursor_ObjCCategoryImplDecl          = 19, +  CXCursor_ObjCCategoryImplDecl = 19,    /** A typedef. */ -  CXCursor_TypedefDecl                   = 20, +  CXCursor_TypedefDecl = 20,    /** A C++ class method. */ -  CXCursor_CXXMethod                     = 21, +  CXCursor_CXXMethod = 21,    /** A C++ namespace. */ -  CXCursor_Namespace                     = 22, +  CXCursor_Namespace = 22,    /** A linkage specification, e.g. 'extern "C"'. */ -  CXCursor_LinkageSpec                   = 23, +  CXCursor_LinkageSpec = 23,    /** A C++ constructor. */ -  CXCursor_Constructor                   = 24, +  CXCursor_Constructor = 24,    /** A C++ destructor. */ -  CXCursor_Destructor                    = 25, +  CXCursor_Destructor = 25,    /** A C++ conversion function. */ -  CXCursor_ConversionFunction            = 26, +  CXCursor_ConversionFunction = 26,    /** A C++ template type parameter. */ -  CXCursor_TemplateTypeParameter         = 27, +  CXCursor_TemplateTypeParameter = 27,    /** A C++ non-type template parameter. */ -  CXCursor_NonTypeTemplateParameter      = 28, +  CXCursor_NonTypeTemplateParameter = 28,    /** A C++ template template parameter. */ -  CXCursor_TemplateTemplateParameter     = 29, +  CXCursor_TemplateTemplateParameter = 29,    /** A C++ function template. */ -  CXCursor_FunctionTemplate              = 30, +  CXCursor_FunctionTemplate = 30,    /** A C++ class template. */ -  CXCursor_ClassTemplate                 = 31, +  CXCursor_ClassTemplate = 31,    /** A C++ class template partial specialization. */    CXCursor_ClassTemplatePartialSpecialization = 32,    /** A C++ namespace alias declaration. */ -  CXCursor_NamespaceAlias                = 33, +  CXCursor_NamespaceAlias = 33,    /** A C++ using directive. */ -  CXCursor_UsingDirective                = 34, +  CXCursor_UsingDirective = 34,    /** A C++ using declaration. */ -  CXCursor_UsingDeclaration              = 35, +  CXCursor_UsingDeclaration = 35,    /** A C++ alias declaration */ -  CXCursor_TypeAliasDecl                 = 36, +  CXCursor_TypeAliasDecl = 36,    /** An Objective-C \@synthesize definition. */ -  CXCursor_ObjCSynthesizeDecl            = 37, +  CXCursor_ObjCSynthesizeDecl = 37,    /** An Objective-C \@dynamic definition. */ -  CXCursor_ObjCDynamicDecl               = 38, +  CXCursor_ObjCDynamicDecl = 38,    /** An access specifier. */ -  CXCursor_CXXAccessSpecifier            = 39, +  CXCursor_CXXAccessSpecifier = 39, -  CXCursor_FirstDecl                     = CXCursor_UnexposedDecl, -  CXCursor_LastDecl                      = CXCursor_CXXAccessSpecifier, +  CXCursor_FirstDecl = CXCursor_UnexposedDecl, +  CXCursor_LastDecl = CXCursor_CXXAccessSpecifier,    /* References */ -  CXCursor_FirstRef                      = 40, /* Decl references */ -  CXCursor_ObjCSuperClassRef             = 40, -  CXCursor_ObjCProtocolRef               = 41, -  CXCursor_ObjCClassRef                  = 42, +  CXCursor_FirstRef = 40, /* Decl references */ +  CXCursor_ObjCSuperClassRef = 40, +  CXCursor_ObjCProtocolRef = 41, +  CXCursor_ObjCClassRef = 42,    /**     * A reference to a type declaration.     * @@ -1845,22 +1818,22 @@ enum CXCursorKind {     * while the type of the variable "size" is referenced. The cursor     * referenced by the type of size is the typedef for size_type.     */ -  CXCursor_TypeRef                       = 43, -  CXCursor_CXXBaseSpecifier              = 44, +  CXCursor_TypeRef = 43, +  CXCursor_CXXBaseSpecifier = 44,    /**     * A reference to a class template, function template, template     * template parameter, or class template partial specialization.     */ -  CXCursor_TemplateRef                   = 45, +  CXCursor_TemplateRef = 45,    /**     * A reference to a namespace or namespace alias.     */ -  CXCursor_NamespaceRef                  = 46, +  CXCursor_NamespaceRef = 46,    /**     * A reference to a member of a struct, union, or class that occurs in     * some non-expression context, e.g., a designated initializer.     */ -  CXCursor_MemberRef                     = 47, +  CXCursor_MemberRef = 47,    /**     * A reference to a labeled statement.     * @@ -1876,7 +1849,7 @@ enum CXCursorKind {     *     * A label reference cursor refers to a label statement.     */ -  CXCursor_LabelRef                      = 48, +  CXCursor_LabelRef = 48,    /**     * A reference to a set of overloaded functions or function templates @@ -1914,26 +1887,26 @@ enum CXCursorKind {     * \c clang_getOverloadedDecl() can be used to retrieve the definitions     * referenced by this cursor.     */ -  CXCursor_OverloadedDeclRef             = 49, +  CXCursor_OverloadedDeclRef = 49,    /**     * A reference to a variable that occurs in some non-expression     * context, e.g., a C++ lambda capture list.     */ -  CXCursor_VariableRef                   = 50, +  CXCursor_VariableRef = 50, -  CXCursor_LastRef                       = CXCursor_VariableRef, +  CXCursor_LastRef = CXCursor_VariableRef,    /* Error conditions */ -  CXCursor_FirstInvalid                  = 70, -  CXCursor_InvalidFile                   = 70, -  CXCursor_NoDeclFound                   = 71, -  CXCursor_NotImplemented                = 72, -  CXCursor_InvalidCode                   = 73, -  CXCursor_LastInvalid                   = CXCursor_InvalidCode, +  CXCursor_FirstInvalid = 70, +  CXCursor_InvalidFile = 70, +  CXCursor_NoDeclFound = 71, +  CXCursor_NotImplemented = 72, +  CXCursor_InvalidCode = 73, +  CXCursor_LastInvalid = CXCursor_InvalidCode,    /* Expressions */ -  CXCursor_FirstExpr                     = 100, +  CXCursor_FirstExpr = 100,    /**     * An expression whose specific kind is not exposed via this @@ -1944,104 +1917,104 @@ enum CXCursorKind {     * spelling, children, etc. However, the specific kind of the     * expression is not reported.     */ -  CXCursor_UnexposedExpr                 = 100, +  CXCursor_UnexposedExpr = 100,    /**     * An expression that refers to some value declaration, such     * as a function, variable, or enumerator.     */ -  CXCursor_DeclRefExpr                   = 101, +  CXCursor_DeclRefExpr = 101,    /**     * An expression that refers to a member of a struct, union,     * class, Objective-C class, etc.     */ -  CXCursor_MemberRefExpr                 = 102, +  CXCursor_MemberRefExpr = 102,    /** An expression that calls a function. */ -  CXCursor_CallExpr                      = 103, +  CXCursor_CallExpr = 103,    /** An expression that sends a message to an Objective-C     object or class. */ -  CXCursor_ObjCMessageExpr               = 104, +  CXCursor_ObjCMessageExpr = 104,    /** An expression that represents a block literal. */ -  CXCursor_BlockExpr                     = 105, +  CXCursor_BlockExpr = 105,    /** An integer literal.     */ -  CXCursor_IntegerLiteral                = 106, +  CXCursor_IntegerLiteral = 106,    /** A floating point number literal.     */ -  CXCursor_FloatingLiteral               = 107, +  CXCursor_FloatingLiteral = 107,    /** An imaginary number literal.     */ -  CXCursor_ImaginaryLiteral              = 108, +  CXCursor_ImaginaryLiteral = 108,    /** A string literal.     */ -  CXCursor_StringLiteral                 = 109, +  CXCursor_StringLiteral = 109,    /** A character literal.     */ -  CXCursor_CharacterLiteral              = 110, +  CXCursor_CharacterLiteral = 110,    /** A parenthesized expression, e.g. "(1)".     *     * This AST node is only formed if full location information is requested.     */ -  CXCursor_ParenExpr                     = 111, +  CXCursor_ParenExpr = 111,    /** This represents the unary-expression's (except sizeof and     * alignof).     */ -  CXCursor_UnaryOperator                 = 112, +  CXCursor_UnaryOperator = 112,    /** [C99 6.5.2.1] Array Subscripting.     */ -  CXCursor_ArraySubscriptExpr            = 113, +  CXCursor_ArraySubscriptExpr = 113,    /** A builtin binary operation expression such as "x + y" or     * "x <= y".     */ -  CXCursor_BinaryOperator                = 114, +  CXCursor_BinaryOperator = 114,    /** Compound assignment such as "+=".     */ -  CXCursor_CompoundAssignOperator        = 115, +  CXCursor_CompoundAssignOperator = 115,    /** The ?: ternary operator.     */ -  CXCursor_ConditionalOperator           = 116, +  CXCursor_ConditionalOperator = 116,    /** An explicit cast in C (C99 6.5.4) or a C-style cast in C++     * (C++ [expr.cast]), which uses the syntax (Type)expr.     *     * For example: (int)f.     */ -  CXCursor_CStyleCastExpr                = 117, +  CXCursor_CStyleCastExpr = 117,    /** [C99 6.5.2.5]     */ -  CXCursor_CompoundLiteralExpr           = 118, +  CXCursor_CompoundLiteralExpr = 118,    /** Describes an C or C++ initializer list.     */ -  CXCursor_InitListExpr                  = 119, +  CXCursor_InitListExpr = 119,    /** The GNU address of label extension, representing &&label.     */ -  CXCursor_AddrLabelExpr                 = 120, +  CXCursor_AddrLabelExpr = 120,    /** This is the GNU Statement Expression extension: ({int X=4; X;})     */ -  CXCursor_StmtExpr                      = 121, +  CXCursor_StmtExpr = 121,    /** Represents a C11 generic selection.     */ -  CXCursor_GenericSelectionExpr          = 122, +  CXCursor_GenericSelectionExpr = 122,    /** Implements the GNU __null extension, which is a name for a null     * pointer constant that has integral type (e.g., int or long) and is the same @@ -2051,23 +2024,23 @@ enum CXCursorKind {     * NULL as __null in C++ rather than using 0 (which is an integer that may not     * match the size of a pointer).     */ -  CXCursor_GNUNullExpr                   = 123, +  CXCursor_GNUNullExpr = 123,    /** C++'s static_cast<> expression.     */ -  CXCursor_CXXStaticCastExpr             = 124, +  CXCursor_CXXStaticCastExpr = 124,    /** C++'s dynamic_cast<> expression.     */ -  CXCursor_CXXDynamicCastExpr            = 125, +  CXCursor_CXXDynamicCastExpr = 125,    /** C++'s reinterpret_cast<> expression.     */ -  CXCursor_CXXReinterpretCastExpr        = 126, +  CXCursor_CXXReinterpretCastExpr = 126,    /** C++'s const_cast<> expression.     */ -  CXCursor_CXXConstCastExpr              = 127, +  CXCursor_CXXConstCastExpr = 127,    /** Represents an explicit C++ type conversion that uses "functional"     * notion (C++ [expr.type.conv]). @@ -2077,60 +2050,64 @@ enum CXCursorKind {     *   x = int(0.5);     * \endcode     */ -  CXCursor_CXXFunctionalCastExpr         = 128, +  CXCursor_CXXFunctionalCastExpr = 128, + +  /** OpenCL's addrspace_cast<> expression. +   */ +  CXCursor_CXXAddrspaceCastExpr = 129,    /** A C++ typeid expression (C++ [expr.typeid]).     */ -  CXCursor_CXXTypeidExpr                 = 129, +  CXCursor_CXXTypeidExpr = 130,    /** [C++ 2.13.5] C++ Boolean Literal.     */ -  CXCursor_CXXBoolLiteralExpr            = 130, +  CXCursor_CXXBoolLiteralExpr = 131,    /** [C++0x 2.14.7] C++ Pointer Literal.     */ -  CXCursor_CXXNullPtrLiteralExpr         = 131, +  CXCursor_CXXNullPtrLiteralExpr = 132,    /** Represents the "this" expression in C++     */ -  CXCursor_CXXThisExpr                   = 132, +  CXCursor_CXXThisExpr = 133,    /** [C++ 15] C++ Throw Expression.     *     * This handles 'throw' and 'throw' assignment-expression. When     * assignment-expression isn't present, Op will be null.     */ -  CXCursor_CXXThrowExpr                  = 133, +  CXCursor_CXXThrowExpr = 134,    /** A new expression for memory allocation and constructor calls, e.g:     * "new CXXNewExpr(foo)".     */ -  CXCursor_CXXNewExpr                    = 134, +  CXCursor_CXXNewExpr = 135,    /** A delete expression for memory deallocation and destructor calls,     * e.g. "delete[] pArray".     */ -  CXCursor_CXXDeleteExpr                 = 135, +  CXCursor_CXXDeleteExpr = 136,    /** A unary expression. (noexcept, sizeof, or other traits)     */ -  CXCursor_UnaryExpr                     = 136, +  CXCursor_UnaryExpr = 137,    /** An Objective-C string literal i.e. @"foo".     */ -  CXCursor_ObjCStringLiteral             = 137, +  CXCursor_ObjCStringLiteral = 138,    /** An Objective-C \@encode expression.     */ -  CXCursor_ObjCEncodeExpr                = 138, +  CXCursor_ObjCEncodeExpr = 139,    /** An Objective-C \@selector expression.     */ -  CXCursor_ObjCSelectorExpr              = 139, +  CXCursor_ObjCSelectorExpr = 140,    /** An Objective-C \@protocol expression.     */ -  CXCursor_ObjCProtocolExpr              = 140, +  CXCursor_ObjCProtocolExpr = 141,    /** An Objective-C "bridged" cast expression, which casts between     * Objective-C pointers and C pointers, transferring ownership in the process. @@ -2139,7 +2116,7 @@ enum CXCursorKind {     *   NSString *str = (__bridge_transfer NSString *)CFCreateString();     * \endcode     */ -  CXCursor_ObjCBridgedCastExpr           = 141, +  CXCursor_ObjCBridgedCastExpr = 142,    /** Represents a C++0x pack expansion that produces a sequence of     * expressions. @@ -2154,7 +2131,7 @@ enum CXCursorKind {     * }     * \endcode     */ -  CXCursor_PackExpansionExpr             = 142, +  CXCursor_PackExpansionExpr = 143,    /** Represents an expression that computes the length of a parameter     * pack. @@ -2166,7 +2143,7 @@ enum CXCursorKind {     * };     * \endcode     */ -  CXCursor_SizeOfPackExpr                = 143, +  CXCursor_SizeOfPackExpr = 144,    /* Represents a C++ lambda expression that produces a local function     * object. @@ -2180,33 +2157,42 @@ enum CXCursorKind {     * }     * \endcode     */ -  CXCursor_LambdaExpr                    = 144, +  CXCursor_LambdaExpr = 145,    /** Objective-c Boolean Literal.     */ -  CXCursor_ObjCBoolLiteralExpr           = 145, +  CXCursor_ObjCBoolLiteralExpr = 146,    /** Represents the "self" expression in an Objective-C method.     */ -  CXCursor_ObjCSelfExpr                  = 146, +  CXCursor_ObjCSelfExpr = 147, -  /** OpenMP 4.0 [2.4, Array Section]. +  /** OpenMP 5.0 [2.1.5, Array Section].     */ -  CXCursor_OMPArraySectionExpr           = 147, +  CXCursor_OMPArraySectionExpr = 148,    /** Represents an @available(...) check.     */ -  CXCursor_ObjCAvailabilityCheckExpr     = 148, +  CXCursor_ObjCAvailabilityCheckExpr = 149,    /**     * Fixed point literal     */ -  CXCursor_FixedPointLiteral             = 149, +  CXCursor_FixedPointLiteral = 150, + +  /** OpenMP 5.0 [2.1.4, Array Shaping]. +   */ +  CXCursor_OMPArrayShapingExpr = 151, -  CXCursor_LastExpr                      = CXCursor_FixedPointLiteral, +  /** +   * OpenMP 5.0 [2.1.6 Iterators] +   */ +  CXCursor_OMPIteratorExpr = 152, + +  CXCursor_LastExpr = CXCursor_OMPIteratorExpr,    /* Statements */ -  CXCursor_FirstStmt                     = 200, +  CXCursor_FirstStmt = 200,    /**     * A statement whose specific kind is not exposed via this     * interface. @@ -2216,7 +2202,7 @@ enum CXCursorKind {     * children, etc. However, the specific kind of the statement is not     * reported.     */ -  CXCursor_UnexposedStmt                 = 200, +  CXCursor_UnexposedStmt = 200,    /** A labelled statement in a function.     * @@ -2229,226 +2215,226 @@ enum CXCursorKind {     * \endcode     *     */ -  CXCursor_LabelStmt                     = 201, +  CXCursor_LabelStmt = 201,    /** A group of statements like { stmt stmt }.     *     * This cursor kind is used to describe compound statements, e.g. function     * bodies.     */ -  CXCursor_CompoundStmt                  = 202, +  CXCursor_CompoundStmt = 202,    /** A case statement.     */ -  CXCursor_CaseStmt                      = 203, +  CXCursor_CaseStmt = 203,    /** A default statement.     */ -  CXCursor_DefaultStmt                   = 204, +  CXCursor_DefaultStmt = 204,    /** An if statement     */ -  CXCursor_IfStmt                        = 205, +  CXCursor_IfStmt = 205,    /** A switch statement.     */ -  CXCursor_SwitchStmt                    = 206, +  CXCursor_SwitchStmt = 206,    /** A while statement.     */ -  CXCursor_WhileStmt                     = 207, +  CXCursor_WhileStmt = 207,    /** A do statement.     */ -  CXCursor_DoStmt                        = 208, +  CXCursor_DoStmt = 208,    /** A for statement.     */ -  CXCursor_ForStmt                       = 209, +  CXCursor_ForStmt = 209,    /** A goto statement.     */ -  CXCursor_GotoStmt                      = 210, +  CXCursor_GotoStmt = 210,    /** An indirect goto statement.     */ -  CXCursor_IndirectGotoStmt              = 211, +  CXCursor_IndirectGotoStmt = 211,    /** A continue statement.     */ -  CXCursor_ContinueStmt                  = 212, +  CXCursor_ContinueStmt = 212,    /** A break statement.     */ -  CXCursor_BreakStmt                     = 213, +  CXCursor_BreakStmt = 213,    /** A return statement.     */ -  CXCursor_ReturnStmt                    = 214, +  CXCursor_ReturnStmt = 214,    /** A GCC inline assembly statement extension.     */ -  CXCursor_GCCAsmStmt                    = 215, -  CXCursor_AsmStmt                       = CXCursor_GCCAsmStmt, +  CXCursor_GCCAsmStmt = 215, +  CXCursor_AsmStmt = CXCursor_GCCAsmStmt,    /** Objective-C's overall \@try-\@catch-\@finally statement.     */ -  CXCursor_ObjCAtTryStmt                 = 216, +  CXCursor_ObjCAtTryStmt = 216,    /** Objective-C's \@catch statement.     */ -  CXCursor_ObjCAtCatchStmt               = 217, +  CXCursor_ObjCAtCatchStmt = 217,    /** Objective-C's \@finally statement.     */ -  CXCursor_ObjCAtFinallyStmt             = 218, +  CXCursor_ObjCAtFinallyStmt = 218,    /** Objective-C's \@throw statement.     */ -  CXCursor_ObjCAtThrowStmt               = 219, +  CXCursor_ObjCAtThrowStmt = 219,    /** Objective-C's \@synchronized statement.     */ -  CXCursor_ObjCAtSynchronizedStmt        = 220, +  CXCursor_ObjCAtSynchronizedStmt = 220,    /** Objective-C's autorelease pool statement.     */ -  CXCursor_ObjCAutoreleasePoolStmt       = 221, +  CXCursor_ObjCAutoreleasePoolStmt = 221,    /** Objective-C's collection statement.     */ -  CXCursor_ObjCForCollectionStmt         = 222, +  CXCursor_ObjCForCollectionStmt = 222,    /** C++'s catch statement.     */ -  CXCursor_CXXCatchStmt                  = 223, +  CXCursor_CXXCatchStmt = 223,    /** C++'s try statement.     */ -  CXCursor_CXXTryStmt                    = 224, +  CXCursor_CXXTryStmt = 224,    /** C++'s for (* : *) statement.     */ -  CXCursor_CXXForRangeStmt               = 225, +  CXCursor_CXXForRangeStmt = 225,    /** Windows Structured Exception Handling's try statement.     */ -  CXCursor_SEHTryStmt                    = 226, +  CXCursor_SEHTryStmt = 226,    /** Windows Structured Exception Handling's except statement.     */ -  CXCursor_SEHExceptStmt                 = 227, +  CXCursor_SEHExceptStmt = 227,    /** Windows Structured Exception Handling's finally statement.     */ -  CXCursor_SEHFinallyStmt                = 228, +  CXCursor_SEHFinallyStmt = 228,    /** A MS inline assembly statement extension.     */ -  CXCursor_MSAsmStmt                     = 229, +  CXCursor_MSAsmStmt = 229,    /** The null statement ";": C99 6.8.3p3.     *     * This cursor kind is used to describe the null statement.     */ -  CXCursor_NullStmt                      = 230, +  CXCursor_NullStmt = 230,    /** Adaptor class for mixing declarations with statements and     * expressions.     */ -  CXCursor_DeclStmt                      = 231, +  CXCursor_DeclStmt = 231,    /** OpenMP parallel directive.     */ -  CXCursor_OMPParallelDirective          = 232, +  CXCursor_OMPParallelDirective = 232,    /** OpenMP SIMD directive.     */ -  CXCursor_OMPSimdDirective              = 233, +  CXCursor_OMPSimdDirective = 233,    /** OpenMP for directive.     */ -  CXCursor_OMPForDirective               = 234, +  CXCursor_OMPForDirective = 234,    /** OpenMP sections directive.     */ -  CXCursor_OMPSectionsDirective          = 235, +  CXCursor_OMPSectionsDirective = 235,    /** OpenMP section directive.     */ -  CXCursor_OMPSectionDirective           = 236, +  CXCursor_OMPSectionDirective = 236,    /** OpenMP single directive.     */ -  CXCursor_OMPSingleDirective            = 237, +  CXCursor_OMPSingleDirective = 237,    /** OpenMP parallel for directive.     */ -  CXCursor_OMPParallelForDirective       = 238, +  CXCursor_OMPParallelForDirective = 238,    /** OpenMP parallel sections directive.     */ -  CXCursor_OMPParallelSectionsDirective  = 239, +  CXCursor_OMPParallelSectionsDirective = 239,    /** OpenMP task directive.     */ -  CXCursor_OMPTaskDirective              = 240, +  CXCursor_OMPTaskDirective = 240,    /** OpenMP master directive.     */ -  CXCursor_OMPMasterDirective            = 241, +  CXCursor_OMPMasterDirective = 241,    /** OpenMP critical directive.     */ -  CXCursor_OMPCriticalDirective          = 242, +  CXCursor_OMPCriticalDirective = 242,    /** OpenMP taskyield directive.     */ -  CXCursor_OMPTaskyieldDirective         = 243, +  CXCursor_OMPTaskyieldDirective = 243,    /** OpenMP barrier directive.     */ -  CXCursor_OMPBarrierDirective           = 244, +  CXCursor_OMPBarrierDirective = 244,    /** OpenMP taskwait directive.     */ -  CXCursor_OMPTaskwaitDirective          = 245, +  CXCursor_OMPTaskwaitDirective = 245,    /** OpenMP flush directive.     */ -  CXCursor_OMPFlushDirective             = 246, +  CXCursor_OMPFlushDirective = 246,    /** Windows Structured Exception Handling's leave statement.     */ -  CXCursor_SEHLeaveStmt                  = 247, +  CXCursor_SEHLeaveStmt = 247,    /** OpenMP ordered directive.     */ -  CXCursor_OMPOrderedDirective           = 248, +  CXCursor_OMPOrderedDirective = 248,    /** OpenMP atomic directive.     */ -  CXCursor_OMPAtomicDirective            = 249, +  CXCursor_OMPAtomicDirective = 249,    /** OpenMP for SIMD directive.     */ -  CXCursor_OMPForSimdDirective           = 250, +  CXCursor_OMPForSimdDirective = 250,    /** OpenMP parallel for SIMD directive.     */ -  CXCursor_OMPParallelForSimdDirective   = 251, +  CXCursor_OMPParallelForSimdDirective = 251,    /** OpenMP target directive.     */ -  CXCursor_OMPTargetDirective            = 252, +  CXCursor_OMPTargetDirective = 252,    /** OpenMP teams directive.     */ -  CXCursor_OMPTeamsDirective             = 253, +  CXCursor_OMPTeamsDirective = 253,    /** OpenMP taskgroup directive.     */ -  CXCursor_OMPTaskgroupDirective         = 254, +  CXCursor_OMPTaskgroupDirective = 254,    /** OpenMP cancellation point directive.     */ @@ -2456,35 +2442,35 @@ enum CXCursorKind {    /** OpenMP cancel directive.     */ -  CXCursor_OMPCancelDirective            = 256, +  CXCursor_OMPCancelDirective = 256,    /** OpenMP target data directive.     */ -  CXCursor_OMPTargetDataDirective        = 257, +  CXCursor_OMPTargetDataDirective = 257,    /** OpenMP taskloop directive.     */ -  CXCursor_OMPTaskLoopDirective          = 258, +  CXCursor_OMPTaskLoopDirective = 258,    /** OpenMP taskloop simd directive.     */ -  CXCursor_OMPTaskLoopSimdDirective      = 259, +  CXCursor_OMPTaskLoopSimdDirective = 259,    /** OpenMP distribute directive.     */ -  CXCursor_OMPDistributeDirective        = 260, +  CXCursor_OMPDistributeDirective = 260,    /** OpenMP target enter data directive.     */ -  CXCursor_OMPTargetEnterDataDirective   = 261, +  CXCursor_OMPTargetEnterDataDirective = 261,    /** OpenMP target exit data directive.     */ -  CXCursor_OMPTargetExitDataDirective    = 262, +  CXCursor_OMPTargetExitDataDirective = 262,    /** OpenMP target parallel directive.     */ -  CXCursor_OMPTargetParallelDirective    = 263, +  CXCursor_OMPTargetParallelDirective = 263,    /** OpenMP target parallel for directive.     */ @@ -2492,7 +2478,7 @@ enum CXCursorKind {    /** OpenMP target update directive.     */ -  CXCursor_OMPTargetUpdateDirective      = 265, +  CXCursor_OMPTargetUpdateDirective = 265,    /** OpenMP distribute parallel for directive.     */ @@ -2564,17 +2550,25 @@ enum CXCursorKind {    /** OpenMP master taskloop simd directive.     */ -  CXCursor_OMPMasterTaskLoopSimdDirective      = 283, +  CXCursor_OMPMasterTaskLoopSimdDirective = 283,    /** OpenMP parallel master taskloop simd directive.     */ -  CXCursor_OMPParallelMasterTaskLoopSimdDirective      = 284, +  CXCursor_OMPParallelMasterTaskLoopSimdDirective = 284,    /** OpenMP parallel master directive.     */ -  CXCursor_OMPParallelMasterDirective      = 285, +  CXCursor_OMPParallelMasterDirective = 285, + +  /** OpenMP depobj directive. +   */ +  CXCursor_OMPDepobjDirective = 286, + +  /** OpenMP scan directive. +   */ +  CXCursor_OMPScanDirective = 287, -  CXCursor_LastStmt = CXCursor_OMPParallelMasterDirective, +  CXCursor_LastStmt = CXCursor_OMPScanDirective,    /**     * Cursor that represents the translation unit itself. @@ -2582,89 +2576,89 @@ enum CXCursorKind {     * The translation unit cursor exists primarily to act as the root     * cursor for traversing the contents of a translation unit.     */ -  CXCursor_TranslationUnit               = 300, +  CXCursor_TranslationUnit = 300,    /* Attributes */ -  CXCursor_FirstAttr                     = 400, +  CXCursor_FirstAttr = 400,    /**     * An attribute whose specific kind is not exposed via this     * interface.     */ -  CXCursor_UnexposedAttr                 = 400, - -  CXCursor_IBActionAttr                  = 401, -  CXCursor_IBOutletAttr                  = 402, -  CXCursor_IBOutletCollectionAttr        = 403, -  CXCursor_CXXFinalAttr                  = 404, -  CXCursor_CXXOverrideAttr               = 405, -  CXCursor_AnnotateAttr                  = 406, -  CXCursor_AsmLabelAttr                  = 407, -  CXCursor_PackedAttr                    = 408, -  CXCursor_PureAttr                      = 409, -  CXCursor_ConstAttr                     = 410, -  CXCursor_NoDuplicateAttr               = 411, -  CXCursor_CUDAConstantAttr              = 412, -  CXCursor_CUDADeviceAttr                = 413, -  CXCursor_CUDAGlobalAttr                = 414, -  CXCursor_CUDAHostAttr                  = 415, -  CXCursor_CUDASharedAttr                = 416, -  CXCursor_VisibilityAttr                = 417, -  CXCursor_DLLExport                     = 418, -  CXCursor_DLLImport                     = 419, -  CXCursor_NSReturnsRetained             = 420, -  CXCursor_NSReturnsNotRetained          = 421, -  CXCursor_NSReturnsAutoreleased         = 422, -  CXCursor_NSConsumesSelf                = 423, -  CXCursor_NSConsumed                    = 424, -  CXCursor_ObjCException                 = 425, -  CXCursor_ObjCNSObject                  = 426, -  CXCursor_ObjCIndependentClass          = 427, -  CXCursor_ObjCPreciseLifetime           = 428, -  CXCursor_ObjCReturnsInnerPointer       = 429, -  CXCursor_ObjCRequiresSuper             = 430, -  CXCursor_ObjCRootClass                 = 431, -  CXCursor_ObjCSubclassingRestricted     = 432, -  CXCursor_ObjCExplicitProtocolImpl      = 433, -  CXCursor_ObjCDesignatedInitializer     = 434, -  CXCursor_ObjCRuntimeVisible            = 435, -  CXCursor_ObjCBoxable                   = 436, -  CXCursor_FlagEnum                      = 437, -  CXCursor_ConvergentAttr                = 438, -  CXCursor_WarnUnusedAttr                = 439, -  CXCursor_WarnUnusedResultAttr          = 440, -  CXCursor_AlignedAttr                   = 441, -  CXCursor_LastAttr                      = CXCursor_AlignedAttr, +  CXCursor_UnexposedAttr = 400, + +  CXCursor_IBActionAttr = 401, +  CXCursor_IBOutletAttr = 402, +  CXCursor_IBOutletCollectionAttr = 403, +  CXCursor_CXXFinalAttr = 404, +  CXCursor_CXXOverrideAttr = 405, +  CXCursor_AnnotateAttr = 406, +  CXCursor_AsmLabelAttr = 407, +  CXCursor_PackedAttr = 408, +  CXCursor_PureAttr = 409, +  CXCursor_ConstAttr = 410, +  CXCursor_NoDuplicateAttr = 411, +  CXCursor_CUDAConstantAttr = 412, +  CXCursor_CUDADeviceAttr = 413, +  CXCursor_CUDAGlobalAttr = 414, +  CXCursor_CUDAHostAttr = 415, +  CXCursor_CUDASharedAttr = 416, +  CXCursor_VisibilityAttr = 417, +  CXCursor_DLLExport = 418, +  CXCursor_DLLImport = 419, +  CXCursor_NSReturnsRetained = 420, +  CXCursor_NSReturnsNotRetained = 421, +  CXCursor_NSReturnsAutoreleased = 422, +  CXCursor_NSConsumesSelf = 423, +  CXCursor_NSConsumed = 424, +  CXCursor_ObjCException = 425, +  CXCursor_ObjCNSObject = 426, +  CXCursor_ObjCIndependentClass = 427, +  CXCursor_ObjCPreciseLifetime = 428, +  CXCursor_ObjCReturnsInnerPointer = 429, +  CXCursor_ObjCRequiresSuper = 430, +  CXCursor_ObjCRootClass = 431, +  CXCursor_ObjCSubclassingRestricted = 432, +  CXCursor_ObjCExplicitProtocolImpl = 433, +  CXCursor_ObjCDesignatedInitializer = 434, +  CXCursor_ObjCRuntimeVisible = 435, +  CXCursor_ObjCBoxable = 436, +  CXCursor_FlagEnum = 437, +  CXCursor_ConvergentAttr = 438, +  CXCursor_WarnUnusedAttr = 439, +  CXCursor_WarnUnusedResultAttr = 440, +  CXCursor_AlignedAttr = 441, +  CXCursor_LastAttr = CXCursor_AlignedAttr,    /* Preprocessing */ -  CXCursor_PreprocessingDirective        = 500, -  CXCursor_MacroDefinition               = 501, -  CXCursor_MacroExpansion                = 502, -  CXCursor_MacroInstantiation            = CXCursor_MacroExpansion, -  CXCursor_InclusionDirective            = 503, -  CXCursor_FirstPreprocessing            = CXCursor_PreprocessingDirective, -  CXCursor_LastPreprocessing             = CXCursor_InclusionDirective, +  CXCursor_PreprocessingDirective = 500, +  CXCursor_MacroDefinition = 501, +  CXCursor_MacroExpansion = 502, +  CXCursor_MacroInstantiation = CXCursor_MacroExpansion, +  CXCursor_InclusionDirective = 503, +  CXCursor_FirstPreprocessing = CXCursor_PreprocessingDirective, +  CXCursor_LastPreprocessing = CXCursor_InclusionDirective,    /* Extra Declarations */    /**     * A module import declaration.     */ -  CXCursor_ModuleImportDecl              = 600, -  CXCursor_TypeAliasTemplateDecl         = 601, +  CXCursor_ModuleImportDecl = 600, +  CXCursor_TypeAliasTemplateDecl = 601,    /**     * A static_assert or _Static_assert node     */ -  CXCursor_StaticAssert                  = 602, +  CXCursor_StaticAssert = 602,    /**     * a friend declaration.     */ -  CXCursor_FriendDecl                    = 603, -  CXCursor_FirstExtraDecl                = CXCursor_ModuleImportDecl, -  CXCursor_LastExtraDecl                 = CXCursor_FriendDecl, +  CXCursor_FriendDecl = 603, +  CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl, +  CXCursor_LastExtraDecl = CXCursor_FriendDecl,    /**     * A code completion overload candidate.     */ -  CXCursor_OverloadCandidate             = 700 +  CXCursor_OverloadCandidate = 700  };  /** @@ -2935,14 +2929,10 @@ typedef struct CXPlatformAvailability {   * platform-availability structures returned. There are   * \c min(N, availability_size) such structures.   */ -CINDEX_LINKAGE int -clang_getCursorPlatformAvailability(CXCursor cursor, -                                    int *always_deprecated, -                                    CXString *deprecated_message, -                                    int *always_unavailable, -                                    CXString *unavailable_message, -                                    CXPlatformAvailability *availability, -                                    int availability_size); +CINDEX_LINKAGE int clang_getCursorPlatformAvailability( +    CXCursor cursor, int *always_deprecated, CXString *deprecated_message, +    int *always_unavailable, CXString *unavailable_message, +    CXPlatformAvailability *availability, int availability_size);  /**   * Free the memory associated with a \c CXPlatformAvailability structure. @@ -2969,11 +2959,7 @@ CINDEX_LINKAGE enum CXLanguageKind clang_getCursorLanguage(CXCursor cursor);   * Describe the "thread-local storage (TLS) kind" of the declaration   * referred to by a cursor.   */ -enum CXTLSKind { -  CXTLS_None = 0, -  CXTLS_Dynamic, -  CXTLS_Static -}; +enum CXTLSKind { CXTLS_None = 0, CXTLS_Dynamic, CXTLS_Static };  /**   * Determine the "thread-local storage (TLS) kind" of the declaration @@ -3005,7 +2991,7 @@ CINDEX_LINKAGE void clang_disposeCXCursorSet(CXCursorSet cset);   * Queries a CXCursorSet to see if it contains a specific CXCursor.   *   * \returns non-zero if the set contains the specified cursor. -*/ + */  CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset,                                                     CXCursor cursor); @@ -3013,7 +2999,7 @@ CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset,   * Inserts a CXCursor into a CXCursorSet.   *   * \returns zero if the CXCursor was already in the set, and non-zero otherwise. -*/ + */  CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset,                                                   CXCursor cursor); @@ -3267,8 +3253,9 @@ enum CXTypeKind {    CXType_UShortAccum = 36,    CXType_UAccum = 37,    CXType_ULongAccum = 38, +  CXType_BFloat16 = 39,    CXType_FirstBuiltin = CXType_Void, -  CXType_LastBuiltin = CXType_ULongAccum, +  CXType_LastBuiltin = CXType_BFloat16,    CXType_Complex = 100,    CXType_Pointer = 101, @@ -3360,7 +3347,8 @@ enum CXTypeKind {    CXType_OCLIntelSubgroupAVCImeDualRefStreamin = 175, -  CXType_ExtVector = 176 +  CXType_ExtVector = 176, +  CXType_Atomic = 177  };  /** @@ -3433,9 +3421,9 @@ CINDEX_LINKAGE CXType clang_getEnumDeclIntegerType(CXCursor C);   * Retrieve the integer value of an enum constant declaration as a signed   *  long long.   * - * If the cursor does not reference an enum constant declaration, LLONG_MIN is returned. - * Since this is also potentially a valid constant value, the kind of the cursor - * must be verified before calling this function. + * If the cursor does not reference an enum constant declaration, LLONG_MIN is + * returned. Since this is also potentially a valid constant value, the kind of + * the cursor must be verified before calling this function.   */  CINDEX_LINKAGE long long clang_getEnumConstantDeclValue(CXCursor C); @@ -3443,11 +3431,12 @@ CINDEX_LINKAGE long long clang_getEnumConstantDeclValue(CXCursor C);   * Retrieve the integer value of an enum constant declaration as an unsigned   *  long long.   * - * If the cursor does not reference an enum constant declaration, ULLONG_MAX is returned. - * Since this is also potentially a valid constant value, the kind of the cursor - * must be verified before calling this function. + * If the cursor does not reference an enum constant declaration, ULLONG_MAX is + * returned. Since this is also potentially a valid constant value, the kind of + * the cursor must be verified before calling this function.   */ -CINDEX_LINKAGE unsigned long long clang_getEnumConstantDeclUnsignedValue(CXCursor C); +CINDEX_LINKAGE unsigned long long +clang_getEnumConstantDeclUnsignedValue(CXCursor C);  /**   * Retrieve the bit width of a bit field declaration as an integer. @@ -3528,8 +3517,8 @@ CINDEX_LINKAGE int clang_Cursor_getNumTemplateArguments(CXCursor C);   * For I = 0, 1, and 2, Type, Integral, and Integral will be returned,   * respectively.   */ -CINDEX_LINKAGE enum CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind( -    CXCursor C, unsigned I); +CINDEX_LINKAGE enum CXTemplateArgumentKind +clang_Cursor_getTemplateArgumentKind(CXCursor C, unsigned I);  /**   * Retrieve a CXType representing the type of a TemplateArgument of a @@ -3589,8 +3578,8 @@ CINDEX_LINKAGE long long clang_Cursor_getTemplateArgumentValue(CXCursor C,   * If called with I = 1 or 2, 2147483649 or true will be returned, respectively.   * For I == 0, this function's behavior is undefined.   */ -CINDEX_LINKAGE unsigned long long clang_Cursor_getTemplateArgumentUnsignedValue( -    CXCursor C, unsigned I); +CINDEX_LINKAGE unsigned long long +clang_Cursor_getTemplateArgumentUnsignedValue(CXCursor C, unsigned I);  /**   * Determine whether two CXTypes represent the same type. @@ -3745,7 +3734,7 @@ CINDEX_LINKAGE unsigned clang_Type_getNumObjCProtocolRefs(CXType T);  CINDEX_LINKAGE CXCursor clang_Type_getObjCProtocolDecl(CXType T, unsigned i);  /** - * Retreive the number of type arguments associated with an ObjC object. + * Retrieve the number of type arguments associated with an ObjC object.   *   * If the type is not an ObjC object, 0 is returned.   */ @@ -3775,7 +3764,8 @@ CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C);   * Retrieve the exception specification type associated with a given cursor.   * This is a value of type CXCursor_ExceptionSpecificationKind.   * - * This only returns a valid result if the cursor refers to a function or method. + * This only returns a valid result if the cursor refers to a function or + * method.   */  CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType(CXCursor C); @@ -3949,6 +3939,13 @@ CINDEX_LINKAGE long long clang_Type_getOffsetOf(CXType T, const char *S);  CINDEX_LINKAGE CXType clang_Type_getModifiedType(CXType T);  /** + * Gets the type contained by this atomic type. + * + * If a non-atomic type is passed in, an invalid type is returned. + */ +CINDEX_LINKAGE CXType clang_Type_getValueType(CXType CT); + +/**   * Return the offset of the field represented by the Cursor.   *   * If the cursor is not a field declaration, -1 is returned. @@ -4003,7 +4000,8 @@ CINDEX_LINKAGE int clang_Type_getNumTemplateArguments(CXType T);   * This function only returns template type arguments and does not handle   * template template arguments or variadic packs.   */ -CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType(CXType T, unsigned i); +CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType(CXType T, +                                                           unsigned i);  /**   * Retrieve the ref-qualifier kind of a function or method. @@ -4039,9 +4037,9 @@ enum CX_CXXAccessSpecifier {  /**   * Returns the access control level for the referenced object.   * - * If the cursor refers to a C++ declaration, its access control level within its - * parent scope is returned. Otherwise, if the cursor refers to a base specifier or - * access specifier, the specifier itself is returned. + * If the cursor refers to a C++ declaration, its access control level within + * its parent scope is returned. Otherwise, if the cursor refers to a base + * specifier or access specifier, the specifier itself is returned.   */  CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor); @@ -4192,7 +4190,7 @@ CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent,                                              CXCursorVisitor visitor,                                              CXClientData client_data);  #ifdef __has_feature -#  if __has_feature(blocks) +#if __has_feature(blocks)  /**   * Visitor invoked for each cursor found by a traversal.   * @@ -4203,16 +4201,16 @@ CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent,   * The visitor should return one of the \c CXChildVisitResult values   * to direct clang_visitChildrenWithBlock().   */ -typedef enum CXChildVisitResult -     (^CXCursorVisitorBlock)(CXCursor cursor, CXCursor parent); +typedef enum CXChildVisitResult (^CXCursorVisitorBlock)(CXCursor cursor, +                                                        CXCursor parent);  /**   * Visits the children of a cursor using the specified block.  Behaves   * identically to clang_visitChildren() in all other respects.   */ -CINDEX_LINKAGE unsigned clang_visitChildrenWithBlock(CXCursor parent, -                                                    CXCursorVisitorBlock block); -#  endif +CINDEX_LINKAGE unsigned +clang_visitChildrenWithBlock(CXCursor parent, CXCursorVisitorBlock block); +#endif  #endif  /** @@ -4249,15 +4247,14 @@ CINDEX_LINKAGE CXString clang_constructUSR_ObjCClass(const char *class_name);  /**   * Construct a USR for a specified Objective-C category.   */ -CINDEX_LINKAGE CXString -  clang_constructUSR_ObjCCategory(const char *class_name, -                                 const char *category_name); +CINDEX_LINKAGE CXString clang_constructUSR_ObjCCategory( +    const char *class_name, const char *category_name);  /**   * Construct a USR for a specified Objective-C protocol.   */  CINDEX_LINKAGE CXString -  clang_constructUSR_ObjCProtocol(const char *protocol_name); +clang_constructUSR_ObjCProtocol(const char *protocol_name);  /**   * Construct a USR for a specified Objective-C instance variable and @@ -4297,9 +4294,8 @@ CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor);   *   * \param options Reserved.   */ -CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor, -                                                          unsigned pieceIndex, -                                                          unsigned options); +CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange( +    CXCursor, unsigned pieceIndex, unsigned options);  /**   * Opaque pointer representing a policy that controls pretty printing @@ -4353,9 +4349,10 @@ clang_PrintingPolicy_getProperty(CXPrintingPolicy Policy,  /**   * Set a property value for the given printing policy.   */ -CINDEX_LINKAGE void clang_PrintingPolicy_setProperty(CXPrintingPolicy Policy, -                                                     enum CXPrintingPolicyProperty Property, -                                                     unsigned Value); +CINDEX_LINKAGE void +clang_PrintingPolicy_setProperty(CXPrintingPolicy Policy, +                                 enum CXPrintingPolicyProperty Property, +                                 unsigned Value);  /**   * Retrieve the default policy for the cursor. @@ -4503,18 +4500,18 @@ CINDEX_LINKAGE CXType clang_Cursor_getReceiverType(CXCursor C);   * Property attributes for a \c CXCursor_ObjCPropertyDecl.   */  typedef enum { -  CXObjCPropertyAttr_noattr    = 0x00, -  CXObjCPropertyAttr_readonly  = 0x01, -  CXObjCPropertyAttr_getter    = 0x02, -  CXObjCPropertyAttr_assign    = 0x04, +  CXObjCPropertyAttr_noattr = 0x00, +  CXObjCPropertyAttr_readonly = 0x01, +  CXObjCPropertyAttr_getter = 0x02, +  CXObjCPropertyAttr_assign = 0x04,    CXObjCPropertyAttr_readwrite = 0x08, -  CXObjCPropertyAttr_retain    = 0x10, -  CXObjCPropertyAttr_copy      = 0x20, +  CXObjCPropertyAttr_retain = 0x10, +  CXObjCPropertyAttr_copy = 0x20,    CXObjCPropertyAttr_nonatomic = 0x40, -  CXObjCPropertyAttr_setter    = 0x80, -  CXObjCPropertyAttr_atomic    = 0x100, -  CXObjCPropertyAttr_weak      = 0x200, -  CXObjCPropertyAttr_strong    = 0x400, +  CXObjCPropertyAttr_setter = 0x80, +  CXObjCPropertyAttr_atomic = 0x100, +  CXObjCPropertyAttr_weak = 0x200, +  CXObjCPropertyAttr_strong = 0x400,    CXObjCPropertyAttr_unsafe_unretained = 0x800,    CXObjCPropertyAttr_class = 0x1000  } CXObjCPropertyAttrKind; @@ -4526,8 +4523,8 @@ typedef enum {   *   * \param reserved Reserved for future use, pass 0.   */ -CINDEX_LINKAGE unsigned clang_Cursor_getObjCPropertyAttributes(CXCursor C, -                                                             unsigned reserved); +CINDEX_LINKAGE unsigned +clang_Cursor_getObjCPropertyAttributes(CXCursor C, unsigned reserved);  /**   * Given a cursor that represents a property declaration, return the @@ -4589,8 +4586,9 @@ CINDEX_LINKAGE unsigned clang_Cursor_isVariadic(CXCursor C);   * non-zero if the 'generated_declaration' is set in the attribute.   */  CINDEX_LINKAGE unsigned clang_Cursor_isExternalSymbol(CXCursor C, -                                       CXString *language, CXString *definedIn, -                                       unsigned *isGenerated); +                                                      CXString *language, +                                                      CXString *definedIn, +                                                      unsigned *isGenerated);  /**   * Given a cursor that represents a declaration, return the associated @@ -4716,8 +4714,8 @@ CINDEX_LINKAGE unsigned clang_Module_getNumTopLevelHeaders(CXTranslationUnit,   * \returns the specified top level header associated with the module.   */  CINDEX_LINKAGE -CXFile clang_Module_getTopLevelHeader(CXTranslationUnit, -                                      CXModule Module, unsigned Index); +CXFile clang_Module_getTopLevelHeader(CXTranslationUnit, CXModule Module, +                                      unsigned Index);  /**   * @} @@ -4735,7 +4733,8 @@ CXFile clang_Module_getTopLevelHeader(CXTranslationUnit,  /**   * Determine if a C++ constructor is a converting constructor.   */ -CINDEX_LINKAGE unsigned clang_CXXConstructor_isConvertingConstructor(CXCursor C); +CINDEX_LINKAGE unsigned +clang_CXXConstructor_isConvertingConstructor(CXCursor C);  /**   * Determine if a C++ constructor is a copy constructor. @@ -4865,9 +4864,8 @@ CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C);   * \returns The piece of the name pointed to by the given cursor. If there is no   * name, or if the PieceIndex is out-of-range, a null-cursor will be returned.   */ -CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, -                                                unsigned NameFlags, -                                                unsigned PieceIndex); +CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange( +    CXCursor C, unsigned NameFlags, unsigned PieceIndex);  enum CXNameRefFlags {    /** @@ -5035,15 +5033,14 @@ CINDEX_LINKAGE void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range,   * \param Cursors an array of \p NumTokens cursors, whose contents will be   * replaced with the cursors corresponding to each token.   */ -CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU, -                                         CXToken *Tokens, unsigned NumTokens, -                                         CXCursor *Cursors); +CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU, CXToken *Tokens, +                                         unsigned NumTokens, CXCursor *Cursors);  /**   * Free the given set of tokens.   */ -CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, -                                        CXToken *Tokens, unsigned NumTokens); +CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, CXToken *Tokens, +                                        unsigned NumTokens);  /**   * @} @@ -5060,15 +5057,11 @@ CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU,  /* for debug/testing */  CINDEX_LINKAGE CXString clang_getCursorKindSpelling(enum CXCursorKind Kind); -CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(CXCursor, -                                          const char **startBuf, -                                          const char **endBuf, -                                          unsigned *startLine, -                                          unsigned *startColumn, -                                          unsigned *endLine, -                                          unsigned *endColumn); +CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent( +    CXCursor, const char **startBuf, const char **endBuf, unsigned *startLine, +    unsigned *startColumn, unsigned *endLine, unsigned *endColumn);  CINDEX_LINKAGE void clang_enableStackTraces(void); -CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void*), void *user_data, +CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void *), void *user_data,                                            unsigned stack_size);  /** @@ -5319,9 +5312,8 @@ clang_getCompletionChunkKind(CXCompletionString completion_string,   *   * \returns the text associated with the chunk at index \c chunk_number.   */ -CINDEX_LINKAGE CXString -clang_getCompletionChunkText(CXCompletionString completion_string, -                             unsigned chunk_number); +CINDEX_LINKAGE CXString clang_getCompletionChunkText( +    CXCompletionString completion_string, unsigned chunk_number);  /**   * Retrieve the completion string associated with a particular chunk @@ -5334,9 +5326,8 @@ clang_getCompletionChunkText(CXCompletionString completion_string,   * \returns the completion string associated with the chunk at index   * \c chunk_number.   */ -CINDEX_LINKAGE CXCompletionString -clang_getCompletionChunkCompletionString(CXCompletionString completion_string, -                                         unsigned chunk_number); +CINDEX_LINKAGE CXCompletionString clang_getCompletionChunkCompletionString( +    CXCompletionString completion_string, unsigned chunk_number);  /**   * Retrieve the number of chunks in the given code-completion string. @@ -5393,9 +5384,8 @@ clang_getCompletionNumAnnotations(CXCompletionString completion_string);   * \returns annotation string associated with the completion at index   * \c annotation_number, or a NULL string if that annotation is not available.   */ -CINDEX_LINKAGE CXString -clang_getCompletionAnnotation(CXCompletionString completion_string, -                              unsigned annotation_number); +CINDEX_LINKAGE CXString clang_getCompletionAnnotation( +    CXCompletionString completion_string, unsigned annotation_number);  /**   * Retrieve the parent context of the given completion string. @@ -5413,9 +5403,8 @@ clang_getCompletionAnnotation(CXCompletionString completion_string,   * \returns The name of the completion parent, e.g., "NSObject" if   * the completion string represents a method in the NSObject class.   */ -CINDEX_LINKAGE CXString -clang_getCompletionParent(CXCompletionString completion_string, -                          enum CXCursorKind *kind); +CINDEX_LINKAGE CXString clang_getCompletionParent( +    CXCompletionString completion_string, enum CXCursorKind *kind);  /**   * Retrieve the brief documentation comment attached to the declaration @@ -5771,13 +5760,11 @@ CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void);   * completion fails, returns NULL.   */  CINDEX_LINKAGE -CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU, -                                            const char *complete_filename, -                                            unsigned complete_line, -                                            unsigned complete_column, -                                            struct CXUnsavedFile *unsaved_files, -                                            unsigned num_unsaved_files, -                                            unsigned options); +CXCodeCompleteResults * +clang_codeCompleteAt(CXTranslationUnit TU, const char *complete_filename, +                     unsigned complete_line, unsigned complete_column, +                     struct CXUnsavedFile *unsaved_files, +                     unsigned num_unsaved_files, unsigned options);  /**   * Sort the code-completion results in case-insensitive alphabetical @@ -5826,8 +5813,8 @@ CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results,   * along with the given code completion results.   */  CINDEX_LINKAGE -unsigned long long clang_codeCompleteGetContexts( -                                                CXCodeCompleteResults *Results); +unsigned long long +clang_codeCompleteGetContexts(CXCodeCompleteResults *Results);  /**   * Returns the cursor kind for the container for the current code @@ -5846,9 +5833,9 @@ unsigned long long clang_codeCompleteGetContexts(   * container   */  CINDEX_LINKAGE -enum CXCursorKind clang_codeCompleteGetContainerKind( -                                                 CXCodeCompleteResults *Results, -                                                     unsigned *IsIncomplete); +enum CXCursorKind +clang_codeCompleteGetContainerKind(CXCodeCompleteResults *Results, +                                   unsigned *IsIncomplete);  /**   * Returns the USR for the container for the current code completion @@ -5900,19 +5887,19 @@ CINDEX_LINKAGE CXString clang_getClangVersion(void);   */  CINDEX_LINKAGE void clang_toggleCrashRecovery(unsigned isEnabled); - /** -  * Visitor invoked for each file in a translation unit -  *        (used with clang_getInclusions()). -  * -  * This visitor function will be invoked by clang_getInclusions() for each -  * file included (either at the top-level or by \#include directives) within -  * a translation unit.  The first argument is the file being included, and -  * the second and third arguments provide the inclusion stack.  The -  * array is sorted in order of immediate inclusion.  For example, -  * the first element refers to the location that included 'included_file'. -  */ +/** + * Visitor invoked for each file in a translation unit + *        (used with clang_getInclusions()). + * + * This visitor function will be invoked by clang_getInclusions() for each + * file included (either at the top-level or by \#include directives) within + * a translation unit.  The first argument is the file being included, and + * the second and third arguments provide the inclusion stack.  The + * array is sorted in order of immediate inclusion.  For example, + * the first element refers to the location that included 'included_file'. + */  typedef void (*CXInclusionVisitor)(CXFile included_file, -                                   CXSourceLocation* inclusion_stack, +                                   CXSourceLocation *inclusion_stack,                                     unsigned include_len,                                     CXClientData client_data); @@ -5927,7 +5914,7 @@ CINDEX_LINKAGE void clang_getInclusions(CXTranslationUnit tu,                                          CXClientData client_data);  typedef enum { -  CXEval_Int = 1 , +  CXEval_Int = 1,    CXEval_Float = 2,    CXEval_ObjCStrLiteral = 3,    CXEval_StrLiteral = 4, @@ -5936,17 +5923,18 @@ typedef enum {    CXEval_UnExposed = 0 -} CXEvalResultKind ; +} CXEvalResultKind;  /**   * Evaluation result of a cursor   */ -typedef void * CXEvalResult; +typedef void *CXEvalResult;  /**   * If cursor is a statement declaration tries to evaluate the   * statement and if its variable, tries to evaluate its initializer,   * into its corresponding type. + * If it's an expression, tries to evaluate the expression.   */  CINDEX_LINKAGE CXEvalResult clang_Cursor_Evaluate(CXCursor C); @@ -5978,7 +5966,8 @@ CINDEX_LINKAGE unsigned clang_EvalResult_isUnsignedInt(CXEvalResult E);   * 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); +CINDEX_LINKAGE unsigned long long +clang_EvalResult_getAsUnsigned(CXEvalResult E);  /**   * Returns the evaluation result as double if the @@ -5992,7 +5981,7 @@ CINDEX_LINKAGE double clang_EvalResult_getAsDouble(CXEvalResult E);   * instead call clang_EvalResult_dispose on the CXEvalResult returned   * by clang_Cursor_Evaluate.   */ -CINDEX_LINKAGE const char* clang_EvalResult_getAsStr(CXEvalResult E); +CINDEX_LINKAGE const char *clang_EvalResult_getAsStr(CXEvalResult E);  /**   * Disposes the created Eval memory. @@ -6050,7 +6039,8 @@ CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);   * is associated with.   */  CINDEX_LINKAGE void clang_remap_getFilenames(CXRemapping, unsigned index, -                                     CXString *original, CXString *transformed); +                                             CXString *original, +                                             CXString *transformed);  /**   * Dispose the remapping. @@ -6066,10 +6056,7 @@ CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);   * @{   */ -enum CXVisitorResult { -  CXVisit_Break, -  CXVisit_Continue -}; +enum CXVisitorResult { CXVisit_Break, CXVisit_Continue };  typedef struct CXCursorAndRangeVisitor {    void *context; @@ -6107,8 +6094,8 @@ typedef enum {   *   * \returns one of the CXResult enumerators.   */ -CINDEX_LINKAGE CXResult clang_findReferencesInFile(CXCursor cursor, CXFile file, -                                               CXCursorAndRangeVisitor visitor); +CINDEX_LINKAGE CXResult clang_findReferencesInFile( +    CXCursor cursor, CXFile file, CXCursorAndRangeVisitor visitor);  /**   * Find #import/#include directives in a specific file. @@ -6122,15 +6109,14 @@ CINDEX_LINKAGE CXResult clang_findReferencesInFile(CXCursor cursor, CXFile file,   *   * \returns one of the CXResult enumerators.   */ -CINDEX_LINKAGE CXResult clang_findIncludesInFile(CXTranslationUnit TU, -                                                 CXFile file, -                                              CXCursorAndRangeVisitor visitor); +CINDEX_LINKAGE CXResult clang_findIncludesInFile( +    CXTranslationUnit TU, CXFile file, CXCursorAndRangeVisitor visitor);  #ifdef __has_feature -#  if __has_feature(blocks) +#if __has_feature(blocks) -typedef enum CXVisitorResult -    (^CXCursorAndRangeVisitorBlock)(CXCursor, CXSourceRange); +typedef enum CXVisitorResult (^CXCursorAndRangeVisitorBlock)(CXCursor, +                                                             CXSourceRange);  CINDEX_LINKAGE  CXResult clang_findReferencesInFileWithBlock(CXCursor, CXFile, @@ -6140,7 +6126,7 @@ CINDEX_LINKAGE  CXResult clang_findIncludesInFileWithBlock(CXTranslationUnit, CXFile,                                             CXCursorAndRangeVisitorBlock); -#  endif +#endif  #endif  /** @@ -6223,46 +6209,46 @@ typedef struct {  } CXIdxImportedASTFileInfo;  typedef enum { -  CXIdxEntity_Unexposed     = 0, -  CXIdxEntity_Typedef       = 1, -  CXIdxEntity_Function      = 2, -  CXIdxEntity_Variable      = 3, -  CXIdxEntity_Field         = 4, -  CXIdxEntity_EnumConstant  = 5, +  CXIdxEntity_Unexposed = 0, +  CXIdxEntity_Typedef = 1, +  CXIdxEntity_Function = 2, +  CXIdxEntity_Variable = 3, +  CXIdxEntity_Field = 4, +  CXIdxEntity_EnumConstant = 5, -  CXIdxEntity_ObjCClass     = 6, -  CXIdxEntity_ObjCProtocol  = 7, -  CXIdxEntity_ObjCCategory  = 8, +  CXIdxEntity_ObjCClass = 6, +  CXIdxEntity_ObjCProtocol = 7, +  CXIdxEntity_ObjCCategory = 8,    CXIdxEntity_ObjCInstanceMethod = 9, -  CXIdxEntity_ObjCClassMethod    = 10, -  CXIdxEntity_ObjCProperty  = 11, -  CXIdxEntity_ObjCIvar      = 12, - -  CXIdxEntity_Enum          = 13, -  CXIdxEntity_Struct        = 14, -  CXIdxEntity_Union         = 15, - -  CXIdxEntity_CXXClass              = 16, -  CXIdxEntity_CXXNamespace          = 17, -  CXIdxEntity_CXXNamespaceAlias     = 18, -  CXIdxEntity_CXXStaticVariable     = 19, -  CXIdxEntity_CXXStaticMethod       = 20, -  CXIdxEntity_CXXInstanceMethod     = 21, -  CXIdxEntity_CXXConstructor        = 22, -  CXIdxEntity_CXXDestructor         = 23, +  CXIdxEntity_ObjCClassMethod = 10, +  CXIdxEntity_ObjCProperty = 11, +  CXIdxEntity_ObjCIvar = 12, + +  CXIdxEntity_Enum = 13, +  CXIdxEntity_Struct = 14, +  CXIdxEntity_Union = 15, + +  CXIdxEntity_CXXClass = 16, +  CXIdxEntity_CXXNamespace = 17, +  CXIdxEntity_CXXNamespaceAlias = 18, +  CXIdxEntity_CXXStaticVariable = 19, +  CXIdxEntity_CXXStaticMethod = 20, +  CXIdxEntity_CXXInstanceMethod = 21, +  CXIdxEntity_CXXConstructor = 22, +  CXIdxEntity_CXXDestructor = 23,    CXIdxEntity_CXXConversionFunction = 24, -  CXIdxEntity_CXXTypeAlias          = 25, -  CXIdxEntity_CXXInterface          = 26 +  CXIdxEntity_CXXTypeAlias = 25, +  CXIdxEntity_CXXInterface = 26  } CXIdxEntityKind;  typedef enum {    CXIdxEntityLang_None = 0, -  CXIdxEntityLang_C    = 1, +  CXIdxEntityLang_C = 1,    CXIdxEntityLang_ObjC = 2, -  CXIdxEntityLang_CXX  = 3, -  CXIdxEntityLang_Swift  = 4 +  CXIdxEntityLang_CXX = 3, +  CXIdxEntityLang_Swift = 4  } CXIdxEntityLanguage;  /** @@ -6276,16 +6262,16 @@ typedef enum {   * CXIdxEntity_CXXTypeAlias   */  typedef enum { -  CXIdxEntity_NonTemplate   = 0, -  CXIdxEntity_Template      = 1, +  CXIdxEntity_NonTemplate = 0, +  CXIdxEntity_Template = 1,    CXIdxEntity_TemplatePartialSpecialization = 2,    CXIdxEntity_TemplateSpecialization = 3  } CXIdxEntityCXXTemplateKind;  typedef enum { -  CXIdxAttr_Unexposed     = 0, -  CXIdxAttr_IBAction      = 1, -  CXIdxAttr_IBOutlet      = 2, +  CXIdxAttr_Unexposed = 0, +  CXIdxAttr_IBAction = 1, +  CXIdxAttr_IBOutlet = 2,    CXIdxAttr_IBOutletCollection = 3  } CXIdxAttrKind; @@ -6317,9 +6303,7 @@ typedef struct {    CXIdxLoc classLoc;  } CXIdxIBOutletCollectionAttrInfo; -typedef enum { -  CXIdxDeclFlag_Skipped = 0x1 -} CXIdxDeclInfoFlags; +typedef enum { CXIdxDeclFlag_Skipped = 0x1 } CXIdxDeclInfoFlags;  typedef struct {    const CXIdxEntityInfo *entityInfo; @@ -6488,11 +6472,10 @@ typedef struct {    /**     * Called at the end of indexing; passes the complete diagnostic set.     */ -  void (*diagnostic)(CXClientData client_data, -                     CXDiagnosticSet, void *reserved); +  void (*diagnostic)(CXClientData client_data, CXDiagnosticSet, void *reserved); -  CXIdxClientFile (*enteredMainFile)(CXClientData client_data, -                                     CXFile mainFile, void *reserved); +  CXIdxClientFile (*enteredMainFile)(CXClientData client_data, CXFile mainFile, +                                     void *reserved);    /**     * Called when a file gets \#included/\#imported. @@ -6517,8 +6500,7 @@ typedef struct {    CXIdxClientContainer (*startedTranslationUnit)(CXClientData client_data,                                                   void *reserved); -  void (*indexDeclaration)(CXClientData client_data, -                           const CXIdxDeclInfo *); +  void (*indexDeclaration)(CXClientData client_data, const CXIdxDeclInfo *);    /**     * Called to index a reference of an entity. @@ -6562,8 +6544,8 @@ clang_index_getClientContainer(const CXIdxContainerInfo *);   * For setting a custom CXIdxClientContainer attached to a   * container.   */ -CINDEX_LINKAGE void -clang_index_setClientContainer(const CXIdxContainerInfo *,CXIdxClientContainer); +CINDEX_LINKAGE void clang_index_setClientContainer(const CXIdxContainerInfo *, +                                                   CXIdxClientContainer);  /**   * For retrieving a custom CXIdxClientEntity attached to an entity. @@ -6574,8 +6556,8 @@ clang_index_getClientEntity(const CXIdxEntityInfo *);  /**   * For setting a custom CXIdxClientEntity attached to an entity.   */ -CINDEX_LINKAGE void -clang_index_setClientEntity(const CXIdxEntityInfo *, CXIdxClientEntity); +CINDEX_LINKAGE void clang_index_setClientEntity(const CXIdxEntityInfo *, +                                                CXIdxClientEntity);  /**   * An indexing action/session, to be applied to one or multiple @@ -6663,18 +6645,12 @@ typedef enum {   *   * The rest of the parameters are the same as #clang_parseTranslationUnit.   */ -CINDEX_LINKAGE int clang_indexSourceFile(CXIndexAction, -                                         CXClientData client_data, -                                         IndexerCallbacks *index_callbacks, -                                         unsigned index_callbacks_size, -                                         unsigned index_options, -                                         const char *source_filename, -                                         const char * const *command_line_args, -                                         int num_command_line_args, -                                         struct CXUnsavedFile *unsaved_files, -                                         unsigned num_unsaved_files, -                                         CXTranslationUnit *out_TU, -                                         unsigned TU_options); +CINDEX_LINKAGE int clang_indexSourceFile( +    CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks, +    unsigned index_callbacks_size, unsigned index_options, +    const char *source_filename, const char *const *command_line_args, +    int num_command_line_args, struct CXUnsavedFile *unsaved_files, +    unsigned num_unsaved_files, CXTranslationUnit *out_TU, unsigned TU_options);  /**   * Same as clang_indexSourceFile but requires a full command line @@ -6704,12 +6680,9 @@ CINDEX_LINKAGE int clang_indexSourceFileFullArgv(   * \returns If there is a failure from which there is no recovery, returns   * non-zero, otherwise returns 0.   */ -CINDEX_LINKAGE int clang_indexTranslationUnit(CXIndexAction, -                                              CXClientData client_data, -                                              IndexerCallbacks *index_callbacks, -                                              unsigned index_callbacks_size, -                                              unsigned index_options, -                                              CXTranslationUnit); +CINDEX_LINKAGE int clang_indexTranslationUnit( +    CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks, +    unsigned index_callbacks_size, unsigned index_options, CXTranslationUnit);  /**   * Retrieve the CXIdxFile, file, line, column, and offset represented by @@ -6721,8 +6694,7 @@ CINDEX_LINKAGE int clang_indexTranslationUnit(CXIndexAction,   */  CINDEX_LINKAGE void clang_indexLoc_getFileLocation(CXIdxLoc loc,                                                     CXIdxClientFile *indexFile, -                                                   CXFile *file, -                                                   unsigned *line, +                                                   CXFile *file, unsigned *line,                                                     unsigned *column,                                                     unsigned *offset); @@ -6765,8 +6737,7 @@ typedef enum CXVisitorResult (*CXFieldVisitor)(CXCursor C,   * \returns a non-zero value if the traversal was terminated   * prematurely by the visitor returning \c CXFieldVisit_Break.   */ -CINDEX_LINKAGE unsigned clang_Type_visitFields(CXType T, -                                               CXFieldVisitor visitor, +CINDEX_LINKAGE unsigned clang_Type_visitFields(CXType T, CXFieldVisitor visitor,                                                 CXClientData client_data);  /** diff --git a/clang/include/clang-c/Platform.h b/clang/include/clang-c/Platform.h index 3bb66bb0df48..67c1fff8ff78 100644 --- a/clang/include/clang-c/Platform.h +++ b/clang/include/clang-c/Platform.h @@ -18,14 +18,23 @@  LLVM_CLANG_C_EXTERN_C_BEGIN -/* MSVC DLL import/export. */ -#ifdef _MSC_VER -  #ifdef _CINDEX_LIB_ -    #define CINDEX_LINKAGE __declspec(dllexport) -  #else -    #define CINDEX_LINKAGE __declspec(dllimport) +/* Windows DLL import/export. */ +#ifndef CINDEX_NO_EXPORTS +  #define CINDEX_EXPORTS +#endif +#ifdef _WIN32 +  #ifdef CINDEX_EXPORTS +    #ifdef _CINDEX_LIB_ +      #define CINDEX_LINKAGE __declspec(dllexport) +    #else +      #define CINDEX_LINKAGE __declspec(dllimport) +    #endif    #endif -#else +#elif defined(CINDEX_EXPORTS) && defined(__GNUC__) +  #define CINDEX_LINKAGE __attribute__((visibility("default"))) +#endif + +#ifndef CINDEX_LINKAGE    #define CINDEX_LINKAGE  #endif | 
