diff --git a/binding.natjgen b/binding.natjgen index ce551ac..6f43280 100644 --- a/binding.natjgen +++ b/binding.natjgen @@ -3,10 +3,10 @@ "package-base": "org.undefined", "base-sdk": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk", "header-search-paths": [ - "${PROJECT}/../../../external/llvm/tools/clang/include" + "${PROJECT}/../../../external/llvm/clang/include" ], "user-header-search-paths": [ - "${PROJECT}/../../../external/llvm/tools/clang/include" + "${PROJECT}/../../../external/llvm/clang/include" ], "framework-search-paths": [], "source": "#import \"clang-c/Index.h\"\n#import \"clang-c/Documentation.h\"\n", @@ -37,7 +37,7 @@ "conditions": [ { "condition": "path-prefix", - "value": "${PROJECT}/../../../external/llvm/tools/clang/include/" + "value": "${PROJECT}/../../../external/llvm/clang/include/" } ], "actions": [ @@ -63,4 +63,4 @@ "other-cflags": [], "inject-default-cflags": true, "use-included-std-headers": true -} \ No newline at end of file +} diff --git a/src/main/java/org/clang/c/clang.java b/src/main/java/org/clang/c/clang.java index c264293..bd42ed8 100644 --- a/src/main/java/org/clang/c/clang.java +++ b/src/main/java/org/clang/c/clang.java @@ -18,6 +18,7 @@ import org.clang.opaque.CXCursorSet; import org.clang.opaque.CXModuleMapDescriptor; +import org.clang.opaque.CXTargetInfo; import org.clang.opaque.CXTranslationUnit; import org.clang.opaque.CXVirtualFileOverlay; import org.clang.struct.CXCodeCompleteResults; @@ -79,11 +80,17 @@ public final class clang { private clang() { } + /** + * Retrieve the character data associated with the given string. + */ @Generated @CFunction @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") public static native String clang_getCString(@ByValue CXString string); + /** + * Free the given string. + */ @Generated @CFunction public static native void clang_disposeString(@ByValue CXString string); @@ -98,7 +105,7 @@ private clang() { * crash from which we cannot recover. * * @param excludeDeclarationsFromPCH Exclude declarations from PCH - * @param displayDiagnostics Display diagnostics + * @param displayDiagnostics Display diagnostics * @return Index */ public static VoidPtr clang_createIndex(int excludeDeclarationsFromPCH, int displayDiagnostics) { @@ -114,228 +121,662 @@ public static VoidPtr clang_createIndex(int excludeDeclarationsFromPCH, int disp return ptr; } + /** + * Destroy the given index. + *

+ * The index must not be destroyed until all of the translation units created + * within that index have been destroyed. + */ @Generated @CFunction public static native void clang_disposeIndex(VoidPtr index); + /** + * Sets general options associated with a CXIndex. + *

+ * For example: + * \code + * CXIndex idx = ...; + * clang_CXIndex_setGlobalOptions(idx, + * clang_CXIndex_getGlobalOptions(idx) | + * CXGlobalOpt_ThreadBackgroundPriorityForIndexing); + * \endcode + *

+ * \param options A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags. + */ @Generated @CFunction public static native void clang_CXIndex_setGlobalOptions(VoidPtr arg1, int options); + /** + * Gets the general options associated with a CXIndex. + *

+ * \returns A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags that + * are associated with the given CXIndex object. + */ @Generated @CFunction public static native int clang_CXIndex_getGlobalOptions(VoidPtr arg1); + /** + * Retrieve the complete file and path name of the given file. + */ @Generated @CFunction @ByValue public static native CXString clang_getFileName(VoidPtr SFile); + /** + * Retrieve the last modification time of the given file. + */ @Generated @CFunction public static native long clang_getFileTime(VoidPtr SFile); + /** + * Retrieve the unique ID for the given \c file. + *

+ * \param file the file to get the ID for. + * \param outID stores the returned CXFileUniqueID. + * \returns If there was a failure getting the unique ID, returns non-zero, + * otherwise returns 0. + */ @Generated @CFunction public static native int clang_getFileUniqueID(VoidPtr file, @UncertainArgument("Options: reference, array Fallback: reference") CXFileUniqueID outID); + /** + * Determine whether the given header is guarded against + * multiple inclusions, either with the conventional + * \#ifndef/\#define/\#endif macro guards or with \#pragma once. + */ @Generated @CFunction public static native int clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, VoidPtr file); + /** + * Retrieve a file handle within the given translation unit. + *

+ * \param tu the translation unit + *

+ * \param file_name the name of the file. + *

+ * \returns the file handle for the named file in the translation unit \p tu, + * or a NULL file handle if the file was not a part of this translation unit. + */ @Generated @CFunction public static native VoidPtr clang_getFile(CXTranslationUnit tu, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String file_name); + /** + * Retrieve a NULL (invalid) source location. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getNullLocation(); + /** + * Determine whether two source locations, which must refer into + * the same translation unit, refer to exactly the same point in the source + * code. + *

+ * \returns non-zero if the source locations refer to the same location, zero + * if they refer to different locations. + */ @Generated @CFunction public static native int clang_equalLocations(@ByValue CXSourceLocation loc1, @ByValue CXSourceLocation loc2); + /** + * Retrieves the source location associated with a given file/line/column + * in a particular translation unit. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getLocation(CXTranslationUnit tu, VoidPtr file, int line, int column); + /** + * Retrieves the source location associated with a given character offset + * in a particular translation unit. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu, VoidPtr file, int offset); + /** + * Returns non-zero if the given source location is in a system header. + */ @Generated @CFunction public static native int clang_Location_isInSystemHeader(@ByValue CXSourceLocation location); + /** + * Returns non-zero if the given source location is in the main file of + * the corresponding translation unit. + */ @Generated @CFunction public static native int clang_Location_isFromMainFile(@ByValue CXSourceLocation location); + /** + * Retrieve a NULL (invalid) source range. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_getNullRange(); + /** + * Retrieve a source range given the beginning and ending source + * locations. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_getRange(@ByValue CXSourceLocation begin, @ByValue CXSourceLocation end); + /** + * Determine whether two ranges are equivalent. + *

+ * \returns non-zero if the ranges are the same, zero if they differ. + */ @Generated @CFunction public static native int clang_equalRanges(@ByValue CXSourceRange range1, @ByValue CXSourceRange range2); + /** + * Returns non-zero if \p range is null. + */ @Generated @CFunction public static native int clang_Range_isNull(@ByValue CXSourceRange range); + /** + * Retrieve the file, line, column, and offset represented by + * the given source location. + *

+ * If the location refers into a macro expansion, retrieves the + * location of the macro expansion. + *

+ * \param location the location within a source file that will be decomposed + * into its parts. + *

+ * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + *

+ * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + *

+ * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + *

+ * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ @Generated @CFunction public static native void clang_getExpansionLocation(@ByValue CXSourceLocation location, Ptr file, IntPtr line, IntPtr column, IntPtr offset); + /** + * Retrieve the file, line and column represented by the given source + * location, as specified in a # line directive. + *

+ * Example: given the following source code in a file somefile.c + *

+ * \code + * #123 "dummy.c" 1 + *

+ * static int func(void) + * { + * return 0; + * } + * \endcode + *

+ * the location information returned by this function would be + *

+ * File: dummy.c Line: 124 Column: 12 + *

+ * whereas clang_getExpansionLocation would have returned + *

+ * File: somefile.c Line: 3 Column: 12 + *

+ * \param location the location within a source file that will be decomposed + * into its parts. + *

+ * \param filename [out] if non-NULL, will be set to the filename of the + * source location. Note that filenames returned will be for "virtual" files, + * which don't necessarily exist on the machine running clang - e.g. when + * parsing preprocessed output obtained from a different environment. If + * a non-NULL value is passed in, remember to dispose of the returned value + * using \c clang_disposeString() once you've finished with it. For an invalid + * source location, an empty string is returned. + *

+ * \param line [out] if non-NULL, will be set to the line number of the + * source location. For an invalid source location, zero is returned. + *

+ * \param column [out] if non-NULL, will be set to the column number of the + * source location. For an invalid source location, zero is returned. + */ @Generated @CFunction public static native void clang_getPresumedLocation(@ByValue CXSourceLocation location, @UncertainArgument("Options: reference, array Fallback: reference") CXString filename, IntPtr line, IntPtr column); + /** + * Legacy API to retrieve the file, line, column, and offset represented + * by the given source location. + *

+ * This interface has been replaced by the newer interface + * #clang_getExpansionLocation(). See that interface's documentation for + * details. + */ @Generated @CFunction public static native void clang_getInstantiationLocation(@ByValue CXSourceLocation location, Ptr file, IntPtr line, IntPtr column, IntPtr offset); + /** + * Retrieve the file, line, column, and offset represented by + * the given source location. + *

+ * If the location refers into a macro instantiation, return where the + * location was originally spelled in the source file. + *

+ * \param location the location within a source file that will be decomposed + * into its parts. + *

+ * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + *

+ * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + *

+ * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + *

+ * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ @Generated @CFunction public static native void clang_getSpellingLocation(@ByValue CXSourceLocation location, Ptr file, IntPtr line, IntPtr column, IntPtr offset); + /** + * Retrieve the file, line, column, and offset represented by + * the given source location. + *

+ * If the location refers into a macro expansion, return where the macro was + * expanded or where the macro argument was written, if the location points at + * a macro argument. + *

+ * \param location the location within a source file that will be decomposed + * into its parts. + *

+ * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + *

+ * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + *

+ * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + *

+ * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ @Generated @CFunction public static native void clang_getFileLocation(@ByValue CXSourceLocation location, Ptr file, IntPtr line, IntPtr column, IntPtr offset); + /** + * Retrieve a source location representing the first character within a + * source range. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getRangeStart(@ByValue CXSourceRange range); + /** + * Retrieve a source location representing the last character within a + * source range. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getRangeEnd(@ByValue CXSourceRange range); + /** + * Determine the number of diagnostics in a CXDiagnosticSet. + */ @Generated @CFunction public static native int clang_getNumDiagnosticsInSet(VoidPtr Diags); + /** + * Retrieve a diagnostic associated with the given CXDiagnosticSet. + *

+ * \param Diags the CXDiagnosticSet to query. + * \param Index the zero-based diagnostic number to retrieve. + *

+ * \returns the requested diagnostic. This diagnostic must be freed + * via a call to \c clang_disposeDiagnostic(). + */ @Generated @CFunction public static native VoidPtr clang_getDiagnosticInSet(VoidPtr Diags, int Index); + /** + * Deserialize a set of diagnostics from a Clang diagnostics bitcode + * file. + *

+ * \param file The name of the file to deserialize. + * \param error A pointer to a enum value recording if there was a problem + * deserializing the diagnostics. + * \param errorString A pointer to a CXString for recording the error string + * if the file was not successfully loaded. + *

+ * \returns A loaded CXDiagnosticSet if successful, and NULL otherwise. These + * diagnostics should be released using clang_disposeDiagnosticSet(). + */ @Generated @CFunction public static native VoidPtr clang_loadDiagnostics( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String file, IntPtr error, @UncertainArgument("Options: reference, array Fallback: reference") CXString errorString); + /** + * Release a CXDiagnosticSet and all of its contained diagnostics. + */ @Generated @CFunction public static native void clang_disposeDiagnosticSet(VoidPtr Diags); + /** + * Retrieve the child diagnostics of a CXDiagnostic. + *

+ * This CXDiagnosticSet does not need to be released by + * clang_disposeDiagnosticSet. + */ @Generated @CFunction public static native VoidPtr clang_getChildDiagnostics(VoidPtr D); + /** + * Determine the number of diagnostics produced for the given + * translation unit. + */ @Generated @CFunction public static native int clang_getNumDiagnostics(CXTranslationUnit Unit); + /** + * Retrieve a diagnostic associated with the given translation unit. + *

+ * \param Unit the translation unit to query. + * \param Index the zero-based diagnostic number to retrieve. + *

+ * \returns the requested diagnostic. This diagnostic must be freed + * via a call to \c clang_disposeDiagnostic(). + */ @Generated @CFunction public static native VoidPtr clang_getDiagnostic(CXTranslationUnit Unit, int Index); + /** + * Retrieve the complete set of diagnostics associated with a + * translation unit. + *

+ * \param Unit the translation unit to query. + */ @Generated @CFunction public static native VoidPtr clang_getDiagnosticSetFromTU(CXTranslationUnit Unit); + /** + * Destroy a diagnostic. + */ @Generated @CFunction public static native void clang_disposeDiagnostic(VoidPtr Diagnostic); + /** + * Format the given diagnostic in a manner that is suitable for display. + *

+ * This routine will format the given diagnostic to a string, rendering + * the diagnostic according to the various options given. The + * \c clang_defaultDiagnosticDisplayOptions() function returns the set of + * options that most closely mimics the behavior of the clang compiler. + *

+ * \param Diagnostic The diagnostic to print. + *

+ * \param Options A set of options that control the diagnostic display, + * created by combining \c CXDiagnosticDisplayOptions values. + *

+ * \returns A new string containing for formatted diagnostic. + */ @Generated @CFunction @ByValue public static native CXString clang_formatDiagnostic(VoidPtr Diagnostic, int Options); + /** + * Retrieve the set of display options most similar to the + * default behavior of the clang compiler. + *

+ * \returns A set of display options suitable for use with \c + * clang_formatDiagnostic(). + */ @Generated @CFunction public static native int clang_defaultDiagnosticDisplayOptions(); + /** + * Determine the severity of the given diagnostic. + */ @Generated @CFunction public static native int clang_getDiagnosticSeverity(VoidPtr arg1); + /** + * Retrieve the source location of the given diagnostic. + *

+ * This location is where Clang would print the caret ('^') when + * displaying the diagnostic on the command line. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getDiagnosticLocation(VoidPtr arg1); + /** + * Retrieve the text of the given diagnostic. + */ @Generated @CFunction @ByValue public static native CXString clang_getDiagnosticSpelling(VoidPtr arg1); + /** + * Retrieve the name of the command-line option that enabled this + * diagnostic. + *

+ * \param Diag The diagnostic to be queried. + *

+ * \param Disable If non-NULL, will be set to the option that disables this + * diagnostic (if any). + *

+ * \returns A string that contains the command-line option used to enable this + * warning, such as "-Wconversion" or "-pedantic". + */ @Generated @CFunction @ByValue public static native CXString clang_getDiagnosticOption(VoidPtr Diag, @UncertainArgument("Options: reference, array Fallback: reference") CXString Disable); + /** + * Retrieve the category number for this diagnostic. + *

+ * Diagnostics can be categorized into groups along with other, related + * diagnostics (e.g., diagnostics under the same warning flag). This routine + * retrieves the category number for the given diagnostic. + *

+ * \returns The number of the category that contains this diagnostic, or zero + * if this diagnostic is uncategorized. + */ @Generated @CFunction public static native int clang_getDiagnosticCategory(VoidPtr arg1); + /** + * Retrieve the name of a particular diagnostic category. This + * is now deprecated. Use clang_getDiagnosticCategoryText() + * instead. + *

+ * \param Category A diagnostic category number, as returned by + * \c clang_getDiagnosticCategory(). + *

+ * \returns The name of the given diagnostic category. + */ @Generated @Deprecated @CFunction @ByValue public static native CXString clang_getDiagnosticCategoryName(int Category); + /** + * Retrieve the diagnostic category text for a given diagnostic. + *

+ * \returns The text of the given diagnostic category. + */ @Generated @CFunction @ByValue public static native CXString clang_getDiagnosticCategoryText(VoidPtr arg1); + /** + * Determine the number of source ranges associated with the given + * diagnostic. + */ @Generated @CFunction public static native int clang_getDiagnosticNumRanges(VoidPtr arg1); + /** + * Retrieve a source range associated with the diagnostic. + *

+ * A diagnostic's source ranges highlight important elements in the source + * code. On the command line, Clang displays source ranges by + * underlining them with '~' characters. + *

+ * \param Diagnostic the diagnostic whose range is being extracted. + *

+ * \param Range the zero-based index specifying which range to + *

+ * \returns the requested source range. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_getDiagnosticRange(VoidPtr Diagnostic, int Range); + /** + * Determine the number of fix-it hints associated with the + * given diagnostic. + */ @Generated @CFunction public static native int clang_getDiagnosticNumFixIts(VoidPtr Diagnostic); + /** + * Retrieve the replacement information for a given fix-it. + *

+ * Fix-its are described in terms of a source range whose contents + * should be replaced by a string. This approach generalizes over + * three kinds of operations: removal of source code (the range covers + * the code to be removed and the replacement string is empty), + * replacement of source code (the range covers the code to be + * replaced and the replacement string provides the new code), and + * insertion (both the start and end of the range point at the + * insertion location, and the replacement string provides the text to + * insert). + *

+ * \param Diagnostic The diagnostic whose fix-its are being queried. + *

+ * \param FixIt The zero-based index of the fix-it. + *

+ * \param ReplacementRange The source range whose contents will be + * replaced with the returned replacement string. Note that source + * ranges are half-open ranges [a, b), so the source code should be + * replaced from a and up to (but not including) b. + *

+ * \returns A string containing text that should be replace the source + * code indicated by the \c ReplacementRange. + */ @Generated @CFunction @ByValue public static native CXString clang_getDiagnosticFixIt(VoidPtr Diagnostic, int FixIt, @UncertainArgument("Options: reference, array Fallback: reference") CXSourceRange ReplacementRange); + /** + * Get the original translation unit source file name. + */ @Generated @CFunction @ByValue public static native CXString clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); + /** + * Return the CXTranslationUnit for a given source file and the provided + * command line arguments one would pass to the compiler. + *

+ * Note: The 'source_filename' argument is optional. If the caller provides a + * NULL pointer, the name of the source file is expected to reside in the + * specified command line arguments. + *

+ * Note: When encountered in 'clang_command_line_args', the following options + * are ignored: + *

+ * '-c' + * '-emit-ast' + * '-fsyntax-only' + * '-o \' (both '-o' and '\' are ignored) + *

+ * \param CIdx The index object with which the translation unit will be + * associated. + *

+ * \param source_filename The name of the source file to load, or NULL if the + * source file is included in \p clang_command_line_args. + *

+ * \param num_clang_command_line_args The number of command-line arguments in + * \p clang_command_line_args. + *

+ * \param clang_command_line_args The command-line arguments that would be + * passed to the \c clang executable if it were being invoked out-of-process. + * These command-line options will be parsed and will affect how the translation + * unit is parsed. Note that the following options are ignored: '-c', + * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \'. + *

+ * \param num_unsaved_files the number of unsaved file entries in \p + * unsaved_files. + *

+ * \param unsaved_files the files that have not yet been saved to disk + * but may be required for code completion, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + */ @Generated @CFunction public static native CXTranslationUnit clang_createTranslationUnitFromSourceFile(VoidPtr CIdx, @@ -345,15 +786,39 @@ public static native CXTranslationUnit clang_createTranslationUnitFromSourceFile int num_unsaved_files, @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files); + /** + * Same as \c clang_createTranslationUnit2, but returns + * the \c CXTranslationUnit instead of an error code. In case of an error this + * routine returns a \c NULL \c CXTranslationUnit, without further detailed + * error codes. + */ @Generated @CFunction public static native CXTranslationUnit clang_createTranslationUnit(VoidPtr CIdx, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String ast_filename); + /** + * Returns the set of flags that is suitable for parsing a translation + * unit that is being edited. + *

+ * The set of flags returned provide options for \c clang_parseTranslationUnit() + * to indicate that the translation unit is likely to be reparsed many times, + * either explicitly (via \c clang_reparseTranslationUnit()) or implicitly + * (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag + * set contains an unspecified set of optimizations (e.g., the precompiled + * preamble) geared toward improving the performance of these routines. The + * set of optimizations enabled may change from one version to the next. + */ @Generated @CFunction public static native int clang_defaultEditingTranslationUnitOptions(); + /** + * Same as \c clang_parseTranslationUnit2, but returns + * the \c CXTranslationUnit instead of an error code. In case of an error this + * routine returns a \c NULL \c CXTranslationUnit, without further detailed + * error codes. + */ @Generated @CFunction public static native CXTranslationUnit clang_parseTranslationUnit(VoidPtr CIdx, @@ -363,35 +828,127 @@ public static native CXTranslationUnit clang_parseTranslationUnit(VoidPtr CIdx, @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files, int num_unsaved_files, int options); + /** + * Returns the set of flags that is suitable for saving a translation + * unit. + *

+ * The set of flags returned provide options for + * \c clang_saveTranslationUnit() by default. The returned flag + * set contains an unspecified set of options that save translation units with + * the most commonly-requested data. + */ @Generated @CFunction public static native int clang_defaultSaveOptions(CXTranslationUnit TU); + /** + * Saves a translation unit into a serialized representation of + * that translation unit on disk. + *

+ * Any translation unit that was parsed without error can be saved + * into a file. The translation unit can then be deserialized into a + * new \c CXTranslationUnit with \c clang_createTranslationUnit() or, + * if it is an incomplete translation unit that corresponds to a + * header, used as a precompiled header when parsing other translation + * units. + *

+ * \param TU The translation unit to save. + *

+ * \param FileName The file to which the translation unit will be saved. + *

+ * \param options A bitmask of options that affects how the translation unit + * is saved. This should be a bitwise OR of the + * CXSaveTranslationUnit_XXX flags. + *

+ * \returns A value that will match one of the enumerators of the CXSaveError + * enumeration. Zero (CXSaveError_None) indicates that the translation unit was + * saved successfully, while a non-zero value indicates that a problem occurred. + */ @Generated @CFunction public static native int clang_saveTranslationUnit(CXTranslationUnit TU, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String FileName, int options); + /** + * Destroy the specified CXTranslationUnit object. + */ @Generated @CFunction public static native void clang_disposeTranslationUnit(CXTranslationUnit arg1); + /** + * Returns the set of flags that is suitable for reparsing a translation + * unit. + *

+ * The set of flags returned provide options for + * \c clang_reparseTranslationUnit() by default. The returned flag + * set contains an unspecified set of optimizations geared toward common uses + * of reparsing. The set of optimizations enabled may change from one version + * to the next. + */ @Generated @CFunction public static native int clang_defaultReparseOptions(CXTranslationUnit TU); + /** + * Reparse the source files that produced this translation unit. + *

+ * This routine can be used to re-parse the source files that originally + * created the given translation unit, for example because those source files + * have changed (either on disk or as passed via \p unsaved_files). The + * source code will be reparsed with the same command-line options as it + * was originally parsed. + *

+ * Reparsing a translation unit invalidates all cursors and source locations + * that refer into that translation unit. This makes reparsing a translation + * unit semantically equivalent to destroying the translation unit and then + * creating a new translation unit with the same command-line arguments. + * However, it may be more efficient to reparse a translation + * unit using this routine. + *

+ * \param TU The translation unit whose contents will be re-parsed. The + * translation unit must originally have been built with + * \c clang_createTranslationUnitFromSourceFile(). + *

+ * \param num_unsaved_files The number of unsaved file entries in \p + * unsaved_files. + *

+ * \param unsaved_files The files that have not yet been saved to disk + * but may be required for parsing, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + *

+ * \param options A bitset of options composed of the flags in CXReparse_Flags. + * The function \c clang_defaultReparseOptions() produces a default set of + * options recommended for most uses, based on the translation unit. + *

+ * \returns 0 if the sources could be reparsed. A non-zero error code will be + * returned if reparsing was impossible, such that the translation unit is + * invalid. In such cases, the only valid call for \c TU is + * \c clang_disposeTranslationUnit(TU). The error codes returned by this + * routine are described by the \c CXErrorCode enum. + */ @Generated @CFunction public static native int clang_reparseTranslationUnit(CXTranslationUnit TU, int num_unsaved_files, @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files, int options); + /** + * Returns the human-readable null-terminated C string that represents + * the name of the memory category. This string should never be freed. + */ @Generated @CFunction @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") public static native String clang_getTUResourceUsageName(int kind); + /** + * Return the memory usage of a translation unit. This object + * should be released with clang_disposeCXTUResourceUsage(). + */ @Generated @CFunction @ByValue @@ -401,76 +958,180 @@ public static native int clang_reparseTranslationUnit(CXTranslationUnit TU, int @CFunction public static native void clang_disposeCXTUResourceUsage(@ByValue CXTUResourceUsage usage); + /** + * Retrieve the NULL cursor, which represents no entity. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getNullCursor(); + /** + * Retrieve the cursor that represents the given translation unit. + *

+ * The translation unit cursor can be used to start traversing the + * various declarations within the given translation unit. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getTranslationUnitCursor(CXTranslationUnit arg1); + /** + * Determine whether two cursors are equivalent. + */ @Generated @CFunction public static native int clang_equalCursors(@ByValue CXCursor arg1, @ByValue CXCursor arg2); + /** + * Returns non-zero if \p cursor is null. + */ @Generated @CFunction public static native int clang_Cursor_isNull(@ByValue CXCursor cursor); + /** + * Compute a hash value for the given cursor. + */ @Generated @CFunction public static native int clang_hashCursor(@ByValue CXCursor arg1); + /** + * Retrieve the kind of the given cursor. + */ @Generated @CFunction public static native int clang_getCursorKind(@ByValue CXCursor arg1); + /** + * Determine whether the given cursor kind represents a declaration. + */ @Generated @CFunction public static native int clang_isDeclaration(int arg1); + /** + * Determine whether the given cursor kind represents a simple + * reference. + *

+ * Note that other kinds of cursors (such as expressions) can also refer to + * other cursors. Use clang_getCursorReferenced() to determine whether a + * particular cursor refers to another entity. + */ @Generated @CFunction public static native int clang_isReference(int arg1); + /** + * Determine whether the given cursor kind represents an expression. + */ @Generated @CFunction public static native int clang_isExpression(int arg1); + /** + * Determine whether the given cursor kind represents a statement. + */ @Generated @CFunction public static native int clang_isStatement(int arg1); + /** + * Determine whether the given cursor kind represents an attribute. + */ @Generated @CFunction public static native int clang_isAttribute(int arg1); + /** + * Determine whether the given cursor kind represents an invalid + * cursor. + */ @Generated @CFunction public static native int clang_isInvalid(int arg1); + /** + * Determine whether the given cursor kind represents a translation + * unit. + */ @Generated @CFunction public static native int clang_isTranslationUnit(int arg1); + /** + * Determine whether the given cursor represents a preprocessing + * element, such as a preprocessor directive or macro instantiation. + */ @Generated @CFunction public static native int clang_isPreprocessing(int arg1); + /** + * Determine whether the given cursor represents a currently + * unexposed piece of the AST (e.g., CXCursor_UnexposedStmt). + */ @Generated @CFunction public static native int clang_isUnexposed(int arg1); + /** + * Determine the linkage of the entity referred to by a given cursor. + */ @Generated @CFunction public static native int clang_getCursorLinkage(@ByValue CXCursor cursor); + /** + * Determine the availability of the entity that this cursor refers to, + * taking the current target platform into account. + *

+ * \param cursor The cursor to query. + *

+ * \returns The availability of the cursor. + */ @Generated @CFunction public static native int clang_getCursorAvailability(@ByValue CXCursor cursor); + /** + * Determine the availability of the entity that this cursor refers to + * on any platforms for which availability information is known. + *

+ * \param cursor The cursor to query. + *

+ * \param always_deprecated If non-NULL, will be set to indicate whether the + * entity is deprecated on all platforms. + *

+ * \param deprecated_message If non-NULL, will be set to the message text + * provided along with the unconditional deprecation of this entity. The client + * is responsible for deallocating this string. + *

+ * \param always_unavailable If non-NULL, will be set to indicate whether the + * entity is unavailable on all platforms. + *

+ * \param unavailable_message If non-NULL, will be set to the message text + * provided along with the unconditional unavailability of this entity. The + * client is responsible for deallocating this string. + *

+ * \param availability If non-NULL, an array of CXPlatformAvailability instances + * that will be populated with platform availability information, up to either + * the number of platforms for which availability information is available (as + * returned by this function) or \c availability_size, whichever is smaller. + *

+ * \param availability_size The number of elements available in the + * \c availability array. + *

+ * \returns The number of platforms (N) for which availability information is + * available (which is unrelated to \c availability_size). + *

+ * Note that the client is responsible for calling + * \c clang_disposeCXPlatformAvailability to free each of the + * platform-availability structures returned. There are + * \c min(N, availability_size) such structures. + */ @Generated @CFunction public static native int clang_getCursorPlatformAvailability(@ByValue CXCursor cursor, IntPtr always_deprecated, @@ -480,279 +1141,744 @@ public static native int clang_getCursorPlatformAvailability(@ByValue CXCursor c @UncertainArgument("Options: reference, array Fallback: reference") CXPlatformAvailability availability, int availability_size); + /** + * Free the memory associated with a \c CXPlatformAvailability structure. + */ @Generated @CFunction public static native void clang_disposeCXPlatformAvailability( @UncertainArgument("Options: reference, array Fallback: reference") CXPlatformAvailability availability); + /** + * Determine the "language" of the entity referred to by a given cursor. + */ @Generated @CFunction public static native int clang_getCursorLanguage(@ByValue CXCursor cursor); + /** + * Returns the translation unit that a cursor originated from. + */ @Generated @CFunction public static native CXTranslationUnit clang_Cursor_getTranslationUnit(@ByValue CXCursor arg1); + /** + * Creates an empty CXCursorSet. + */ @Generated @CFunction public static native CXCursorSet clang_createCXCursorSet(); + /** + * Disposes a CXCursorSet and releases its associated memory. + */ @Generated @CFunction public static native 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. + */ @Generated @CFunction public static native int clang_CXCursorSet_contains(CXCursorSet cset, @ByValue CXCursor cursor); + /** + * Inserts a CXCursor into a CXCursorSet. + *

+ * \returns zero if the CXCursor was already in the set, and non-zero otherwise. + */ @Generated @CFunction public static native int clang_CXCursorSet_insert(CXCursorSet cset, @ByValue CXCursor cursor); + /** + * Determine the semantic parent of the given cursor. + *

+ * The semantic parent of a cursor is the cursor that semantically contains + * the given \p cursor. For many declarations, the lexical and semantic parents + * are equivalent (the lexical parent is returned by + * \c clang_getCursorLexicalParent()). They diverge when declarations or + * definitions are provided out-of-line. For example: + *

+ * \code + * class C { + * void f(); + * }; + *

+ * void C::f() { } + * \endcode + *

+ * In the out-of-line definition of \c C::f, the semantic parent is + * the class \c C, of which this function is a member. The lexical parent is + * the place where the declaration actually occurs in the source code; in this + * case, the definition occurs in the translation unit. In general, the + * lexical parent for a given entity can change without affecting the semantics + * of the program, and the lexical parent of different declarations of the + * same entity may be different. Changing the semantic parent of a declaration, + * on the other hand, can have a major impact on semantics, and redeclarations + * of a particular entity should all have the same semantic context. + *

+ * In the example above, both declarations of \c C::f have \c C as their + * semantic context, while the lexical context of the first \c C::f is \c C + * and the lexical context of the second \c C::f is the translation unit. + *

+ * For global declarations, the semantic parent is the translation unit. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getCursorSemanticParent(@ByValue CXCursor cursor); + /** + * Determine the lexical parent of the given cursor. + *

+ * The lexical parent of a cursor is the cursor in which the given \p cursor + * was actually written. For many declarations, the lexical and semantic parents + * are equivalent (the semantic parent is returned by + * \c clang_getCursorSemanticParent()). They diverge when declarations or + * definitions are provided out-of-line. For example: + *

+ * \code + * class C { + * void f(); + * }; + *

+ * void C::f() { } + * \endcode + *

+ * In the out-of-line definition of \c C::f, the semantic parent is + * the class \c C, of which this function is a member. The lexical parent is + * the place where the declaration actually occurs in the source code; in this + * case, the definition occurs in the translation unit. In general, the + * lexical parent for a given entity can change without affecting the semantics + * of the program, and the lexical parent of different declarations of the + * same entity may be different. Changing the semantic parent of a declaration, + * on the other hand, can have a major impact on semantics, and redeclarations + * of a particular entity should all have the same semantic context. + *

+ * In the example above, both declarations of \c C::f have \c C as their + * semantic context, while the lexical context of the first \c C::f is \c C + * and the lexical context of the second \c C::f is the translation unit. + *

+ * For declarations written in the global scope, the lexical parent is + * the translation unit. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getCursorLexicalParent(@ByValue CXCursor cursor); + /** + * Determine the set of methods that are overridden by the given + * method. + *

+ * In both Objective-C and C++, a method (aka virtual member function, + * in C++) can override a virtual method in a base class. For + * Objective-C, a method is said to override any method in the class's + * base class, its protocols, or its categories' protocols, that has the same + * selector and is of the same kind (class or instance). + * If no such method exists, the search continues to the class's superclass, + * its protocols, and its categories, and so on. A method from an Objective-C + * implementation is considered to override the same methods as its + * corresponding method in the interface. + *

+ * For C++, a virtual member function overrides any virtual member + * function with the same signature that occurs in its base + * classes. With multiple inheritance, a virtual member function can + * override several virtual member functions coming from different + * base classes. + *

+ * In all cases, this function determines the immediate overridden + * method, rather than all of the overridden methods. For example, if + * a method is originally declared in a class A, then overridden in B + * (which in inherits from A) and also in C (which inherited from B), + * then the only overridden method returned from this function when + * invoked on C's method will be B's method. The client may then + * invoke this function again, given the previously-found overridden + * methods, to map out the complete method-override set. + *

+ * \param cursor A cursor representing an Objective-C or C++ + * method. This routine will compute the set of methods that this + * method overrides. + *

+ * \param overridden A pointer whose pointee will be replaced with a + * pointer to an array of cursors, representing the set of overridden + * methods. If there are no overridden methods, the pointee will be + * set to NULL. The pointee must be freed via a call to + * \c clang_disposeOverriddenCursors(). + *

+ * \param num_overridden A pointer to the number of overridden + * functions, will be set to the number of overridden functions in the + * array pointed to by \p overridden. + */ @Generated @CFunction public static native void clang_getOverriddenCursors(@ByValue CXCursor cursor, Ptr> overridden, IntPtr num_overridden); + /** + * Free the set of overridden cursors returned by \c + * clang_getOverriddenCursors(). + */ @Generated @CFunction public static native void clang_disposeOverriddenCursors( @UncertainArgument("Options: reference, array Fallback: reference") CXCursor overridden); + /** + * Retrieve the file that is included by the given inclusion directive + * cursor. + */ @Generated @CFunction public static native VoidPtr clang_getIncludedFile(@ByValue CXCursor cursor); + /** + * Map a source location to the cursor that describes the entity at that + * location in the source code. + *

+ * clang_getCursor() maps an arbitrary source location within a translation + * unit down to the most specific cursor that describes the entity at that + * location. For example, given an expression \c x + y, invoking + * clang_getCursor() with a source location pointing to "x" will return the + * cursor for "x"; similarly for "y". If the cursor points anywhere between + * "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor() + * will return a cursor referring to the "+" expression. + *

+ * \returns a cursor representing the entity at the given source location, or + * a NULL cursor if no such entity can be found. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getCursor(CXTranslationUnit arg1, @ByValue CXSourceLocation arg2); + /** + * Retrieve the physical location of the source constructor referenced + * by the given cursor. + *

+ * The location of a declaration is typically the location of the name of that + * declaration, where the name of that declaration would occur if it is + * unnamed, or some keyword that introduces that particular declaration. + * The location of a reference is where that reference occurs within the + * source code. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getCursorLocation(@ByValue CXCursor arg1); + /** + * Retrieve the physical extent of the source construct referenced by + * the given cursor. + *

+ * The extent of a cursor starts with the file/line/column pointing at the + * first character within the source construct that the cursor refers to and + * ends with the last character within that source construct. For a + * declaration, the extent covers the declaration itself. For a reference, + * the extent covers the location of the reference (e.g., where the referenced + * entity was actually used). + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_getCursorExtent(@ByValue CXCursor arg1); + /** + * Retrieve the type of a CXCursor (if any). + */ @Generated @CFunction @ByValue public static native CXType clang_getCursorType(@ByValue CXCursor C); + /** + * Pretty-print the underlying type using the rules of the + * language of the translation unit from which it came. + *

+ * If the type is invalid, an empty string is returned. + */ @Generated @CFunction @ByValue public static native CXString clang_getTypeSpelling(@ByValue CXType CT); + /** + * Retrieve the underlying type of a typedef declaration. + *

+ * If the cursor does not reference a typedef declaration, an invalid type is + * returned. + */ @Generated @CFunction @ByValue public static native CXType clang_getTypedefDeclUnderlyingType(@ByValue CXCursor C); + /** + * Retrieve the integer type of an enum declaration. + *

+ * If the cursor does not reference an enum declaration, an invalid type is + * returned. + */ @Generated @CFunction @ByValue public static native CXType clang_getEnumDeclIntegerType(@ByValue 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. + */ @Generated @CFunction public static native long clang_getEnumConstantDeclValue(@ByValue 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. + */ @Generated @CFunction public static native long clang_getEnumConstantDeclUnsignedValue(@ByValue CXCursor C); + /** + * Retrieve the bit width of a bit field declaration as an integer. + *

+ * If a cursor that is not a bit field declaration is passed in, -1 is returned. + */ @Generated @CFunction public static native int clang_getFieldDeclBitWidth(@ByValue CXCursor C); + /** + * Retrieve the number of non-variadic arguments associated with a given + * cursor. + *

+ * The number of arguments can be determined for calls as well as for + * declarations of functions or methods. For other cursors -1 is returned. + */ @Generated @CFunction public static native int clang_Cursor_getNumArguments(@ByValue CXCursor C); + /** + * Retrieve the argument cursor of a function or method. + *

+ * The argument cursor can be determined for calls as well as for declarations + * of functions or methods. For other cursors and for invalid indices, an + * invalid cursor is returned. + */ @Generated @CFunction @ByValue public static native CXCursor clang_Cursor_getArgument(@ByValue CXCursor C, int i); + /** + * Determine whether two CXTypes represent the same type. + *

+ * \returns non-zero if the CXTypes represent the same type and + * zero otherwise. + */ @Generated @CFunction public static native int clang_equalTypes(@ByValue CXType A, @ByValue CXType B); + /** + * Return the canonical type for a CXType. + *

+ * Clang's type system explicitly models typedefs and all the ways + * a specific type can be represented. The canonical type is the underlying + * type with all the "sugar" removed. For example, if 'T' is a typedef + * for 'int', the canonical type for 'T' would be 'int'. + */ @Generated @CFunction @ByValue public static native CXType clang_getCanonicalType(@ByValue CXType T); + /** + * Determine whether a CXType has the "const" qualifier set, + * without looking through typedefs that may have added "const" at a + * different level. + */ @Generated @CFunction public static native int clang_isConstQualifiedType(@ByValue CXType T); + /** + * Determine whether a CXType has the "volatile" qualifier set, + * without looking through typedefs that may have added "volatile" at + * a different level. + */ @Generated @CFunction public static native int clang_isVolatileQualifiedType(@ByValue CXType T); + /** + * Determine whether a CXType has the "restrict" qualifier set, + * without looking through typedefs that may have added "restrict" at a + * different level. + */ @Generated @CFunction public static native int clang_isRestrictQualifiedType(@ByValue CXType T); + /** + * For pointer types, returns the type of the pointee. + */ @Generated @CFunction @ByValue public static native CXType clang_getPointeeType(@ByValue CXType T); + /** + * Return the cursor for the declaration of the given type. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getTypeDeclaration(@ByValue CXType T); + /** + * Returns the Objective-C type encoding for the specified declaration. + */ @Generated @CFunction @ByValue public static native CXString clang_getDeclObjCTypeEncoding(@ByValue CXCursor C); + /** + * Retrieve the spelling of a given CXTypeKind. + */ @Generated @CFunction @ByValue public static native CXString clang_getTypeKindSpelling(int K); + /** + * Retrieve the calling convention associated with a function type. + *

+ * If a non-function type is passed in, CXCallingConv_Invalid is returned. + */ @Generated @CFunction public static native int clang_getFunctionTypeCallingConv(@ByValue CXType T); + /** + * Retrieve the return type associated with a function type. + *

+ * If a non-function type is passed in, an invalid type is returned. + */ @Generated @CFunction @ByValue public static native CXType clang_getResultType(@ByValue CXType T); + /** + * Retrieve the number of non-variadic parameters associated with a + * function type. + *

+ * If a non-function type is passed in, -1 is returned. + */ @Generated @CFunction public static native int clang_getNumArgTypes(@ByValue CXType T); + /** + * Retrieve the type of a parameter of a function type. + *

+ * If a non-function type is passed in or the function does not have enough + * parameters, an invalid type is returned. + */ @Generated @CFunction @ByValue public static native CXType clang_getArgType(@ByValue CXType T, int i); + /** + * Return 1 if the CXType is a variadic function type, and 0 otherwise. + */ @Generated @CFunction public static native int clang_isFunctionTypeVariadic(@ByValue CXType T); + /** + * Retrieve the return type associated with a given cursor. + *

+ * This only returns a valid type if the cursor refers to a function or method. + */ @Generated @CFunction @ByValue public static native CXType clang_getCursorResultType(@ByValue CXCursor C); + /** + * Return 1 if the CXType is a POD (plain old data) type, and 0 + * otherwise. + */ @Generated @CFunction public static native int clang_isPODType(@ByValue CXType T); + /** + * Return the element type of an array, complex, or vector type. + *

+ * If a type is passed in that is not an array, complex, or vector type, + * an invalid type is returned. + */ @Generated @CFunction @ByValue public static native CXType clang_getElementType(@ByValue CXType T); + /** + * Return the number of elements of an array or vector type. + *

+ * If a type is passed in that is not an array or vector type, + * -1 is returned. + */ @Generated @CFunction public static native long clang_getNumElements(@ByValue CXType T); + /** + * Return the element type of an array type. + *

+ * If a non-array type is passed in, an invalid type is returned. + */ @Generated @CFunction @ByValue public static native CXType clang_getArrayElementType(@ByValue CXType T); + /** + * Return the array size of a constant array. + *

+ * If a non-array type is passed in, -1 is returned. + */ @Generated @CFunction public static native long clang_getArraySize(@ByValue CXType T); + /** + * Retrieve the type named by the qualified-id. + *

+ * If a non-elaborated type is passed in, an invalid type is returned. + */ @Generated @CFunction @ByValue public static native CXType clang_Type_getNamedType(@ByValue CXType T); + /** + * Return the alignment of a type in bytes as per C++[expr.alignof] + * standard. + *

+ * If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. + * If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete + * is returned. + * If the type declaration is a dependent type, CXTypeLayoutError_Dependent is + * returned. + * If the type declaration is not a constant size type, + * CXTypeLayoutError_NotConstantSize is returned. + */ @Generated @CFunction public static native long clang_Type_getAlignOf(@ByValue CXType T); + /** + * Return the class type of an member pointer type. + *

+ * If a non-member-pointer type is passed in, an invalid type is returned. + */ @Generated @CFunction @ByValue public static native CXType clang_Type_getClassType(@ByValue CXType T); + /** + * Return the size of a type in bytes as per C++[expr.sizeof] standard. + *

+ * If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. + * If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete + * is returned. + * If the type declaration is a dependent type, CXTypeLayoutError_Dependent is + * returned. + */ @Generated @CFunction public static native long clang_Type_getSizeOf(@ByValue CXType T); + /** + * Return the offset of a field named S in a record of type T in bits + * as it would be returned by __offsetof__ as per C++11[18.2p4] + *

+ * If the cursor is not a record field declaration, CXTypeLayoutError_Invalid + * is returned. + * If the field's type declaration is an incomplete type, + * CXTypeLayoutError_Incomplete is returned. + * If the field's type declaration is a dependent type, + * CXTypeLayoutError_Dependent is returned. + * If the field's name S is not found, + * CXTypeLayoutError_InvalidFieldName is returned. + */ @Generated @CFunction public static native long clang_Type_getOffsetOf(@ByValue CXType T, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String S); + /** + * 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. + */ @Generated @CFunction public static native int clang_Type_getCXXRefQualifier(@ByValue CXType T); + /** + * Returns non-zero if the cursor specifies a Record member that is a + * bitfield. + */ @Generated @CFunction public static native int clang_Cursor_isBitField(@ByValue CXCursor C); + /** + * Returns 1 if the base class specified by the cursor with kind + * CX_CXXBaseSpecifier is virtual. + */ @Generated @CFunction public static native int clang_isVirtualBase(@ByValue CXCursor arg1); + /** + * 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. + */ @Generated @CFunction public static native int clang_getCXXAccessSpecifier(@ByValue CXCursor arg1); + /** + * Determine the number of overloaded declarations referenced by a + * \c CXCursor_OverloadedDeclRef cursor. + *

+ * \param cursor The cursor whose overloaded declarations are being queried. + *

+ * \returns The number of overloaded declarations referenced by \c cursor. If it + * is not a \c CXCursor_OverloadedDeclRef cursor, returns 0. + */ @Generated @CFunction public static native int clang_getNumOverloadedDecls(@ByValue CXCursor cursor); + /** + * Retrieve a cursor for one of the overloaded declarations referenced + * by a \c CXCursor_OverloadedDeclRef cursor. + *

+ * \param cursor The cursor whose overloaded declarations are being queried. + *

+ * \param index The zero-based index into the set of overloaded declarations in + * the cursor. + *

+ * \returns A cursor representing the declaration referenced by the given + * \c cursor at the specified \c index. If the cursor does not have an + * associated set of overloaded declarations, or if the index is out of bounds, + * returns \c clang_getNullCursor(); + */ @Generated @CFunction @ByValue public static native CXCursor clang_getOverloadedDecl(@ByValue CXCursor cursor, int index); + /** + * For cursors representing an iboutletcollection attribute, + * this function returns the collection element type. + */ @Generated @CFunction @ByValue public static native CXType clang_getIBOutletCollectionType(@ByValue CXCursor arg1); + /** + * Visit the children of a particular cursor. + *

+ * This function visits all the direct children of the given cursor, + * invoking the given \p visitor function with the cursors of each + * visited child. The traversal may be recursive, if the visitor returns + * \c CXChildVisit_Recurse. The traversal may also be ended prematurely, if + * the visitor returns \c CXChildVisit_Break. + *

+ * \param parent the cursor whose child may be visited. All kinds of + * cursors can be visited, including invalid cursors (which, by + * definition, have no children). + *

+ * \param visitor the visitor function that will be invoked for each + * child of \p parent. + *

+ * \param client_data pointer data supplied by the client, which will + * be passed to the visitor each time it is invoked. + *

+ * \returns a non-zero value if the traversal was terminated + * prematurely by the visitor returning \c CXChildVisit_Break. + */ @Generated @CFunction public static native int clang_visitChildren(@ByValue CXCursor parent, @FunctionPtr(name = "call_clang_visitChildren") Function_clang_visitChildren visitor, VoidPtr client_data); + /** + * Visits the children of a cursor using the specified block. Behaves + * identically to clang_visitChildren() in all other respects. + */ @Generated @CFunction public static native int clang_visitChildrenWithBlock(@ByValue CXCursor parent, @ObjCBlock(name = "call_clang_visitChildrenWithBlock") Block_clang_visitChildrenWithBlock block); + /** + * Retrieve a Unified Symbol Resolution (USR) for the entity referenced + * by the given cursor. + *

+ * A Unified Symbol Resolution (USR) is a string that identifies a particular + * entity (function, class, variable, etc.) within a program. USRs can be + * compared across translation units to determine, e.g., when references in + * one translation refer to an entity defined in another translation unit. + */ @Generated @CFunction @ByValue public static native CXString clang_getCursorUSR(@ByValue CXCursor arg1); + /** + * Construct a USR for a specified Objective-C class. + */ @Generated @CFunction @ByValue public static native CXString clang_constructUSR_ObjCClass( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String class_name); + /** + * Construct a USR for a specified Objective-C category. + */ @Generated @CFunction @ByValue @@ -760,12 +1886,19 @@ public static native CXString clang_constructUSR_ObjCCategory( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String class_name, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String category_name); + /** + * Construct a USR for a specified Objective-C protocol. + */ @Generated @CFunction @ByValue public static native CXString clang_constructUSR_ObjCProtocol( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String protocol_name); + /** + * Construct a USR for a specified Objective-C instance variable and + * the USR for its containing class. + */ @Generated @CFunction @ByValue @@ -773,6 +1906,10 @@ public static native CXString clang_constructUSR_ObjCIvar( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String name, @ByValue CXString classUSR); + /** + * Construct a USR for a specified Objective-C method and + * the USR for its containing class. + */ @Generated @CFunction @ByValue @@ -780,6 +1917,10 @@ public static native CXString clang_constructUSR_ObjCMethod( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String name, int isInstanceMethod, @ByValue CXString classUSR); + /** + * Construct a USR for a specified Objective-C property and the USR + * for its containing class. + */ @Generated @CFunction @ByValue @@ -787,54 +1928,175 @@ public static native CXString clang_constructUSR_ObjCProperty( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String property, @ByValue CXString classUSR); + /** + * Retrieve a name for the entity referenced by this cursor. + */ @Generated @CFunction @ByValue public static native CXString clang_getCursorSpelling(@ByValue CXCursor arg1); + /** + * Retrieve a range for a piece that forms the cursors spelling name. + * Most of the times there is only one range for the complete spelling but for + * Objective-C methods and Objective-C message expressions, there are multiple + * pieces for each selector identifier. + *

+ * \param pieceIndex the index of the spelling name piece. If this is greater + * than the actual number of pieces, it will return a NULL (invalid) range. + *

+ * \param options Reserved. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_Cursor_getSpellingNameRange(@ByValue CXCursor arg1, int pieceIndex, int options); + /** + * Retrieve the display name for the entity referenced by this cursor. + *

+ * The display name contains extra information that helps identify the cursor, + * such as the parameters of a function or template or the arguments of a + * class template specialization. + */ @Generated @CFunction @ByValue public static native CXString clang_getCursorDisplayName(@ByValue CXCursor arg1); + /** + * For a cursor that is a reference, retrieve a cursor representing the + * entity that it references. + *

+ * Reference cursors refer to other entities in the AST. For example, an + * Objective-C superclass reference cursor refers to an Objective-C class. + * This function produces the cursor for the Objective-C class from the + * cursor for the superclass reference. If the input cursor is a declaration or + * definition, it returns that declaration or definition unchanged. + * Otherwise, returns the NULL cursor. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getCursorReferenced(@ByValue CXCursor arg1); + /** + * For a cursor that is either a reference to or a declaration + * of some entity, retrieve a cursor that describes the definition of + * that entity. + *

+ * Some entities can be declared multiple times within a translation + * unit, but only one of those declarations can also be a + * definition. For example, given: + *

+ * \code + * int f(int, int); + * int g(int x, int y) { return f(x, y); } + * int f(int a, int b) { return a + b; } + * int f(int, int); + * \endcode + *

+ * there are three declarations of the function "f", but only the + * second one is a definition. The clang_getCursorDefinition() + * function will take any cursor pointing to a declaration of "f" + * (the first or fourth lines of the example) or a cursor referenced + * that uses "f" (the call to "f' inside "g") and will return a + * declaration cursor pointing to the definition (the second "f" + * declaration). + *

+ * If given a cursor for which there is no corresponding definition, + * e.g., because there is no definition of that entity within this + * translation unit, returns a NULL cursor. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getCursorDefinition(@ByValue CXCursor arg1); + /** + * Determine whether the declaration pointed to by this cursor + * is also a definition of that entity. + */ @Generated @CFunction public static native int clang_isCursorDefinition(@ByValue CXCursor arg1); + /** + * Retrieve the canonical cursor corresponding to the given cursor. + *

+ * In the C family of languages, many kinds of entities can be declared several + * times within a single translation unit. For example, a structure type can + * be forward-declared (possibly multiple times) and later defined: + *

+ * \code + * struct X; + * struct X; + * struct X { + * int member; + * }; + * \endcode + *

+ * The declarations and the definition of \c X are represented by three + * different cursors, all of which are declarations of the same underlying + * entity. One of these cursor is considered the "canonical" cursor, which + * is effectively the representative for the underlying entity. One can + * determine if two cursors are declarations of the same underlying entity by + * comparing their canonical cursors. + *

+ * \returns The canonical cursor for the entity referred to by the given cursor. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getCanonicalCursor(@ByValue CXCursor arg1); + /** + * If the cursor points to a selector identifier in an Objective-C + * method or message expression, this returns the selector index. + *

+ * After getting a cursor with #clang_getCursor, this can be called to + * determine if the location points to a selector identifier. + *

+ * \returns The selector index if the cursor is an Objective-C method or message + * expression and the cursor is pointing to a selector identifier, or -1 + * otherwise. + */ @Generated @CFunction public static native int clang_Cursor_getObjCSelectorIndex(@ByValue CXCursor arg1); + /** + * Given a cursor pointing to a C++ method call or an Objective-C + * message, returns non-zero if the method/message is "dynamic", meaning: + *

+ * For a C++ method: the call is virtual. + * For an Objective-C message: the receiver is an object instance, not 'super' + * or a specific class. + *

+ * If the method/message is "static" or the cursor does not point to a + * method/message, it will return zero. + */ @Generated @CFunction public static native int clang_Cursor_isDynamicCall(@ByValue CXCursor C); + /** + * Given a cursor pointing to an Objective-C message or property + * reference, or C++ method call, returns the CXType of the receiver. + */ @Generated @CFunction @ByValue public static native CXType clang_Cursor_getReceiverType(@ByValue CXCursor C); + /** + * Given a cursor that represents a property declaration, return the + * associated property attributes. The bits are formed from + * \c CXObjCPropertyAttrKind. + *

+ * \param reserved Reserved for future use, pass 0. + */ @Generated @CFunction public static native int clang_Cursor_getObjCPropertyAttributes(@ByValue CXCursor C, int reserved); @@ -844,278 +2106,735 @@ public static native CXSourceRange clang_Cursor_getSpellingNameRange(@ByValue CX @ByValue public static native CXString clang_Cursor_getObjCRuntimeName(@ByValue CXCursor C); + /** + * Given a cursor that represents an Objective-C method or parameter + * declaration, return the associated Objective-C qualifiers for the return + * type or the parameter respectively. The bits are formed from + * CXObjCDeclQualifierKind. + */ @Generated @CFunction public static native int clang_Cursor_getObjCDeclQualifiers(@ByValue CXCursor C); + /** + * Given a cursor that represents an Objective-C 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". + */ @Generated @CFunction public static native int clang_Cursor_isObjCOptional(@ByValue CXCursor C); + /** + * Returns non-zero if the given cursor is a variadic function or method. + */ @Generated @CFunction public static native int clang_Cursor_isVariadic(@ByValue CXCursor C); + /** + * Given a cursor that represents a declaration, return the associated + * comment's source range. The range may include multiple consecutive comments + * with whitespace in between. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_Cursor_getCommentRange(@ByValue CXCursor C); + /** + * Given a cursor that represents a declaration, return the associated + * comment text, including comment markers. + */ @Generated @CFunction @ByValue public static native CXString clang_Cursor_getRawCommentText(@ByValue CXCursor C); + /** + * Given a cursor that represents a documentable entity (e.g., + * declaration), return the associated \paragraph; otherwise return the + * first paragraph. + */ @Generated @CFunction @ByValue public static native CXString clang_Cursor_getBriefCommentText(@ByValue CXCursor C); + /** + * Given a cursor that represents a documentable entity (e.g., + * declaration), return the associated parsed comment as a + * \c CXComment_FullComment AST node. + */ @Generated @CFunction @ByValue public static native CXComment clang_Cursor_getParsedComment(@ByValue CXCursor C); + /** + * Given a CXCursor_ModuleImportDecl cursor, return the associated module. + */ @Generated @CFunction public static native VoidPtr clang_Cursor_getModule(@ByValue CXCursor C); + /** + * \param Module a module object. + *

+ * \returns the module file where the provided module object came from. + */ @Generated @CFunction public static native VoidPtr clang_Module_getASTFile(VoidPtr Module); + /** + * \param Module a module object. + *

+ * \returns the parent of a sub-module or NULL if the given module is top-level, + * e.g. for 'std.vector' it will return the 'std' module. + */ @Generated @CFunction public static native VoidPtr clang_Module_getParent(VoidPtr Module); + /** + * \param Module a module object. + *

+ * \returns the name of the module, e.g. for the 'std.vector' sub-module it + * will return "vector". + */ @Generated @CFunction @ByValue public static native CXString clang_Module_getName(VoidPtr Module); + /** + * \param Module a module object. + *

+ * \returns the full name of the module, e.g. "std.vector". + */ @Generated @CFunction @ByValue public static native CXString clang_Module_getFullName(VoidPtr Module); + /** + * \param Module a module object. + *

+ * \returns the number of top level headers associated with this module. + */ @Generated @CFunction public static native int clang_Module_getNumTopLevelHeaders(CXTranslationUnit arg1, VoidPtr Module); + /** + * \param Module a module object. + *

+ * \param Index top level header index (zero-based). + *

+ * \returns the specified top level header associated with the module. + */ @Generated @CFunction public static native VoidPtr clang_Module_getTopLevelHeader(CXTranslationUnit arg1, VoidPtr Module, int Index); + /** + * \param Comment AST node of any kind. + *

+ * \returns the type of the AST node. + */ @Generated @CFunction public static native int clang_Comment_getKind(@ByValue CXComment Comment); + /** + * \param Comment AST node of any kind. + *

+ * \returns number of children of the AST node. + */ @Generated @CFunction public static native int clang_Comment_getNumChildren(@ByValue CXComment Comment); + /** + * \param Comment AST node of any kind. + *

+ * \param ChildIdx child index (zero-based). + *

+ * \returns the specified child of the AST node. + */ @Generated @CFunction @ByValue public static native CXComment clang_Comment_getChild(@ByValue CXComment Comment, int ChildIdx); + /** + * A \c CXComment_Paragraph node is considered whitespace if it contains + * only \c CXComment_Text nodes that are empty or whitespace. + *

+ * Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are + * never considered whitespace. + *

+ * \returns non-zero if \c Comment is whitespace. + */ @Generated @CFunction public static native int clang_Comment_isWhitespace(@ByValue CXComment Comment); + /** + * \returns non-zero if \c Comment is inline content and has a newline + * immediately following it in the comment text. Newlines between paragraphs + * do not count. + */ @Generated @CFunction public static native int clang_InlineContentComment_hasTrailingNewline(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_Text AST node. + *

+ * \returns text contained in the AST node. + */ @Generated @CFunction @ByValue public static native CXString clang_TextComment_getText(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_InlineCommand AST node. + *

+ * \returns name of the inline command. + */ @Generated @CFunction @ByValue public static native CXString clang_InlineCommandComment_getCommandName(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_InlineCommand AST node. + *

+ * \returns the most appropriate rendering mode, chosen on command + * semantics in Doxygen. + */ @Generated @CFunction public static native int clang_InlineCommandComment_getRenderKind(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_InlineCommand AST node. + *

+ * \returns number of command arguments. + */ @Generated @CFunction public static native int clang_InlineCommandComment_getNumArgs(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_InlineCommand AST node. + *

+ * \param ArgIdx argument index (zero-based). + *

+ * \returns text of the specified argument. + */ @Generated @CFunction @ByValue public static native CXString clang_InlineCommandComment_getArgText(@ByValue CXComment Comment, int ArgIdx); + /** + * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST + * node. + *

+ * \returns HTML tag name. + */ @Generated @CFunction @ByValue public static native CXString clang_HTMLTagComment_getTagName(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_HTMLStartTag AST node. + *

+ * \returns non-zero if tag is self-closing (for example, <br />). + */ @Generated @CFunction public static native int clang_HTMLStartTagComment_isSelfClosing(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_HTMLStartTag AST node. + *

+ * \returns number of attributes (name-value pairs) attached to the start tag. + */ @Generated @CFunction public static native int clang_HTMLStartTag_getNumAttrs(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_HTMLStartTag AST node. + *

+ * \param AttrIdx attribute index (zero-based). + *

+ * \returns name of the specified attribute. + */ @Generated @CFunction @ByValue public static native CXString clang_HTMLStartTag_getAttrName(@ByValue CXComment Comment, int AttrIdx); + /** + * \param Comment a \c CXComment_HTMLStartTag AST node. + *

+ * \param AttrIdx attribute index (zero-based). + *

+ * \returns value of the specified attribute. + */ @Generated @CFunction @ByValue public static native CXString clang_HTMLStartTag_getAttrValue(@ByValue CXComment Comment, int AttrIdx); + /** + * \param Comment a \c CXComment_BlockCommand AST node. + *

+ * \returns name of the block command. + */ @Generated @CFunction @ByValue public static native CXString clang_BlockCommandComment_getCommandName(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_BlockCommand AST node. + *

+ * \returns number of word-like arguments. + */ @Generated @CFunction public static native int clang_BlockCommandComment_getNumArgs(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_BlockCommand AST node. + *

+ * \param ArgIdx argument index (zero-based). + *

+ * \returns text of the specified word-like argument. + */ @Generated @CFunction @ByValue public static native CXString clang_BlockCommandComment_getArgText(@ByValue CXComment Comment, int ArgIdx); + /** + * \param Comment a \c CXComment_BlockCommand or + * \c CXComment_VerbatimBlockCommand AST node. + *

+ * \returns paragraph argument of the block command. + */ @Generated @CFunction @ByValue public static native CXComment clang_BlockCommandComment_getParagraph(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_ParamCommand AST node. + *

+ * \returns parameter name. + */ @Generated @CFunction @ByValue public static native CXString clang_ParamCommandComment_getParamName(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_ParamCommand AST node. + *

+ * \returns non-zero if the parameter that this AST node represents was found + * in the function prototype and \c clang_ParamCommandComment_getParamIndex + * function will return a meaningful value. + */ @Generated @CFunction public static native int clang_ParamCommandComment_isParamIndexValid(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_ParamCommand AST node. + *

+ * \returns zero-based parameter index in function prototype. + */ @Generated @CFunction public static native int clang_ParamCommandComment_getParamIndex(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_ParamCommand AST node. + *

+ * \returns non-zero if parameter passing direction was specified explicitly in + * the comment. + */ @Generated @CFunction public static native int clang_ParamCommandComment_isDirectionExplicit(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_ParamCommand AST node. + *

+ * \returns parameter passing direction. + */ @Generated @CFunction public static native int clang_ParamCommandComment_getDirection(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_TParamCommand AST node. + *

+ * \returns template parameter name. + */ @Generated @CFunction @ByValue public static native CXString clang_TParamCommandComment_getParamName(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_TParamCommand AST node. + *

+ * \returns non-zero if the parameter that this AST node represents was found + * in the template parameter list and + * \c clang_TParamCommandComment_getDepth and + * \c clang_TParamCommandComment_getIndex functions will return a meaningful + * value. + */ @Generated @CFunction public static native int clang_TParamCommandComment_isParamPositionValid(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_TParamCommand AST node. + *

+ * \returns zero-based nesting depth of this parameter in the template parameter list. + *

+ * For example, + * \verbatim + * template class TT> + * void test(TT aaa); + * \endverbatim + * for C and TT nesting depth is 0, + * for T nesting depth is 1. + */ @Generated @CFunction public static native int clang_TParamCommandComment_getDepth(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_TParamCommand AST node. + *

+ * \returns zero-based parameter index in the template parameter list at a + * given nesting depth. + *

+ * For example, + * \verbatim + * template class TT> + * void test(TT aaa); + * \endverbatim + * for C and TT nesting depth is 0, so we can ask for index at depth 0: + * at depth 0 C's index is 0, TT's index is 1. + *

+ * For T nesting depth is 1, so we can ask for index at depth 0 and 1: + * at depth 0 T's index is 1 (same as TT's), + * at depth 1 T's index is 0. + */ @Generated @CFunction public static native int clang_TParamCommandComment_getIndex(@ByValue CXComment Comment, int Depth); + /** + * \param Comment a \c CXComment_VerbatimBlockLine AST node. + *

+ * \returns text contained in the AST node. + */ @Generated @CFunction @ByValue public static native CXString clang_VerbatimBlockLineComment_getText(@ByValue CXComment Comment); + /** + * \param Comment a \c CXComment_VerbatimLine AST node. + *

+ * \returns text contained in the AST node. + */ @Generated @CFunction @ByValue public static native CXString clang_VerbatimLineComment_getText(@ByValue CXComment Comment); + /** + * Convert an HTML tag AST node to string. + *

+ * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST + * node. + *

+ * \returns string containing an HTML tag. + */ @Generated @CFunction @ByValue public static native CXString clang_HTMLTagComment_getAsString(@ByValue CXComment Comment); + /** + * Convert a given full parsed comment to an HTML fragment. + *

+ * Specific details of HTML layout are subject to change. Don't try to parse + * this HTML back into an AST, use other APIs instead. + *

+ * Currently the following CSS classes are used: + * \li "para-brief" for \paragraph and equivalent commands; + * \li "para-returns" for \\returns paragraph and equivalent commands; + * \li "word-returns" for the "Returns" word in \\returns paragraph. + *

+ * Function argument documentation is rendered as a \ list with arguments + * sorted in function prototype order. CSS classes used: + * \li "param-name-index-NUMBER" for parameter name (\); + * \li "param-descr-index-NUMBER" for parameter description (\); + * \li "param-name-index-invalid" and "param-descr-index-invalid" are used if + * parameter index is invalid. + *

+ * Template parameter documentation is rendered as a \ list with + * parameters sorted in template parameter list order. CSS classes used: + * \li "tparam-name-index-NUMBER" for parameter name (\); + * \li "tparam-descr-index-NUMBER" for parameter description (\); + * \li "tparam-name-index-other" and "tparam-descr-index-other" are used for + * names inside template template parameters; + * \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if + * parameter position is invalid. + *

+ * \param Comment a \c CXComment_FullComment AST node. + *

+ * \returns string containing an HTML fragment. + */ @Generated @CFunction @ByValue public static native CXString clang_FullComment_getAsHTML(@ByValue CXComment Comment); + /** + * Convert a given full parsed comment to an XML document. + *

+ * A Relax NG schema for the XML can be found in comment-xml-schema.rng file + * inside clang source tree. + *

+ * \param Comment a \c CXComment_FullComment AST node. + *

+ * \returns string containing an XML document. + */ @Generated @CFunction @ByValue public static native CXString clang_FullComment_getAsXML(@ByValue CXComment Comment); + /** + * Determine if a C++ member function or member function template is + * pure virtual. + */ @Generated @CFunction public static native int clang_CXXMethod_isPureVirtual(@ByValue CXCursor C); + /** + * Determine if a C++ member function or member function template is + * declared 'static'. + */ @Generated @CFunction public static native int clang_CXXMethod_isStatic(@ByValue CXCursor C); + /** + * Determine if a C++ member function or member function template is + * explicitly declared 'virtual' or if it overrides a virtual method from + * one of the base classes. + */ @Generated @CFunction public static native int clang_CXXMethod_isVirtual(@ByValue CXCursor C); + /** + * Given a cursor that represents a template, determine + * the cursor kind of the specializations would be generated by instantiating + * the template. + *

+ * This routine can be used to determine what flavor of function template, + * class template, or class template partial specialization is stored in the + * cursor. For example, it can describe whether a class template cursor is + * declared with "struct", "class" or "union". + *

+ * \param C The cursor to query. This cursor should represent a template + * declaration. + *

+ * \returns The cursor kind of the specializations that would be generated + * by instantiating the template \p C. If \p C is not a template, returns + * \c CXCursor_NoDeclFound. + */ @Generated @CFunction public static native int clang_getTemplateCursorKind(@ByValue CXCursor C); + /** + * Given a cursor that may represent a specialization or instantiation + * of a template, retrieve the cursor that represents the template that it + * specializes or from which it was instantiated. + *

+ * This routine determines the template involved both for explicit + * specializations of templates and for implicit instantiations of the template, + * both of which are referred to as "specializations". For a class template + * specialization (e.g., \c std::vector), this routine will return + * either the primary template (\c std::vector) or, if the specialization was + * instantiated from a class template partial specialization, the class template + * partial specialization. For a class template partial specialization and a + * function template specialization (including instantiations), this + * this routine will return the specialized template. + *

+ * For members of a class template (e.g., member functions, member classes, or + * static data members), returns the specialized or instantiated member. + * Although not strictly "templates" in the C++ language, members of class + * templates have the same notions of specializations and instantiations that + * templates do, so this routine treats them similarly. + *

+ * \param C A cursor that may be a specialization of a template or a member + * of a template. + *

+ * \returns If the given cursor is a specialization or instantiation of a + * template or a member thereof, the template or member that it specializes or + * from which it was instantiated. Otherwise, returns a NULL cursor. + */ @Generated @CFunction @ByValue public static native CXCursor clang_getSpecializedCursorTemplate(@ByValue CXCursor C); + /** + * Given a cursor that references something else, return the source range + * covering that reference. + *

+ * \param C A cursor pointing to a member reference, a declaration reference, or + * an operator call. + * \param NameFlags A bitset with three independent flags: + * CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, and + * CXNameRange_WantSinglePiece. + * \param PieceIndex For contiguous names or when passing the flag + * CXNameRange_WantSinglePiece, only one piece with index 0 is + * available. When the CXNameRange_WantSinglePiece flag is not passed for a + * non-contiguous names, this index can be used to retrieve the individual + * pieces of the name. See also CXNameRange_WantSinglePiece. + *

+ * \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. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_getCursorReferenceNameRange(@ByValue CXCursor C, int NameFlags, int PieceIndex); + /** + * Determine the kind of the given token. + */ @Generated @CFunction public static native int clang_getTokenKind(@ByValue CXToken arg1); + /** + * Determine the spelling of the given token. + *

+ * The spelling of a token is the textual representation of that token, e.g., + * the text of an identifier or keyword. + */ @Generated @CFunction @ByValue public static native CXString clang_getTokenSpelling(CXTranslationUnit arg1, @ByValue CXToken arg2); + /** + * Retrieve the source location of the given token. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_getTokenLocation(CXTranslationUnit arg1, @ByValue CXToken arg2); + /** + * Retrieve a source range that covers the given token. + */ @Generated @CFunction @ByValue public static native CXSourceRange clang_getTokenExtent(CXTranslationUnit arg1, @ByValue CXToken arg2); + /** + * Tokenize the source code described by the given range into raw + * lexical tokens. + *

+ * \param TU the translation unit whose text is being tokenized. + *

+ * \param Range the source range in which text should be tokenized. All of the + * tokens produced by tokenization will fall within this source range, + *

+ * \param Tokens this pointer will be set to point to the array of tokens + * that occur within the given source range. The returned pointer must be + * freed with clang_disposeTokens() before the translation unit is destroyed. + *

+ * \param NumTokens will be set to the number of tokens in the \c *Tokens + * array. + */ @Generated @CFunction public static native void clang_tokenize(CXTranslationUnit TU, @ByValue CXSourceRange Range, Ptr> Tokens, IntPtr NumTokens); + /** + * Annotate the given set of tokens by providing cursors for each token + * that can be mapped to a specific entity within the abstract syntax tree. + *

+ * This token-annotation routine is equivalent to invoking + * clang_getCursor() for the source locations of each of the + * tokens. The cursors provided are filtered, so that only those + * cursors that have a direct correspondence to the token are + * accepted. For example, given a function call \c f(x), + * clang_getCursor() would provide the following cursors: + *

+ * * when the cursor is over the 'f', a DeclRefExpr cursor referring to 'f'. + * * when the cursor is over the '(' or the ')', a CallExpr referring to 'f'. + * * when the cursor is over the 'x', a DeclRefExpr cursor referring to 'x'. + *

+ * Only the first and last of these cursors will occur within the + * annotate, since the tokens "f" and "x' directly refer to a function + * and a variable, respectively, but the parentheses are just a small + * part of the full syntax of the function call expression, which is + * not provided as an annotation. + *

+ * \param TU the translation unit that owns the given tokens. + *

+ * \param Tokens the set of tokens to annotate. + *

+ * \param NumTokens the number of tokens in \p Tokens. + *

+ * \param Cursors an array of \p NumTokens cursors, whose contents will be + * replaced with the cursors corresponding to each token. + */ @Generated @CFunction public static native void clang_annotateTokens(CXTranslationUnit TU, @UncertainArgument("Options: reference, array Fallback: reference") CXToken Tokens, int NumTokens, @UncertainArgument("Options: reference, array Fallback: reference") CXCursor Cursors); + /** + * Free the given set of tokens. + */ @Generated @CFunction public static native void clang_disposeTokens(CXTranslationUnit TU, Ptr Tokens, int NumTokens); + /** + * for debug/testing + */ @Generated @CFunction @ByValue @@ -1138,58 +2857,232 @@ public static native void clang_executeOnThread( @FunctionPtr(name = "call_clang_executeOnThread") Function_clang_executeOnThread fn, VoidPtr user_data, int stack_size); + /** + * Determine the kind of a particular chunk within a completion string. + *

+ * \param completion_string the completion string to query. + *

+ * \param chunk_number the 0-based index of the chunk in the completion string. + *

+ * \returns the kind of the chunk at the index \c chunk_number. + */ @Generated @CFunction public static native int clang_getCompletionChunkKind(VoidPtr completion_string, int chunk_number); + /** + * Retrieve the text associated with a particular chunk within a + * completion string. + *

+ * \param completion_string the completion string to query. + *

+ * \param chunk_number the 0-based index of the chunk in the completion string. + *

+ * \returns the text associated with the chunk at index \c chunk_number. + */ @Generated @CFunction @ByValue public static native CXString clang_getCompletionChunkText(VoidPtr completion_string, int chunk_number); + /** + * Retrieve the completion string associated with a particular chunk + * within a completion string. + *

+ * \param completion_string the completion string to query. + *

+ * \param chunk_number the 0-based index of the chunk in the completion string. + *

+ * \returns the completion string associated with the chunk at index + * \c chunk_number. + */ @Generated @CFunction public static native VoidPtr clang_getCompletionChunkCompletionString(VoidPtr completion_string, int chunk_number); + /** + * Retrieve the number of chunks in the given code-completion string. + */ @Generated @CFunction public static native int clang_getNumCompletionChunks(VoidPtr completion_string); + /** + * Determine the priority of this code completion. + *

+ * The priority of a code completion indicates how likely it is that this + * particular completion is the completion that the user will select. The + * priority is selected by various internal heuristics. + *

+ * \param completion_string The completion string to query. + *

+ * \returns The priority of this completion string. Smaller values indicate + * higher-priority (more likely) completions. + */ @Generated @CFunction public static native int clang_getCompletionPriority(VoidPtr completion_string); + /** + * Determine the availability of the entity that this code-completion + * string refers to. + *

+ * \param completion_string The completion string to query. + *

+ * \returns The availability of the completion string. + */ @Generated @CFunction public static native int clang_getCompletionAvailability(VoidPtr completion_string); + /** + * Retrieve the number of annotations associated with the given + * completion string. + *

+ * \param completion_string the completion string to query. + *

+ * \returns the number of annotations associated with the given completion + * string. + */ @Generated @CFunction public static native int clang_getCompletionNumAnnotations(VoidPtr completion_string); + /** + * Retrieve the annotation associated with the given completion string. + *

+ * \param completion_string the completion string to query. + *

+ * \param annotation_number the 0-based index of the annotation of the + * completion string. + *

+ * \returns annotation string associated with the completion at index + * \c annotation_number, or a NULL string if that annotation is not available. + */ @Generated @CFunction @ByValue public static native CXString clang_getCompletionAnnotation(VoidPtr completion_string, int annotation_number); + /** + * Retrieve the parent context of the given completion string. + *

+ * The parent context of a completion string is the semantic parent of + * the declaration (if any) that the code completion represents. For example, + * a code completion for an Objective-C method would have the method's class + * or protocol as its context. + *

+ * \param completion_string The code completion string whose parent is + * being queried. + *

+ * \param kind DEPRECATED: always set to CXCursor_NotImplemented if non-NULL. + *

+ * \returns The name of the completion parent, e.g., "NSObject" if + * the completion string represents a method in the NSObject class. + */ @Generated @CFunction @ByValue public static native CXString clang_getCompletionParent(VoidPtr completion_string, IntPtr kind); + /** + * Retrieve the brief documentation comment attached to the declaration + * that corresponds to the given completion string. + */ @Generated @CFunction @ByValue public static native CXString clang_getCompletionBriefComment(VoidPtr completion_string); + /** + * Retrieve a completion string for an arbitrary declaration or macro + * definition cursor. + *

+ * \param cursor The cursor to query. + *

+ * \returns A non-context-sensitive completion string for declaration and macro + * definition cursors, or NULL for other kinds of cursors. + */ @Generated @CFunction public static native VoidPtr clang_getCursorCompletionString(@ByValue CXCursor cursor); + /** + * Returns a default set of code-completion options that can be + * passed to\c clang_codeCompleteAt(). + */ @Generated @CFunction public static native int clang_defaultCodeCompleteOptions(); + /** + * Perform code completion at a given location in a translation unit. + *

+ * This function performs code completion at a particular file, line, and + * column within source code, providing results that suggest potential + * code snippets based on the context of the completion. The basic model + * for code completion is that Clang will parse a complete source file, + * performing syntax checking up to the location where code-completion has + * been requested. At that point, a special code-completion token is passed + * to the parser, which recognizes this token and determines, based on the + * current location in the C/Objective-C/C++ grammar and the state of + * semantic analysis, what completions to provide. These completions are + * returned via a new \c CXCodeCompleteResults structure. + *

+ * Code completion itself is meant to be triggered by the client when the + * user types punctuation characters or whitespace, at which point the + * code-completion location will coincide with the cursor. For example, if \c p + * is a pointer, code-completion might be triggered after the "-" and then + * after the ">" in \c p->. When the code-completion location is after the ">", + * the completion results will provide, e.g., the members of the struct that + * "p" points to. The client is responsible for placing the cursor at the + * beginning of the token currently being typed, then filtering the results + * based on the contents of the token. For example, when code-completing for + * the expression \c p->get, the client should provide the location just after + * the ">" (e.g., pointing at the "g") to this code-completion hook. Then, the + * client can filter the results based on the current token text ("get"), only + * showing those results that start with "get". The intent of this interface + * is to separate the relatively high-latency acquisition of code-completion + * results from the filtering of results on a per-character basis, which must + * have a lower latency. + *

+ * \param TU The translation unit in which code-completion should + * occur. The source files for this translation unit need not be + * completely up-to-date (and the contents of those source files may + * be overridden via \p unsaved_files). Cursors referring into the + * translation unit may be invalidated by this invocation. + *

+ * \param complete_filename The name of the source file where code + * completion should be performed. This filename may be any file + * included in the translation unit. + *

+ * \param complete_line The line at which code-completion should occur. + *

+ * \param complete_column The column at which code-completion should occur. + * Note that the column should point just after the syntactic construct that + * initiated code completion, and not in the middle of a lexical token. + *

+ * \param unsaved_files the Files that have not yet been saved to disk + * but may be required for parsing or code completion, including the + * contents of those files. The contents and name of these files (as + * specified by CXUnsavedFile) are copied when necessary, so the + * client only needs to guarantee their validity until the call to + * this function returns. + *

+ * \param num_unsaved_files The number of unsaved file entries in \p + * unsaved_files. + *

+ * \param options Extra options that control the behavior of code + * completion, expressed as a bitwise OR of the enumerators of the + * CXCodeComplete_Flags enumeration. The + * \c clang_defaultCodeCompleteOptions() function returns a default set + * of code-completion options. + *

+ * \returns If successful, a new \c CXCodeCompleteResults structure + * containing code-completion results, which should eventually be + * freed with \c clang_disposeCodeCompleteResults(). If code + * completion fails, returns NULL. + */ @Generated @CFunction @UncertainReturn("Options: reference, array Fallback: reference") @@ -1199,95 +3092,237 @@ public static native CXCodeCompleteResults clang_codeCompleteAt(CXTranslationUni @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files, int num_unsaved_files, int options); + /** + * Sort the code-completion results in case-insensitive alphabetical + * order. + *

+ * \param Results The set of results to sort. + * \param NumResults The number of results in \p Results. + */ @Generated @CFunction public static native void clang_sortCodeCompletionResults( @UncertainArgument("Options: reference, array Fallback: reference") CXCompletionResult Results, int NumResults); + /** + * Free the given set of code-completion results. + */ @Generated @CFunction public static native void clang_disposeCodeCompleteResults( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results); + /** + * Determine the number of diagnostics produced prior to the + * location where code completion was performed. + */ @Generated @CFunction public static native int clang_codeCompleteGetNumDiagnostics( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results); + /** + * Retrieve a diagnostic associated with the given code completion. + *

+ * \param Results the code completion results to query. + * \param Index the zero-based diagnostic number to retrieve. + *

+ * \returns the requested diagnostic. This diagnostic must be freed + * via a call to \c clang_disposeDiagnostic(). + */ @Generated @CFunction public static native VoidPtr clang_codeCompleteGetDiagnostic( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results, int Index); + /** + * Determines what completions are appropriate for the context + * the given code completion. + *

+ * \param Results the code completion results to query + *

+ * \returns the kinds of completions that are appropriate for use + * along with the given code completion results. + */ @Generated @CFunction public static native long clang_codeCompleteGetContexts( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results); + /** + * Returns the cursor kind for the container for the current code + * completion context. The container is only guaranteed to be set for + * contexts where a container exists (i.e. member accesses or Objective-C + * message sends); if there is not a container, this function will return + * CXCursor_InvalidCode. + *

+ * \param Results the code completion results to query + *

+ * \param IsIncomplete on return, this value will be false if Clang has complete + * information about the container. If Clang does not have complete + * information, this value will be true. + *

+ * \returns the container kind, or CXCursor_InvalidCode if there is not a + * container + */ @Generated @CFunction public static native int clang_codeCompleteGetContainerKind( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results, IntPtr IsIncomplete); + /** + * Returns the USR for the container for the current code completion + * context. If there is not a container for the current context, this + * function will return the empty string. + *

+ * \param Results the code completion results to query + *

+ * \returns the USR for the container + */ @Generated @CFunction @ByValue public static native CXString clang_codeCompleteGetContainerUSR( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results); + /** + * Returns the currently-entered selector for an Objective-C message + * send, formatted like "initWithFoo:bar:". Only guaranteed to return a + * non-empty string for CXCompletionContext_ObjCInstanceMessage and + * CXCompletionContext_ObjCClassMessage. + *

+ * \param Results the code completion results to query + *

+ * \returns the selector (or partial selector) that has been entered thus far + * for an Objective-C message send. + */ @Generated @CFunction @ByValue public static native CXString clang_codeCompleteGetObjCSelector( @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults Results); + /** + * Return a version string, suitable for showing to a user, but not + * intended to be parsed (the format is not guaranteed to be stable). + */ @Generated @CFunction @ByValue public static native CXString clang_getClangVersion(); + /** + * Enable/disable crash recovery. + *

+ * \param isEnabled Flag to indicate if crash recovery is enabled. A non-zero + * value enables crash recovery, while 0 disables it. + */ @Generated @CFunction public static native void clang_toggleCrashRecovery(int isEnabled); + /** + * Visit the set of preprocessor inclusions in a translation unit. + * The visitor function is called with the provided data for every included + * file. This does not include headers included by the PCH file (unless one + * is inspecting the inclusions in the PCH file itself). + */ @Generated @CFunction public static native void clang_getInclusions(CXTranslationUnit tu, @FunctionPtr(name = "call_clang_getInclusions") Function_clang_getInclusions visitor, VoidPtr client_data); + /** + * Retrieve a remapping. + *

+ * \param path the path that contains metadata about remappings. + *

+ * \returns the requested remapping. This remapping must be freed + * via a call to \c clang_remap_dispose(). Can return NULL if an error occurred. + */ @Generated @CFunction public static native VoidPtr clang_getRemappings( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String path); + /** + * Retrieve a remapping. + *

+ * \param filePaths pointer to an array of file paths containing remapping info. + *

+ * \param numFiles number of file paths. + *

+ * \returns the requested remapping. This remapping must be freed + * via a call to \c clang_remap_dispose(). Can return NULL if an error occurred. + */ @Generated @CFunction public static native VoidPtr clang_getRemappingsFromFileList( @UncertainArgument("Options: java.string.array, c.const-byte-ptr-ptr Fallback: java.string.array") @Mapped(CStringArrayMapper.class) String[] filePaths, int numFiles); + /** + * Determine the number of remappings. + */ @Generated @CFunction public static native int clang_remap_getNumFiles(VoidPtr arg1); + /** + * Get the original and the associated filename from the remapping. + *

+ * \param original If non-NULL, will be set to the original filename. + *

+ * \param transformed If non-NULL, will be set to the filename that the original + * is associated with. + */ @Generated @CFunction public static native void clang_remap_getFilenames(VoidPtr arg1, int index, @UncertainArgument("Options: reference, array Fallback: reference") CXString original, @UncertainArgument("Options: reference, array Fallback: reference") CXString transformed); + /** + * Dispose the remapping. + */ @Generated @CFunction public static native void clang_remap_dispose(VoidPtr arg1); + /** + * Find references of a declaration in a specific file. + *

+ * \param cursor pointing to a declaration or a reference of one. + *

+ * \param file to search for references. + *

+ * \param visitor callback that will receive pairs of CXCursor/CXSourceRange for + * each reference found. + * The CXSourceRange will point inside the file; if the reference is inside + * a macro (and not a macro argument) the CXSourceRange will be invalid. + *

+ * \returns one of the CXResult enumerators. + */ @Generated @CFunction public static native int clang_findReferencesInFile(@ByValue CXCursor cursor, VoidPtr file, @ByValue CXCursorAndRangeVisitor visitor); + /** + * Find #import/#include directives in a specific file. + *

+ * \param TU translation unit containing the file to query. + *

+ * \param file to search for #import/#include directives. + *

+ * \param visitor callback that will receive pairs of CXCursor/CXSourceRange for + * each directive found. + *

+ * \returns one of the CXResult enumerators. + */ @Generated @CFunction public static native int clang_findIncludesInFile(CXTranslationUnit TU, VoidPtr file, @@ -1349,34 +3384,85 @@ public static native CXIdxIBOutletCollectionAttrInfo clang_index_getIBOutletColl public static native CXIdxCXXClassDeclInfo clang_index_getCXXClassDeclInfo( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxDeclInfo arg1); + /** + * For retrieving a custom CXIdxClientContainer attached to a + * container. + */ @Generated @CFunction public static native VoidPtr clang_index_getClientContainer( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxContainerInfo arg1); + /** + * For setting a custom CXIdxClientContainer attached to a + * container. + */ @Generated @CFunction public static native void clang_index_setClientContainer( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxContainerInfo arg1, VoidPtr arg2); + /** + * For retrieving a custom CXIdxClientEntity attached to an entity. + */ @Generated @CFunction public static native VoidPtr clang_index_getClientEntity( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxEntityInfo arg1); + /** + * For setting a custom CXIdxClientEntity attached to an entity. + */ @Generated @CFunction public static native void clang_index_setClientEntity( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxEntityInfo arg1, VoidPtr arg2); + /** + * An indexing action/session, to be applied to one or multiple + * translation units. + *

+ * \param CIdx The index object with which the index action will be associated. + */ @Generated @CFunction public static native VoidPtr clang_IndexAction_create(VoidPtr CIdx); + /** + * Destroy the given index action. + *

+ * The index action must not be destroyed until all of the translation units + * created within that index action have been destroyed. + */ @Generated @CFunction public static native void clang_IndexAction_dispose(VoidPtr arg1); + /** + * Index the given source file and the translation unit corresponding + * to that file via callbacks implemented through #IndexerCallbacks. + *

+ * \param client_data pointer data supplied by the client, which will + * be passed to the invoked callbacks. + *

+ * \param index_callbacks Pointer to indexing callbacks that the client + * implements. + *

+ * \param index_callbacks_size Size of #IndexerCallbacks structure that gets + * passed in index_callbacks. + *

+ * \param index_options A bitmask of options that affects how indexing is + * performed. This should be a bitwise OR of the CXIndexOpt_XXX flags. + *

+ * \param[out] out_TU pointer to store a \c CXTranslationUnit that can be + * reused after indexing is finished. Set to \c NULL if you do not require it. + *

+ * \returns 0 on success or if there were errors from which the compiler could + * recover. If there is a failure from which there is no recovery, returns + * a non-zero \c CXErrorCode. + *

+ * The rest of the parameters are the same as #clang_parseTranslationUnit. + */ @Generated @CFunction public static native int clang_indexSourceFile(VoidPtr arg1, VoidPtr client_data, @@ -1388,88 +3474,235 @@ public static native int clang_indexSourceFile(VoidPtr arg1, VoidPtr client_data @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files, int num_unsaved_files, Ptr out_TU, int TU_options); + /** + * Index the given translation unit via callbacks implemented through + * #IndexerCallbacks. + *

+ * The order of callback invocations is not guaranteed to be the same as + * when indexing a source file. The high level order will be: + *

+ * -Preprocessor callbacks invocations + * -Declaration/reference callbacks invocations + * -Diagnostic callback invocations + *

+ * The parameters are the same as #clang_indexSourceFile. + *

+ * \returns If there is a failure from which there is no recovery, returns + * non-zero, otherwise returns 0. + */ @Generated @CFunction public static native int clang_indexTranslationUnit(VoidPtr arg1, VoidPtr client_data, @UncertainArgument("Options: reference, array Fallback: reference") IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, CXTranslationUnit arg6); + /** + * Retrieve the CXIdxFile, file, line, column, and offset represented by + * the given CXIdxLoc. + *

+ * If the location refers into a macro expansion, retrieves the + * location of the macro expansion and if it refers into a macro argument + * retrieves the location of the argument. + */ @Generated @CFunction public static native void clang_indexLoc_getFileLocation(@ByValue CXIdxLoc loc, Ptr indexFile, Ptr file, IntPtr line, IntPtr column, IntPtr offset); + /** + * Retrieve the CXSourceLocation represented by the given CXIdxLoc. + */ @Generated @CFunction @ByValue public static native CXSourceLocation clang_indexLoc_getCXSourceLocation(@ByValue CXIdxLoc loc); + /** + * Return the timestamp for use with Clang's + * \c -fbuild-session-timestamp= option. + */ @Generated @CFunction public static native long clang_getBuildSessionTimestamp(); + /** + * Create a \c CXVirtualFileOverlay object. + * Must be disposed with \c clang_VirtualFileOverlay_dispose(). + *

+ * \param options is reserved, always pass 0. + */ @Generated @CFunction public static native CXVirtualFileOverlay clang_VirtualFileOverlay_create(int options); + /** + * Map an absolute virtual file path to an absolute real one. + * The virtual path must be canonicalized (not contain "."/".."). + * \returns 0 for success, non-zero to indicate an error. + */ @Generated @CFunction public static native int clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay arg1, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String virtualPath, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String realPath); + /** + * Set the case sensitivity for the \c CXVirtualFileOverlay object. + * The \c CXVirtualFileOverlay object is case-sensitive by default, this + * option can be used to override the default. + * \returns 0 for success, non-zero to indicate an error. + */ @Generated @CFunction public static native int clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay arg1, int caseSensitive); + /** + * Write out the \c CXVirtualFileOverlay object to a char buffer. + *

+ * \param options is reserved, always pass 0. + * \param out_buffer_ptr pointer to receive the buffer pointer, which should be + * disposed using \c clang_free(). + * \param out_buffer_size pointer to receive the buffer size. + * \returns 0 for success, non-zero to indicate an error. + */ @Generated @CFunction public static native int clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay arg1, int options, Ptr out_buffer_ptr, IntPtr out_buffer_size); + /** + * Dispose a \c CXVirtualFileOverlay object. + */ @Generated @CFunction public static native void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay arg1); + /** + * Create a \c CXModuleMapDescriptor object. + * Must be disposed with \c clang_ModuleMapDescriptor_dispose(). + *

+ * \param options is reserved, always pass 0. + */ @Generated @CFunction public static native CXModuleMapDescriptor clang_ModuleMapDescriptor_create(int options); + /** + * Sets the framework module name that the module.map describes. + * \returns 0 for success, non-zero to indicate an error. + */ @Generated @CFunction public static native int clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor arg1, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String name); + /** + * Sets the umbrella header name that the module.map describes. + * \returns 0 for success, non-zero to indicate an error. + */ @Generated @CFunction public static native int clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor arg1, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String name); + /** + * Write out the \c CXModuleMapDescriptor object to a char buffer. + *

+ * \param options is reserved, always pass 0. + * \param out_buffer_ptr pointer to receive the buffer pointer, which should be + * disposed using \c clang_free(). + * \param out_buffer_size pointer to receive the buffer size. + * \returns 0 for success, non-zero to indicate an error. + */ @Generated @CFunction public static native int clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor arg1, int options, Ptr out_buffer_ptr, IntPtr out_buffer_size); + /** + * Dispose a \c CXModuleMapDescriptor object. + */ @Generated @CFunction public static native void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor arg1); + /** + * Retrieve all ranges that were skipped by the preprocessor. + *

+ * The preprocessor will skip lines when they are surrounded by an + * if/ifdef/ifndef directive whose condition does not evaluate to true. + */ @Generated @CFunction @UncertainReturn("Options: reference, array Fallback: reference") public static native CXSourceRangeList clang_getSkippedRanges(CXTranslationUnit tu, VoidPtr file); + /** + * Destroy the given \c CXSourceRangeList. + */ @Generated @CFunction public static native void clang_disposeSourceRangeList( @UncertainArgument("Options: reference, array Fallback: reference") CXSourceRangeList ranges); + /** + * Create a translation unit from an AST file (\c -emit-ast). + *

+ * \param[out] out_TU A non-NULL pointer to store the created + * \c CXTranslationUnit. + *

+ * \returns Zero on success, otherwise returns an error code. + */ @Generated @CFunction public static native int clang_createTranslationUnit2(VoidPtr CIdx, @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String ast_filename, Ptr out_TU); + /** + * Parse the given source file and the translation unit corresponding + * to that file. + *

+ * This routine is the main entry point for the Clang C API, providing the + * ability to parse a source file into a translation unit that can then be + * queried by other functions in the API. This routine accepts a set of + * command-line arguments so that the compilation can be configured in the same + * way that the compiler is configured on the command line. + *

+ * \param CIdx The index object with which the translation unit will be + * associated. + *

+ * \param source_filename The name of the source file to load, or NULL if the + * source file is included in \c command_line_args. + *

+ * \param command_line_args The command-line arguments that would be + * passed to the \c clang executable if it were being invoked out-of-process. + * These command-line options will be parsed and will affect how the translation + * unit is parsed. Note that the following options are ignored: '-c', + * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \'. + *

+ * \param num_command_line_args The number of command-line arguments in + * \c command_line_args. + *

+ * \param unsaved_files the files that have not yet been saved to disk + * but may be required for parsing, including the contents of + * those files. The contents and name of these files (as specified by + * CXUnsavedFile) are copied when necessary, so the client only needs to + * guarantee their validity until the call to this function returns. + *

+ * \param num_unsaved_files the number of unsaved file entries in \p + * unsaved_files. + *

+ * \param options A bitmask of options that affects how the translation unit + * is managed but not its compilation. This should be a bitwise OR of the + * CXTranslationUnit_XXX flags. + *

+ * \param[out] out_TU A non-NULL pointer to store the created + * \c CXTranslationUnit, describing the parsed code and containing any + * diagnostics produced by the compiler. + *

+ * \returns Zero on success, otherwise returns an error code. + */ @Generated @CFunction public static native int clang_parseTranslationUnit2(VoidPtr CIdx, @@ -1479,116 +3712,305 @@ public static native int clang_parseTranslationUnit2(VoidPtr CIdx, @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files, int num_unsaved_files, int options, Ptr out_TU); + /** + * Returns the number of template arguments for given template + * specialization, or -1 if type \c T is not a template specialization. + */ @Generated @CFunction public static native int clang_Type_getNumTemplateArguments(@ByValue CXType T); + /** + * Returns the type template argument of a template class specialization + * at given index. + *

+ * This function only returns template type arguments and does not handle + * template template arguments or variadic packs. + */ @Generated @CFunction @ByValue public static native CXType clang_Type_getTemplateArgumentAsType(@ByValue CXType T, int i); + /** + * Given a CXFile header file, return the module that contains it, if one + * exists. + */ @Generated @CFunction public static native VoidPtr clang_getModuleForFile(CXTranslationUnit arg1, VoidPtr arg2); + /** + * \param Module a module object. + *

+ * \returns non-zero if the module is a system one. + */ @Generated @CFunction public static native int clang_Module_isSystem(VoidPtr Module); + /** + * Determine if a C++ member function or member function template is + * declared 'const'. + */ @Generated @CFunction public static native int clang_CXXMethod_isConst(@ByValue CXCursor C); + /** + * Returns non-zero if the \c file1 and \c file2 point to the same file, + * or they are both NULL. + */ @Generated @CFunction public static native int clang_File_isEqual(VoidPtr file1, VoidPtr file2); + /** + * Returns the number of template args of a function decl representing a + * template specialization. + *

+ * If the argument cursor cannot be converted into a template function + * declaration, -1 is returned. + *

+ * For example, for the following declaration and specialization: + * template + * void foo() { ... } + *

+ * template <> + * void foo(); + *

+ * The value 3 would be returned from this call. + */ @Generated @CFunction public static native int clang_Cursor_getNumTemplateArguments(@ByValue CXCursor C); + /** + * Retrieve the kind of the I'th template argument of the CXCursor C. + *

+ * If the argument CXCursor does not represent a FunctionDecl, an invalid + * template argument kind is returned. + *

+ * For example, for the following declaration and specialization: + * template + * void foo() { ... } + *

+ * template <> + * void foo(); + *

+ * For I = 0, 1, and 2, Type, Integral, and Integral will be returned, + * respectively. + */ @Generated @CFunction public static native int clang_Cursor_getTemplateArgumentKind(@ByValue CXCursor C, int I); + /** + * Retrieve a CXType representing the type of a TemplateArgument of a + * function decl representing a template specialization. + *

+ * If the argument CXCursor does not represent a FunctionDecl whose I'th + * template argument has a kind of CXTemplateArgKind_Integral, an invalid type + * is returned. + *

+ * For example, for the following declaration and specialization: + * template + * void foo() { ... } + *

+ * template <> + * void foo(); + *

+ * If called with I = 0, "float", will be returned. + * Invalid types will be returned for I == 1 or 2. + */ @Generated @CFunction @ByValue public static native CXType clang_Cursor_getTemplateArgumentType(@ByValue CXCursor C, int I); + /** + * Retrieve the value of an Integral TemplateArgument (of a function + * decl representing a template specialization) as a signed long long. + *

+ * It is undefined to call this function on a CXCursor that does not represent a + * FunctionDecl or whose I'th template argument is not an integral value. + *

+ * For example, for the following declaration and specialization: + * template + * void foo() { ... } + *

+ * template <> + * void foo(); + *

+ * If called with I = 1 or 2, -7 or true will be returned, respectively. + * For I == 0, this function's behavior is undefined. + */ @Generated @CFunction public static native long clang_Cursor_getTemplateArgumentValue(@ByValue CXCursor C, int I); + /** + * Retrieve the value of an Integral TemplateArgument (of a function + * decl representing a template specialization) as an unsigned long long. + *

+ * It is undefined to call this function on a CXCursor that does not represent a + * FunctionDecl or whose I'th template argument is not an integral value. + *

+ * For example, for the following declaration and specialization: + * template + * void foo() { ... } + *

+ * template <> + * void foo(); + *

+ * If called with I = 1 or 2, 2147483649 or true will be returned, respectively. + * For I == 0, this function's behavior is undefined. + */ @Generated @CFunction public static native long clang_Cursor_getTemplateArgumentUnsignedValue(@ByValue CXCursor C, int I); + /** + * Returns the storage class for a function or variable declaration. + *

+ * If the passed in Cursor is not a function or variable declaration, + * CX_SC_Invalid is returned else the storage class. + */ @Generated @CFunction public static native int clang_Cursor_getStorageClass(@ByValue CXCursor arg1); + /** + * Retrieve the CXString representing the mangled name of the cursor. + */ @Generated @CFunction @ByValue public static native CXString clang_Cursor_getMangling(@ByValue CXCursor arg1); + /** + * free memory allocated by libclang, such as the buffer returned by + * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer(). + *

+ * \param buffer memory pointer to free. + */ @Generated @CFunction public static native void clang_free(VoidPtr buffer); + /** + * Returns non-zero if \p C refers to an inlined function. + */ @Generated @CFunction public static native int clang_Cursor_isInlined(@ByValue CXCursor cursor); + /** + * Determine whether a CXType is a signed integer type. + */ @Generated @CFunction public static native int clang_isSignedIntegerType(@ByValue CXType CT); + /** + * Determine whether a CXType is an unsigned integer type. + */ @Generated @CFunction public static native int clang_isUnsignedIntegerType(@ByValue CXType CT); + /** + * Determine whether a CXType is a signed integer or enum type. + */ @Generated @CFunction public static native int clang_isSignedIntegerOrEnumerationType(@ByValue CXType CT); + /** + * Determine whether a CXType is an unsigned integer or enum type. + */ @Generated @CFunction public static native int clang_isUnsignedIntegerOrEnumerationType(@ByValue CXType CT); - @Generated - @CFunction - public static native int clang_getNullabilityKind(@ByValue CXType T); - + /** + * Return the offset of the field represented by the Cursor. + *

+ * If the cursor is not a field declaration, -1 is returned. + * If the cursor semantic parent is not a record field declaration, + * CXTypeLayoutError_Invalid is returned. + * If the field's type declaration is an incomplete type, + * CXTypeLayoutError_Incomplete is returned. + * If the field's type declaration is a dependent type, + * CXTypeLayoutError_Dependent is returned. + * If the field's name S is not found, + * CXTypeLayoutError_InvalidFieldName is returned. + */ @Generated @CFunction public static native long clang_Cursor_getOffsetOfField(@ByValue CXCursor C); + /** + * Determine whether the given cursor represents an anonymous + * tag or namespace + */ @Generated @CFunction public static native int clang_Cursor_isAnonymous(@ByValue CXCursor C); + /** + * Returns non-zero if the cursor specifies an Objective-C type which is + * a "kindof" type. + */ @Generated @CFunction public static native int clang_Type_isObjCKindOf(@ByValue CXType T); + /** + * Returns the number of Objective-C protocols of a Objective-C type + * specialization, or -1 if type \c T is not an Objective-C type specialization. + */ @Generated @CFunction public static native int clang_Type_getNumObjCProtocols(@ByValue CXType T); + /** + * Returns the cursor of the Objective-C protocol declaration at given + * index. + */ @Generated @CFunction @ByValue public static native CXCursor clang_Type_getObjCProtocolAsCursor(@ByValue CXType T, int i); + /** + * Visit the fields of a particular type. + *

+ * This function visits all the direct fields of the given cursor, + * invoking the given \p visitor function with the cursors of each + * visited field. The traversal may be ended prematurely, if + * the visitor returns \c CXFieldVisit_Break. + *

+ * \param T the record type whose field may be visited. + *

+ * \param visitor the visitor function that will be invoked for each + * field of \p T. + *

+ * \param client_data pointer data supplied by the client, which will + * be passed to the visitor each time it is invoked. + *

+ * \returns a non-zero value if the traversal was terminated + * prematurely by the visitor returning \c CXFieldVisit_Break. + */ @Generated @CFunction public static native int clang_Type_visitFields(@ByValue CXType T, @FunctionPtr(name = "call_clang_Type_visitFields") Function_clang_Type_visitFields visitor, VoidPtr client_data); + /** + * @} + */ @Generated @CFunction public static native void clang_forceDisableCrashRecovery(); @@ -1597,11 +4019,17 @@ public static native int clang_Type_visitFields(@ByValue CXType T, @CFunction public static native void clang_forceSetNoThreads(); + /** + * Retrieve the same type by stripping nullability attributes. + */ @Generated @CFunction @ByValue public static native CXType clang_getTypeByStrippingOuterNullability(@ByValue CXType T); + /** + * Retrieve the same type by stripping Objective-C kindof attribute. + */ @Generated @CFunction @ByValue @@ -1634,15 +4062,28 @@ public static native int clang_Type_visitFields(@ByValue CXType T, @CFunction public static native int clang_Cursor_getObjCGenericParamVariance(@ByValue CXCursor C, int I); + /** + * Returns the evaluated value for a variable declaration. + *

+ * If the cursor is not a variable + */ @Generated @CFunction public static native int clang_cursor_getEvaluatedValue(@ByValue CXCursor arg1, LongPtr arg2); + /** + * Free the given string set. + */ @Generated @CFunction public static native void clang_disposeStringSet( @UncertainArgument("Options: reference, array Fallback: reference") CXStringSet set); + /** + * Same as clang_parseTranslationUnit2 but requires a full command line + * for \c command_line_args including argv[0]. This is useful if the standard + * library paths are relative to the binary. + */ @Generated @CFunction public static native int clang_parseTranslationUnit2FullArgv(VoidPtr CIdx, @@ -1652,85 +4093,167 @@ public static native int clang_parseTranslationUnit2FullArgv(VoidPtr CIdx, @UncertainArgument("Options: reference, array Fallback: reference") CXUnsavedFile unsaved_files, int num_unsaved_files, int options, Ptr out_TU); + /** + * Determine whether the given cursor has any attributes. + */ @Generated @CFunction public static native int clang_Cursor_hasAttrs(@ByValue CXCursor C); + /** + * Describe the visibility of the entity referred to by a cursor. + *

+ * This returns the default visibility if not explicitly specified by + * a visibility attribute. The default visibility may be changed by + * commandline arguments. + *

+ * \param cursor The cursor to query. + *

+ * \returns The visibility of the cursor. + */ @Generated @CFunction public static native int clang_getCursorVisibility(@ByValue CXCursor cursor); + /** + * Determine whether a CXCursor that is a macro, is + * function like. + */ @Generated @CFunction public static native int clang_Cursor_isMacroFunctionLike(@ByValue CXCursor C); + /** + * Determine whether a CXCursor that is a macro, is a + * builtin one. + */ @Generated @CFunction public static native int clang_Cursor_isMacroBuiltin(@ByValue CXCursor C); + /** + * Determine whether a CXCursor that is a function declaration, is an + * inline declaration. + */ @Generated @CFunction public static native int clang_Cursor_isFunctionInlined(@ByValue CXCursor C); + /** + * Returns the Objective-C type encoding for the specified CXType. + */ @Generated @CFunction @ByValue public static native CXString clang_Type_getObjCEncoding(@ByValue CXType type); + /** + * Retrieve the CXStrings representing the mangled symbols of the C++ + * constructor or destructor at the cursor. + */ @Generated @CFunction @UncertainReturn("Options: reference, array Fallback: reference") public static native CXStringSet clang_Cursor_getCXXManglings(@ByValue CXCursor arg1); + /** + * Determine if a C++ constructor is a converting constructor. + */ @Generated @CFunction public static native int clang_CXXConstructor_isConvertingConstructor(@ByValue CXCursor C); + /** + * Determine if a C++ constructor is a copy constructor. + */ @Generated @CFunction public static native int clang_CXXConstructor_isCopyConstructor(@ByValue CXCursor C); + /** + * Determine if a C++ constructor is the default constructor. + */ @Generated @CFunction public static native int clang_CXXConstructor_isDefaultConstructor(@ByValue CXCursor C); + /** + * Determine if a C++ constructor is a move constructor. + */ @Generated @CFunction public static native int clang_CXXConstructor_isMoveConstructor(@ByValue CXCursor C); + /** + * Determine if a C++ field is declared 'mutable'. + */ @Generated @CFunction public static native int clang_CXXField_isMutable(@ByValue CXCursor C); + /** + * Determine if a C++ method is declared '= default'. + */ @Generated @CFunction public static native int clang_CXXMethod_isDefaulted(@ByValue CXCursor C); + /** + * 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. + */ @Generated @CFunction public static native VoidPtr clang_Cursor_Evaluate(@ByValue CXCursor C); + /** + * Returns the kind of the evaluated result. + */ @Generated @CFunction public static native int clang_EvalResult_getKind(VoidPtr E); + /** + * Returns the evaluation result as integer if the + * kind is Int. + */ @Generated @CFunction public static native int clang_EvalResult_getAsInt(VoidPtr E); + /** + * Returns the evaluation result as double if the + * kind is double. + */ @Generated @CFunction public static native double clang_EvalResult_getAsDouble(VoidPtr E); + /** + * Returns the evaluation result as a constant string if the + * kind is other than Int or float. User must not free this pointer, + * instead call clang_EvalResult_dispose on the CXEvalResult returned + * by clang_Cursor_Evaluate. + */ @Generated @CFunction @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") public static native String clang_EvalResult_getAsStr(VoidPtr E); + /** + * Disposes the created Eval memory. + */ @Generated @CFunction public static native void clang_EvalResult_dispose(VoidPtr E); + /** + * Same as clang_indexSourceFile but requires a full command line + * for \c command_line_args including argv[0]. This is useful if the standard + * library paths are relative to the binary. + */ @Generated @CFunction public static native int clang_indexSourceFileFullArgv(VoidPtr arg1, VoidPtr client_data, @@ -1753,7 +4276,7 @@ public interface Function_clang_visitChildren { @Generated public interface Block_clang_visitChildrenWithBlock { @Generated - int call_clang_visitChildrenWithBlock(@ByValue CXCursor arg0, @ByValue CXCursor arg1); + int call_clang_visitChildrenWithBlock(@ByValue CXCursor cursor, @ByValue CXCursor parent); } @Runtime(CRuntime.class) @@ -1792,4 +4315,508 @@ public interface Function_clang_Type_visitFields { @Generated int call_clang_Type_visitFields(@ByValue CXCursor arg0, VoidPtr arg1); } + + /** + * Sets the invocation emission path option in a CXIndex. + *

+ * The invocation emission path specifies a path which will contain log + * files for certain libclang invocations. A null value (default) implies that + * libclang invocations are not logged.. + */ + @Generated + @CFunction + public static native void clang_CXIndex_setInvocationEmissionPathOption(VoidPtr arg1, + @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String Path); + + /** + * Retrieve the buffer associated with the given file. + *

+ * \param tu the translation unit + *

+ * \param file the file for which to retrieve the buffer. + *

+ * \param size [out] if non-NULL, will be set to the size of the buffer. + *

+ * \returns a pointer to the buffer in memory that holds the contents of + * \p file, or a NULL pointer when the file is not loaded. + */ + @Generated + @CFunction + @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") + public static native String clang_getFileContents(CXTranslationUnit tu, VoidPtr file, LongPtr size); + + /** + * Returns the real path name of \c file. + *

+ * An empty string may be returned. Use \c clang_getFileName() in that case. + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_File_tryGetRealPathName(VoidPtr file); + + /** + * Retrieve all ranges from all files that were skipped by the + * preprocessor. + *

+ * The preprocessor will skip lines when they are surrounded by an + * if/ifdef/ifndef directive whose condition does not evaluate to true. + */ + @Generated + @CFunction + @UncertainReturn("Options: reference, array Fallback: reference") + public static native CXSourceRangeList clang_getAllSkippedRanges(CXTranslationUnit tu); + + /** + * Suspend a translation unit in order to free memory associated with it. + *

+ * A suspended translation unit uses significantly less memory but on the other + * side does not support any other calls than \c clang_reparseTranslationUnit + * to resume it or \c clang_disposeTranslationUnit to dispose it completely. + */ + @Generated + @CFunction + public static native int clang_suspendTranslationUnit(CXTranslationUnit arg1); + + /** + * Get target information for this translation unit. + *

+ * The CXTargetInfo object cannot outlive the CXTranslationUnit object. + */ + @Generated + @CFunction + public static native CXTargetInfo clang_getTranslationUnitTargetInfo(CXTranslationUnit CTUnit); + + /** + * Destroy the CXTargetInfo object. + */ + @Generated + @CFunction + public static native void clang_TargetInfo_dispose(CXTargetInfo Info); + + /** + * Get the normalized target triple as a string. + *

+ * Returns the empty string in case of any error. + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_TargetInfo_getTriple(CXTargetInfo Info); + + /** + * Get the pointer width of the target in bits. + *

+ * Returns -1 in case of error. + */ + @Generated + @CFunction + public static native int clang_TargetInfo_getPointerWidth(CXTargetInfo Info); + + /** + * Determine whether the given declaration is invalid. + *

+ * A declaration is invalid if it could not be parsed successfully. + *

+ * \returns non-zero if the cursor represents a declaration and it is + * invalid, otherwise NULL. + */ + @Generated + @CFunction + public static native int clang_isInvalidDeclaration(@ByValue CXCursor arg1); + + /** + * If cursor refers to a variable declaration and it has initializer returns + * cursor referring to the initializer otherwise return null cursor. + */ + @Generated + @CFunction + @ByValue + public static native CXCursor clang_Cursor_getVarDeclInitializer(@ByValue CXCursor cursor); + + /** + * If cursor refers to a variable declaration that has global storage returns 1. + * If cursor refers to a variable declaration that doesn't have global storage + * returns 0. Otherwise returns -1. + */ + @Generated + @CFunction + public static native int clang_Cursor_hasVarDeclGlobalStorage(@ByValue CXCursor cursor); + + /** + * If cursor refers to a variable declaration that has external storage + * returns 1. If cursor refers to a variable declaration that doesn't have + * external storage returns 0. Otherwise returns -1. + */ + @Generated + @CFunction + public static native int clang_Cursor_hasVarDeclExternalStorage(@ByValue CXCursor cursor); + + /** + * Determine the "thread-local storage (TLS) kind" of the declaration + * referred to by a cursor. + */ + @Generated + @CFunction + public static native int clang_getCursorTLSKind(@ByValue CXCursor cursor); + + /** + * Returns the address space of the given type. + */ + @Generated + @CFunction + public static native int clang_getAddressSpace(@ByValue CXType T); + + /** + * Returns the typedef name of the given type. + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_getTypedefName(@ByValue CXType CT); + + /** + * Retrieve the exception specification type associated with a function type. + * This is a value of type CXCursor_ExceptionSpecificationKind. + *

+ * If a non-function type is passed in, an error code of -1 is returned. + */ + @Generated + @CFunction + public static native int clang_getExceptionSpecificationType(@ByValue CXType T); + + /** + * Retrieves the base type of the ObjCObjectType. + *

+ * If the type is not an ObjC object, an invalid type is returned. + */ + @Generated + @CFunction + @ByValue + public static native CXType clang_Type_getObjCObjectBaseType(@ByValue CXType T); + + /** + * Retrieve the number of protocol references associated with an ObjC object/id. + *

+ * If the type is not an ObjC object, 0 is returned. + */ + @Generated + @CFunction + public static native int clang_Type_getNumObjCProtocolRefs(@ByValue CXType T); + + /** + * Retrieve the decl for a protocol reference for an ObjC object/id. + *

+ * If the type is not an ObjC object or there are not enough protocol + * references, an invalid cursor is returned. + */ + @Generated + @CFunction + @ByValue + public static native CXCursor clang_Type_getObjCProtocolDecl(@ByValue CXType T, int i); + + /** + * Retrieve the number of type arguments associated with an ObjC object. + *

+ * If the type is not an ObjC object, 0 is returned. + */ + @Generated + @CFunction + public static native int clang_Type_getNumObjCTypeArgs(@ByValue CXType T); + + /** + * Retrieve a type argument associated with an ObjC object. + *

+ * If the type is not an ObjC or the index is not valid, + * an invalid type is returned. + */ + @Generated + @CFunction + @ByValue + public static native CXType clang_Type_getObjCTypeArg(@ByValue CXType T, int i); + + /** + * 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. + */ + @Generated + @CFunction + public static native int clang_getCursorExceptionSpecificationType(@ByValue CXCursor C); + + /** + * Determine if a typedef is 'transparent' tag. + *

+ * A typedef is considered 'transparent' if it shares a name and spelling + * location with its underlying tag type, as is the case with the NS_ENUM macro. + *

+ * \returns non-zero if transparent and zero otherwise. + */ + @Generated + @CFunction + public static native int clang_Type_isTransparentTagTypedef(@ByValue CXType T); + + /** + * Retrieve the nullability kind of a pointer type. + */ + @Generated + @CFunction + public static native int clang_Type_getNullability(@ByValue CXType T); + + /** + * Return the type that was modified by this attributed type. + *

+ * If the type is not an attributed type, an invalid type is returned. + */ + @Generated + @CFunction + @ByValue + public static native CXType clang_Type_getModifiedType(@ByValue CXType T); + + /** + * Gets the type contained by this atomic type. + *

+ * If a non-atomic type is passed in, an invalid type is returned. + */ + @Generated + @CFunction + @ByValue + public static native CXType clang_Type_getValueType(@ByValue CXType CT); + + /** + * Determine whether the given cursor represents an anonymous record + * declaration. + */ + @Generated + @CFunction + public static native int clang_Cursor_isAnonymousRecordDecl(@ByValue CXCursor C); + + /** + * Determine whether the given cursor represents an inline namespace + * declaration. + */ + @Generated + @CFunction + public static native int clang_Cursor_isInlineNamespace(@ByValue CXCursor C); + + /** + * Get a property value for the given printing policy. + */ + @Generated + @CFunction + public static native int clang_PrintingPolicy_getProperty(VoidPtr Policy, int Property); + + /** + * Set a property value for the given printing policy. + */ + @Generated + @CFunction + public static native void clang_PrintingPolicy_setProperty(VoidPtr Policy, int Property, int Value); + + /** + * Retrieve the default policy for the cursor. + *

+ * The policy should be released after use with \c + * clang_PrintingPolicy_dispose. + */ + @Generated + @CFunction + public static native VoidPtr clang_getCursorPrintingPolicy(@ByValue CXCursor arg1); + + /** + * Release a printing policy. + */ + @Generated + @CFunction + public static native void clang_PrintingPolicy_dispose(VoidPtr Policy); + + /** + * Pretty print declarations. + *

+ * \param Cursor The cursor representing a declaration. + *

+ * \param Policy The policy to control the entities being printed. If + * NULL, a default policy is used. + *

+ * \returns The pretty printed declaration or the empty string for + * other cursors. + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_getCursorPrettyPrinted(@ByValue CXCursor Cursor, VoidPtr Policy); + + /** + * Given a cursor that represents a property declaration, return the + * name of the method that implements the getter. + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_Cursor_getObjCPropertyGetterName(@ByValue CXCursor C); + + /** + * Given a cursor that represents a property declaration, return the + * name of the method that implements the setter, if any. + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_Cursor_getObjCPropertySetterName(@ByValue CXCursor C); + + /** + * Returns non-zero if the given cursor points to a symbol marked with + * external_source_symbol attribute. + *

+ * \param language If non-NULL, and the attribute is present, will be set to + * the 'language' string from the attribute. + *

+ * \param definedIn If non-NULL, and the attribute is present, will be set to + * the 'definedIn' string from the attribute. + *

+ * \param isGenerated If non-NULL, and the attribute is present, will be set to + * non-zero if the 'generated_declaration' is set in the attribute. + */ + @Generated + @CFunction + public static native int clang_Cursor_isExternalSymbol(@ByValue CXCursor C, + @UncertainArgument("Options: reference, array Fallback: reference") CXString language, + @UncertainArgument("Options: reference, array Fallback: reference") CXString definedIn, IntPtr isGenerated); + + /** + * Retrieve the CXStrings representing the mangled symbols of the ObjC + * class interface or implementation at the cursor. + */ + @Generated + @CFunction + @UncertainReturn("Options: reference, array Fallback: reference") + public static native CXStringSet clang_Cursor_getObjCManglings(@ByValue CXCursor arg1); + + /** + * Determine if a C++ record is abstract, i.e. whether a class or struct + * has a pure virtual member function. + */ + @Generated + @CFunction + public static native int clang_CXXRecord_isAbstract(@ByValue CXCursor C); + + /** + * Determine if an enum declaration refers to a scoped enum. + */ + @Generated + @CFunction + public static native int clang_EnumDecl_isScoped(@ByValue CXCursor C); + + /** + * Get the raw lexical token starting with the given location. + *

+ * \param TU the translation unit whose text is being tokenized. + *

+ * \param Location the source location with which the token starts. + *

+ * \returns The token starting with the given location or NULL if no such token + * exist. The returned pointer must be freed with clang_disposeTokens before the + * translation unit is destroyed. + */ + @Generated + @CFunction + @UncertainReturn("Options: reference, array Fallback: reference") + public static native CXToken clang_getToken(CXTranslationUnit TU, @ByValue CXSourceLocation Location); + + /** + * Retrieve the number of fix-its for the given completion index. + *

+ * Calling this makes sense only if CXCodeComplete_IncludeCompletionsWithFixIts + * option was set. + *

+ * \param results The structure keeping all completion results + *

+ * \param completion_index The index of the completion + *

+ * \return The number of fix-its which must be applied before the completion at + * completion_index can be applied + */ + @Generated + @CFunction + public static native int clang_getCompletionNumFixIts( + @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults results, + int completion_index); + + /** + * Fix-its that *must* be applied before inserting the text for the + * corresponding completion. + *

+ * By default, clang_codeCompleteAt() only returns completions with empty + * fix-its. Extra completions with non-empty fix-its should be explicitly + * requested by setting CXCodeComplete_IncludeCompletionsWithFixIts. + *

+ * For the clients to be able to compute position of the cursor after applying + * fix-its, the following conditions are guaranteed to hold for + * replacement_range of the stored fix-its: + * - Ranges in the fix-its are guaranteed to never contain the completion + * point (or identifier under completion point, if any) inside them, except + * at the start or at the end of the range. + * - If a fix-it range starts or ends with completion point (or starts or + * ends after the identifier under completion point), it will contain at + * least one character. It allows to unambiguously recompute completion + * point after applying the fix-it. + *

+ * The intuition is that provided fix-its change code around the identifier we + * complete, but are not allowed to touch the identifier itself or the + * completion point. One example of completions with corrections are the ones + * replacing '.' with '->' and vice versa: + *

+ * std::unique_ptr> vec_ptr; + * In 'vec_ptr.^', one of the completions is 'push_back', it requires + * replacing '.' with '->'. + * In 'vec_ptr->^', one of the completions is 'release', it requires + * replacing '->' with '.'. + *

+ * \param results The structure keeping all completion results + *

+ * \param completion_index The index of the completion + *

+ * \param fixit_index The index of the fix-it for the completion at + * completion_index + *

+ * \param replacement_range The fix-it range that must be replaced before the + * completion at completion_index can be applied + *

+ * \returns The fix-it string that must replace the code at replacement_range + * before the completion at completion_index can be applied + */ + @Generated + @CFunction + @ByValue + public static native CXString clang_getCompletionFixIt( + @UncertainArgument("Options: reference, array Fallback: reference") CXCodeCompleteResults results, + int completion_index, int fixit_index, + @UncertainArgument("Options: reference, array Fallback: reference") CXSourceRange replacement_range); + + /** + * 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. + */ + @Generated + @CFunction + public static native long clang_EvalResult_getAsLongLong(VoidPtr E); + + /** + * Returns a non-zero value if the kind is Int and the evaluation + * result resulted in an unsigned integer. + */ + @Generated + @CFunction + public static native int clang_EvalResult_isUnsignedInt(VoidPtr E); + + /** + * Returns the evaluation result as an unsigned integer if + * the kind is Int and clang_EvalResult_isUnsignedInt is non-zero. + */ + @Generated + @CFunction + public static native long clang_EvalResult_getAsUnsigned(VoidPtr E); } diff --git a/src/main/java/org/clang/enums/CXAvailabilityKind.java b/src/main/java/org/clang/enums/CXAvailabilityKind.java index 61077b0..612e171 100644 --- a/src/main/java/org/clang/enums/CXAvailabilityKind.java +++ b/src/main/java/org/clang/enums/CXAvailabilityKind.java @@ -18,11 +18,30 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the availability of a particular entity, which indicates + * whether the use of this entity will result in a warning or error due to + * it being deprecated or unavailable. + */ @Generated public final class CXAvailabilityKind { + /** + * The entity is available. + */ @Generated public static final int Available = 0x00000000; + /** + * The entity is available, but has been deprecated (and its use is + * not recommended). + */ @Generated public static final int Deprecated = 0x00000001; + /** + * The entity is not available; any use of it will be an error. + */ @Generated public static final int NotAvailable = 0x00000002; + /** + * The entity is available, but not accessible; any use of it will be + * an error. + */ @Generated public static final int NotAccessible = 0x00000003; @Generated diff --git a/src/main/java/org/clang/enums/CXCallingConv.java b/src/main/java/org/clang/enums/CXCallingConv.java index 22a7488..9f0b36b 100644 --- a/src/main/java/org/clang/enums/CXCallingConv.java +++ b/src/main/java/org/clang/enums/CXCallingConv.java @@ -18,6 +18,9 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the calling convention of a function type + */ @Generated public final class CXCallingConv { @Generated public static final int Default = 0x00000000; @@ -29,16 +32,51 @@ public final class CXCallingConv { @Generated public static final int AAPCS = 0x00000006; @Generated public static final int AAPCS_VFP = 0x00000007; @Generated public static final int IntelOclBicc = 0x00000009; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int X86_64Win64 = 0x0000000A; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int X86_64SysV = 0x0000000B; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int X86VectorCall = 0x0000000C; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int Invalid = 0x00000064; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int Unexposed = 0x000000C8; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int Swift = 0x0000000D; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int PreserveMost = 0x0000000E; + /** + * Alias for compatibility with older versions of API. + */ @Generated public static final int PreserveAll = 0x0000000F; @Generated private CXCallingConv() { } + + @Generated public static final int X86RegCall = 0x00000008; + @Generated public static final int Win64 = 0x0000000A; + /** + * Alias for compatibility with older versions of API. + */ + @Generated public static final int AArch64VectorCall = 0x00000010; + /** + * Alias for compatibility with older versions of API. + */ + @Generated public static final int SwiftAsync = 0x00000011; } diff --git a/src/main/java/org/clang/enums/CXChildVisitResult.java b/src/main/java/org/clang/enums/CXChildVisitResult.java index 603efa4..8907155 100644 --- a/src/main/java/org/clang/enums/CXChildVisitResult.java +++ b/src/main/java/org/clang/enums/CXChildVisitResult.java @@ -18,10 +18,28 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes how the traversal of the children of a particular + * cursor should proceed after visiting a particular child cursor. + *

+ * A value of this enumeration type should be returned by each + * \c CXCursorVisitor to indicate how clang_visitChildren() proceed. + */ @Generated public final class CXChildVisitResult { + /** + * Terminates the cursor traversal. + */ @Generated public static final int Break = 0x00000000; + /** + * Continues the cursor traversal with the next sibling of + * the cursor just visited, without visiting its children. + */ @Generated public static final int Continue = 0x00000001; + /** + * Recursively traverse the children of this cursor, using + * the same visitor and client data. + */ @Generated public static final int Recurse = 0x00000002; @Generated diff --git a/src/main/java/org/clang/enums/CXCodeComplete_Flags.java b/src/main/java/org/clang/enums/CXCodeComplete_Flags.java index 4f3573b..6554629 100644 --- a/src/main/java/org/clang/enums/CXCodeComplete_Flags.java +++ b/src/main/java/org/clang/enums/CXCodeComplete_Flags.java @@ -18,13 +18,43 @@ import org.moe.natj.general.ann.Generated; +/** + * Flags that can be passed to \c clang_codeCompleteAt() to + * modify its behavior. + *

+ * The enumerators in this enumeration can be bitwise-OR'd together to + * provide multiple options to \c clang_codeCompleteAt(). + */ @Generated public final class CXCodeComplete_Flags { - @Generated public static final int Macros = 0x00000001; - @Generated public static final int CodePatterns = 0x00000002; - @Generated public static final int BriefComments = 0x00000004; - @Generated private CXCodeComplete_Flags() { } + + /** + * Whether to include macros within the set of code + * completions returned. + */ + @Generated public static final int IncludeMacros = 0x00000001; + /** + * Whether to include code patterns for language constructs + * within the set of code completions, e.g., for loops. + */ + @Generated public static final int IncludeCodePatterns = 0x00000002; + /** + * Whether to include brief documentation within the set of code + * completions returned. + */ + @Generated public static final int IncludeBriefComments = 0x00000004; + /** + * Whether to speed up completion by omitting top- or namespace-level entities + * defined in the preamble. There's no guarantee any particular entity is + * omitted. This may be useful if the headers are indexed externally. + */ + @Generated public static final int SkipPreamble = 0x00000008; + /** + * Whether to include completions with small + * fix-its, e.g. change '.' to '->' on member access, etc. + */ + @Generated public static final int IncludeCompletionsWithFixIts = 0x00000010; } diff --git a/src/main/java/org/clang/enums/CXCommentInlineCommandRenderKind.java b/src/main/java/org/clang/enums/CXCommentInlineCommandRenderKind.java index 8884fea..0da1cd0 100644 --- a/src/main/java/org/clang/enums/CXCommentInlineCommandRenderKind.java +++ b/src/main/java/org/clang/enums/CXCommentInlineCommandRenderKind.java @@ -18,14 +18,36 @@ import org.moe.natj.general.ann.Generated; +/** + * The most appropriate rendering mode for an inline command, chosen on + * command semantics in Doxygen. + */ @Generated public final class CXCommentInlineCommandRenderKind { + /** + * Command argument should be rendered in a normal font. + */ @Generated public static final int Normal = 0x00000000; + /** + * Command argument should be rendered in a bold font. + */ @Generated public static final int Bold = 0x00000001; + /** + * Command argument should be rendered in a monospaced font. + */ @Generated public static final int Monospaced = 0x00000002; + /** + * Command argument should be rendered emphasized (typically italic + * font). + */ @Generated public static final int Emphasized = 0x00000003; @Generated private CXCommentInlineCommandRenderKind() { } + + /** + * Command argument should not be rendered (since it only defines an anchor). + */ + @Generated public static final int Anchor = 0x00000004; } diff --git a/src/main/java/org/clang/enums/CXCommentKind.java b/src/main/java/org/clang/enums/CXCommentKind.java index 6c7fcd7..711e94c 100644 --- a/src/main/java/org/clang/enums/CXCommentKind.java +++ b/src/main/java/org/clang/enums/CXCommentKind.java @@ -18,20 +18,104 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the type of the comment AST node (\c CXComment). A comment + * node can be considered block content (e. g., paragraph), inline content + * (plain text) or neither (the root AST node). + */ @Generated public final class CXCommentKind { + /** + * Null comment. No AST node is constructed at the requested location + * because there is no text or a syntax error. + */ @Generated public static final int Null = 0x00000000; + /** + * Plain text. Inline content. + */ @Generated public static final int Text = 0x00000001; + /** + * A command with word-like arguments that is considered inline content. + *

+ * For example: \\c command. + */ @Generated public static final int InlineCommand = 0x00000002; + /** + * HTML start tag with attributes (name-value pairs). Considered + * inline content. + *

+ * For example: + * \verbatim + *

+ * \endverbatim + */ @Generated public static final int HTMLStartTag = 0x00000003; + /** + * HTML end tag. Considered inline content. + *

+ * For example: + * \verbatim + * + * \endverbatim + */ @Generated public static final int HTMLEndTag = 0x00000004; + /** + * A paragraph, contains inline comment. The paragraph itself is + * block content. + */ @Generated public static final int Paragraph = 0x00000005; + /** + * A command that has zero or more word-like arguments (number of + * word-like arguments depends on command name) and a paragraph as an + * argument. Block command is block content. + *

+ * Paragraph argument is also a child of the block command. + *

+ * For example: \has 0 word-like arguments and a paragraph argument. + *

+ * AST nodes of special kinds that parser knows about (e. g., \\param + * command) have their own node kinds. + */ @Generated public static final int BlockCommand = 0x00000006; + /** + * A \\param or \\arg command that describes the function parameter + * (name, passing direction, description). + *

+ * For example: \\param [in] ParamName description. + */ @Generated public static final int ParamCommand = 0x00000007; + /** + * A \\tparam command that describes a template parameter (name and + * description). + *

+ * For example: \\tparam T description. + */ @Generated public static final int TParamCommand = 0x00000008; + /** + * A verbatim block command (e. g., preformatted code). Verbatim + * block has an opening and a closing command and contains multiple lines of + * text (\c CXComment_VerbatimBlockLine child nodes). + *

+ * For example: + * \\verbatim + * aaa + * \\endverbatim + */ @Generated public static final int VerbatimBlockCommand = 0x00000009; + /** + * A line of text that is contained within a + * CXComment_VerbatimBlockCommand node. + */ @Generated public static final int VerbatimBlockLine = 0x0000000A; + /** + * A verbatim line command. Verbatim line has an opening command, + * a single line of text (up to the newline after the opening command) and + * has no closing command. + */ @Generated public static final int VerbatimLine = 0x0000000B; + /** + * A full comment attached to a declaration, contains block content. + */ @Generated public static final int FullComment = 0x0000000C; @Generated diff --git a/src/main/java/org/clang/enums/CXCommentParamPassDirection.java b/src/main/java/org/clang/enums/CXCommentParamPassDirection.java index ce3cfc6..d53c9f0 100644 --- a/src/main/java/org/clang/enums/CXCommentParamPassDirection.java +++ b/src/main/java/org/clang/enums/CXCommentParamPassDirection.java @@ -18,10 +18,22 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes parameter passing direction for \\param or \\arg command. + */ @Generated public final class CXCommentParamPassDirection { + /** + * The parameter is an input parameter. + */ @Generated public static final int In = 0x00000000; + /** + * The parameter is an output parameter. + */ @Generated public static final int Out = 0x00000001; + /** + * The parameter is an input and output parameter. + */ @Generated public static final int InOut = 0x00000002; @Generated diff --git a/src/main/java/org/clang/enums/CXCompletionChunkKind.java b/src/main/java/org/clang/enums/CXCompletionChunkKind.java index b9cdfad..3fc132e 100644 --- a/src/main/java/org/clang/enums/CXCompletionChunkKind.java +++ b/src/main/java/org/clang/enums/CXCompletionChunkKind.java @@ -18,28 +18,175 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes a single piece of text within a code-completion string. + *

+ * Each "chunk" within a code-completion string (\c CXCompletionString) is + * either a piece of text with a specific "kind" that describes how that text + * should be interpreted by the client or is another completion string. + */ @Generated public final class CXCompletionChunkKind { + /** + * A code-completion string that describes "optional" text that + * could be a part of the template (but is not required). + *

+ * The Optional chunk is the only kind of chunk that has a code-completion + * string for its representation, which is accessible via + * \c clang_getCompletionChunkCompletionString(). The code-completion string + * describes an additional part of the template that is completely optional. + * For example, optional chunks can be used to describe the placeholders for + * arguments that match up with defaulted function parameters, e.g. given: + *

+ * \code + * void f(int x, float y = 3.14, double z = 2.71828); + * \endcode + *

+ * The code-completion string for this function would contain: + * - a TypedText chunk for "f". + * - a LeftParen chunk for "(". + * - a Placeholder chunk for "int x" + * - an Optional chunk containing the remaining defaulted arguments, e.g., + * - a Comma chunk for "," + * - a Placeholder chunk for "float y" + * - an Optional chunk containing the last defaulted argument: + * - a Comma chunk for "," + * - a Placeholder chunk for "double z" + * - a RightParen chunk for ")" + *

+ * There are many ways to handle Optional chunks. Two simple approaches are: + * - Completely ignore optional chunks, in which case the template for the + * function "f" would only include the first parameter ("int x"). + * - Fully expand all optional chunks, in which case the template for the + * function "f" would have all of the parameters. + */ @Generated public static final int Optional = 0x00000000; + /** + * Text that a user would be expected to type to get this + * code-completion result. + *

+ * There will be exactly one "typed text" chunk in a semantic string, which + * will typically provide the spelling of a keyword or the name of a + * declaration that could be used at the current code point. Clients are + * expected to filter the code-completion results based on the text in this + * chunk. + */ @Generated public static final int TypedText = 0x00000001; + /** + * Text that should be inserted as part of a code-completion result. + *

+ * A "text" chunk represents text that is part of the template to be + * inserted into user code should this particular code-completion result + * be selected. + */ @Generated public static final int Text = 0x00000002; + /** + * Placeholder text that should be replaced by the user. + *

+ * A "placeholder" chunk marks a place where the user should insert text + * into the code-completion template. For example, placeholders might mark + * the function parameters for a function declaration, to indicate that the + * user should provide arguments for each of those parameters. The actual + * text in a placeholder is a suggestion for the text to display before + * the user replaces the placeholder with real code. + */ @Generated public static final int Placeholder = 0x00000003; + /** + * Informative text that should be displayed but never inserted as + * part of the template. + *

+ * An "informative" chunk contains annotations that can be displayed to + * help the user decide whether a particular code-completion result is the + * right option, but which is not part of the actual template to be inserted + * by code completion. + */ @Generated public static final int Informative = 0x00000004; + /** + * Text that describes the current parameter when code-completion is + * referring to function call, message send, or template specialization. + *

+ * A "current parameter" chunk occurs when code-completion is providing + * information about a parameter corresponding to the argument at the + * code-completion point. For example, given a function + *

+ * \code + * int add(int x, int y); + * \endcode + *

+ * and the source code \c add(, where the code-completion point is after the + * "(", the code-completion string will contain a "current parameter" chunk + * for "int x", indicating that the current argument will initialize that + * parameter. After typing further, to \c add(17, (where the code-completion + * point is after the ","), the code-completion string will contain a + * "current parameter" chunk to "int y". + */ @Generated public static final int CurrentParameter = 0x00000005; + /** + * A left parenthesis ('('), used to initiate a function call or + * signal the beginning of a function parameter list. + */ @Generated public static final int LeftParen = 0x00000006; + /** + * A right parenthesis (')'), used to finish a function call or + * signal the end of a function parameter list. + */ @Generated public static final int RightParen = 0x00000007; + /** + * A left bracket ('['). + */ @Generated public static final int LeftBracket = 0x00000008; + /** + * A right bracket (']'). + */ @Generated public static final int RightBracket = 0x00000009; + /** + * A left brace ('{'). + */ @Generated public static final int LeftBrace = 0x0000000A; + /** + * A right brace ('}'). + */ @Generated public static final int RightBrace = 0x0000000B; + /** + * A left angle bracket ('<'). + */ @Generated public static final int LeftAngle = 0x0000000C; + /** + * A right angle bracket ('>'). + */ @Generated public static final int RightAngle = 0x0000000D; + /** + * A comma separator (','). + */ @Generated public static final int Comma = 0x0000000E; + /** + * Text that specifies the result type of a given result. + *

+ * This special kind of informative chunk is not meant to be inserted into + * the text buffer. Rather, it is meant to illustrate the type that an + * expression using the given completion string would have. + */ @Generated public static final int ResultType = 0x0000000F; + /** + * A colon (':'). + */ @Generated public static final int Colon = 0x00000010; + /** + * A semicolon (';'). + */ @Generated public static final int SemiColon = 0x00000011; + /** + * An '=' sign. + */ @Generated public static final int Equal = 0x00000012; + /** + * Horizontal space (' '). + */ @Generated public static final int HorizontalSpace = 0x00000013; + /** + * Vertical space ('\\n'), after which it is generally a good idea to + * perform indentation. + */ @Generated public static final int VerticalSpace = 0x00000014; @Generated diff --git a/src/main/java/org/clang/enums/CXCompletionContext.java b/src/main/java/org/clang/enums/CXCompletionContext.java index 3d4202f..89a1ad8 100644 --- a/src/main/java/org/clang/enums/CXCompletionContext.java +++ b/src/main/java/org/clang/enums/CXCompletionContext.java @@ -18,34 +18,134 @@ import org.moe.natj.general.ann.Generated; +/** + * Bits that represent the context under which completion is occurring. + *

+ * The enumerators in this enumeration may be bitwise-OR'd together if multiple + * contexts are occurring simultaneously. + */ @Generated public final class CXCompletionContext { + /** + * The context for completions is unexposed, as only Clang results + * should be included. (This is equivalent to having no context bits set.) + */ @Generated public static final int Unexposed = 0x00000000; + /** + * Completions for any possible type should be included in the results. + */ @Generated public static final int AnyType = 0x00000001; + /** + * Completions for any possible value (variables, function calls, etc.) + * should be included in the results. + */ @Generated public static final int AnyValue = 0x00000002; + /** + * Completions for values that resolve to an Objective-C object should + * be included in the results. + */ @Generated public static final int ObjCObjectValue = 0x00000004; + /** + * Completions for values that resolve to an Objective-C selector + * should be included in the results. + */ @Generated public static final int ObjCSelectorValue = 0x00000008; + /** + * Completions for values that resolve to a C++ class type should be + * included in the results. + */ @Generated public static final int CXXClassTypeValue = 0x00000010; + /** + * Completions for fields of the member being accessed using the dot + * operator should be included in the results. + */ @Generated public static final int DotMemberAccess = 0x00000020; + /** + * Completions for fields of the member being accessed using the arrow + * operator should be included in the results. + */ @Generated public static final int ArrowMemberAccess = 0x00000040; + /** + * Completions for properties of the Objective-C object being accessed + * using the dot operator should be included in the results. + */ @Generated public static final int ObjCPropertyAccess = 0x00000080; + /** + * Completions for enum tags should be included in the results. + */ @Generated public static final int EnumTag = 0x00000100; + /** + * Completions for union tags should be included in the results. + */ @Generated public static final int UnionTag = 0x00000200; + /** + * Completions for struct tags should be included in the results. + */ @Generated public static final int StructTag = 0x00000400; + /** + * Completions for C++ class names should be included in the results. + */ @Generated public static final int ClassTag = 0x00000800; + /** + * Completions for C++ namespaces and namespace aliases should be + * included in the results. + */ @Generated public static final int Namespace = 0x00001000; + /** + * Completions for C++ nested name specifiers should be included in + * the results. + */ @Generated public static final int NestedNameSpecifier = 0x00002000; + /** + * Completions for Objective-C interfaces (classes) should be included + * in the results. + */ @Generated public static final int ObjCInterface = 0x00004000; + /** + * Completions for Objective-C protocols should be included in + * the results. + */ @Generated public static final int ObjCProtocol = 0x00008000; + /** + * Completions for Objective-C categories should be included in + * the results. + */ @Generated public static final int ObjCCategory = 0x00010000; + /** + * Completions for Objective-C instance messages should be included + * in the results. + */ @Generated public static final int ObjCInstanceMessage = 0x00020000; + /** + * Completions for Objective-C class messages should be included in + * the results. + */ @Generated public static final int ObjCClassMessage = 0x00040000; + /** + * Completions for Objective-C selector names should be included in + * the results. + */ @Generated public static final int ObjCSelectorName = 0x00080000; + /** + * Completions for preprocessor macro names should be included in + * the results. + */ @Generated public static final int MacroName = 0x00100000; + /** + * Natural language completions should be included in the results. + */ @Generated public static final int NaturalLanguage = 0x00200000; - @Generated public static final int Unknown = 0x003FFFFF; + /** + * The current context is unknown, so set all contexts. + */ + @Generated public static final int Unknown = 0x007FFFFF; @Generated private CXCompletionContext() { } + + /** + * #include file completions should be included in the results. + */ + @Generated public static final int IncludedFile = 0x00400000; } diff --git a/src/main/java/org/clang/enums/CXCursorKind.java b/src/main/java/org/clang/enums/CXCursorKind.java index 013b4d4..d18cc6c 100644 --- a/src/main/java/org/clang/enums/CXCursorKind.java +++ b/src/main/java/org/clang/enums/CXCursorKind.java @@ -18,230 +18,1305 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the kind of entity that a cursor refers to. + */ @Generated public final class CXCursorKind { + /** + * Declarations + * A declaration whose specific kind is not exposed via this + * interface. + *

+ * Unexposed declarations have the same operations as any other kind + * of declaration; one can extract their location information, + * spelling, find their definitions, etc. However, the specific kind + * of the declaration is not reported. + */ @Generated public static final int UnexposedDecl = 0x00000001; + /** + * A C or C++ struct. + */ @Generated public static final int StructDecl = 0x00000002; + /** + * A C or C++ union. + */ @Generated public static final int UnionDecl = 0x00000003; + /** + * A C++ class. + */ @Generated public static final int ClassDecl = 0x00000004; + /** + * An enumeration. + */ @Generated public static final int EnumDecl = 0x00000005; + /** + * A field (in C) or non-static data member (in C++) in a + * struct, union, or C++ class. + */ @Generated public static final int FieldDecl = 0x00000006; + /** + * An enumerator constant. + */ @Generated public static final int EnumConstantDecl = 0x00000007; + /** + * A function. + */ @Generated public static final int FunctionDecl = 0x00000008; + /** + * A variable. + */ @Generated public static final int VarDecl = 0x00000009; + /** + * A function or method parameter. + */ @Generated public static final int ParmDecl = 0x0000000A; + /** + * An Objective-C \@interface. + */ @Generated public static final int ObjCInterfaceDecl = 0x0000000B; + /** + * An Objective-C \@interface for a category. + */ @Generated public static final int ObjCCategoryDecl = 0x0000000C; + /** + * An Objective-C \@protocol declaration. + */ @Generated public static final int ObjCProtocolDecl = 0x0000000D; + /** + * An Objective-C \@property declaration. + */ @Generated public static final int ObjCPropertyDecl = 0x0000000E; + /** + * An Objective-C instance variable. + */ @Generated public static final int ObjCIvarDecl = 0x0000000F; + /** + * An Objective-C instance method. + */ @Generated public static final int ObjCInstanceMethodDecl = 0x00000010; + /** + * An Objective-C class method. + */ @Generated public static final int ObjCClassMethodDecl = 0x00000011; + /** + * An Objective-C \@implementation. + */ @Generated public static final int ObjCImplementationDecl = 0x00000012; + /** + * An Objective-C \@implementation for a category. + */ @Generated public static final int ObjCCategoryImplDecl = 0x00000013; + /** + * A typedef. + */ @Generated public static final int TypedefDecl = 0x00000014; + /** + * A C++ class method. + */ @Generated public static final int CXXMethod = 0x00000015; + /** + * A C++ namespace. + */ @Generated public static final int Namespace = 0x00000016; + /** + * A linkage specification, e.g. 'extern "C"'. + */ @Generated public static final int LinkageSpec = 0x00000017; + /** + * A C++ constructor. + */ @Generated public static final int Constructor = 0x00000018; + /** + * A C++ destructor. + */ @Generated public static final int Destructor = 0x00000019; + /** + * A C++ conversion function. + */ @Generated public static final int ConversionFunction = 0x0000001A; + /** + * A C++ template type parameter. + */ @Generated public static final int TemplateTypeParameter = 0x0000001B; + /** + * A C++ non-type template parameter. + */ @Generated public static final int NonTypeTemplateParameter = 0x0000001C; + /** + * A C++ template template parameter. + */ @Generated public static final int TemplateTemplateParameter = 0x0000001D; + /** + * A C++ function template. + */ @Generated public static final int FunctionTemplate = 0x0000001E; + /** + * A C++ class template. + */ @Generated public static final int ClassTemplate = 0x0000001F; + /** + * A C++ class template partial specialization. + */ @Generated public static final int ClassTemplatePartialSpecialization = 0x00000020; + /** + * A C++ namespace alias declaration. + */ @Generated public static final int NamespaceAlias = 0x00000021; + /** + * A C++ using directive. + */ @Generated public static final int UsingDirective = 0x00000022; + /** + * A C++ using declaration. + */ @Generated public static final int UsingDeclaration = 0x00000023; + /** + * A C++ alias declaration + */ @Generated public static final int TypeAliasDecl = 0x00000024; + /** + * An Objective-C \@synthesize definition. + */ @Generated public static final int ObjCSynthesizeDecl = 0x00000025; + /** + * An Objective-C \@dynamic definition. + */ @Generated public static final int ObjCDynamicDecl = 0x00000026; + /** + * An access specifier. + */ @Generated public static final int CXXAccessSpecifier = 0x00000027; + /** + * An access specifier. + */ @Generated public static final int FirstDecl = 0x00000001; + /** + * An access specifier. + */ @Generated public static final int LastDecl = 0x00000027; + /** + * Decl references + */ @Generated public static final int FirstRef = 0x00000028; @Generated public static final int ObjCSuperClassRef = 0x00000028; @Generated public static final int ObjCProtocolRef = 0x00000029; @Generated public static final int ObjCClassRef = 0x0000002A; + /** + * A reference to a type declaration. + *

+ * A type reference occurs anywhere where a type is named but not + * declared. For example, given: + *

+ * \code + * typedef unsigned size_type; + * size_type size; + * \endcode + *

+ * The typedef is a declaration of size_type (CXCursor_TypedefDecl), + * while the type of the variable "size" is referenced. The cursor + * referenced by the type of size is the typedef for size_type. + */ @Generated public static final int TypeRef = 0x0000002B; + /** + * A reference to a type declaration. + *

+ * A type reference occurs anywhere where a type is named but not + * declared. For example, given: + *

+ * \code + * typedef unsigned size_type; + * size_type size; + * \endcode + *

+ * The typedef is a declaration of size_type (CXCursor_TypedefDecl), + * while the type of the variable "size" is referenced. The cursor + * referenced by the type of size is the typedef for size_type. + */ @Generated public static final int CXXBaseSpecifier = 0x0000002C; + /** + * A reference to a class template, function template, template + * template parameter, or class template partial specialization. + */ @Generated public static final int TemplateRef = 0x0000002D; + /** + * A reference to a namespace or namespace alias. + */ @Generated public static final int NamespaceRef = 0x0000002E; + /** + * A reference to a member of a struct, union, or class that occurs in + * some non-expression context, e.g., a designated initializer. + */ @Generated public static final int MemberRef = 0x0000002F; + /** + * A reference to a labeled statement. + *

+ * This cursor kind is used to describe the jump to "start_over" in the + * goto statement in the following example: + *

+ * \code + * start_over: + * ++counter; + *

+ * goto start_over; + * \endcode + *

+ * A label reference cursor refers to a label statement. + */ @Generated public static final int LabelRef = 0x00000030; + /** + * A reference to a set of overloaded functions or function templates + * that has not yet been resolved to a specific function or function template. + *

+ * An overloaded declaration reference cursor occurs in C++ templates where + * a dependent name refers to a function. For example: + *

+ * \code + * template void swap(T&, T&); + *

+ * struct X { ... }; + * void swap(X&, X&); + *

+ * template + * void reverse(T* first, T* last) { + * while (first < last - 1) { + * swap(*first, *--last); + * ++first; + * } + * } + *

+ * struct Y { }; + * void swap(Y&, Y&); + * \endcode + *

+ * Here, the identifier "swap" is associated with an overloaded declaration + * reference. In the template definition, "swap" refers to either of the two + * "swap" functions declared above, so both results will be available. At + * instantiation time, "swap" may also refer to other functions found via + * argument-dependent lookup (e.g., the "swap" function at the end of the + * example). + *

+ * The functions \c clang_getNumOverloadedDecls() and + * \c clang_getOverloadedDecl() can be used to retrieve the definitions + * referenced by this cursor. + */ @Generated public static final int OverloadedDeclRef = 0x00000031; + /** + * A reference to a variable that occurs in some non-expression + * context, e.g., a C++ lambda capture list. + */ @Generated public static final int VariableRef = 0x00000032; + /** + * A reference to a variable that occurs in some non-expression + * context, e.g., a C++ lambda capture list. + */ @Generated public static final int LastRef = 0x00000032; + /** + * Error conditions + */ @Generated public static final int FirstInvalid = 0x00000046; + /** + * Error conditions + */ @Generated public static final int InvalidFile = 0x00000046; + /** + * Error conditions + */ @Generated public static final int NoDeclFound = 0x00000047; + /** + * Error conditions + */ @Generated public static final int NotImplemented = 0x00000048; + /** + * Error conditions + */ @Generated public static final int InvalidCode = 0x00000049; + /** + * Error conditions + */ @Generated public static final int LastInvalid = 0x00000049; + /** + * Expressions + */ @Generated public static final int FirstExpr = 0x00000064; + /** + * An expression whose specific kind is not exposed via this + * interface. + *

+ * Unexposed expressions have the same operations as any other kind + * of expression; one can extract their location information, + * spelling, children, etc. However, the specific kind of the + * expression is not reported. + */ @Generated public static final int UnexposedExpr = 0x00000064; + /** + * An expression that refers to some value declaration, such + * as a function, variable, or enumerator. + */ @Generated public static final int DeclRefExpr = 0x00000065; + /** + * An expression that refers to a member of a struct, union, + * class, Objective-C class, etc. + */ @Generated public static final int MemberRefExpr = 0x00000066; + /** + * An expression that calls a function. + */ @Generated public static final int CallExpr = 0x00000067; + /** + * An expression that sends a message to an Objective-C + * object or class. + */ @Generated public static final int ObjCMessageExpr = 0x00000068; + /** + * An expression that represents a block literal. + */ @Generated public static final int BlockExpr = 0x00000069; + /** + * An integer literal. + */ @Generated public static final int IntegerLiteral = 0x0000006A; + /** + * A floating point number literal. + */ @Generated public static final int FloatingLiteral = 0x0000006B; + /** + * An imaginary number literal. + */ @Generated public static final int ImaginaryLiteral = 0x0000006C; + /** + * A string literal. + */ @Generated public static final int StringLiteral = 0x0000006D; + /** + * A character literal. + */ @Generated public static final int CharacterLiteral = 0x0000006E; + /** + * A parenthesized expression, e.g. "(1)". + *

+ * This AST node is only formed if full location information is requested. + */ @Generated public static final int ParenExpr = 0x0000006F; + /** + * This represents the unary-expression's (except sizeof and + * alignof). + */ @Generated public static final int UnaryOperator = 0x00000070; + /** + * [C99 6.5.2.1] Array Subscripting. + */ @Generated public static final int ArraySubscriptExpr = 0x00000071; + /** + * A builtin binary operation expression such as "x + y" or + * "x <= y". + */ @Generated public static final int BinaryOperator = 0x00000072; + /** + * Compound assignment such as "+=". + */ @Generated public static final int CompoundAssignOperator = 0x00000073; + /** + * The ?: ternary operator. + */ @Generated public static final int ConditionalOperator = 0x00000074; + /** + * 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. + */ @Generated public static final int CStyleCastExpr = 0x00000075; + /** + * [C99 6.5.2.5] + */ @Generated public static final int CompoundLiteralExpr = 0x00000076; + /** + * Describes an C or C++ initializer list. + */ @Generated public static final int InitListExpr = 0x00000077; + /** + * The GNU address of label extension, representing &&label. + */ @Generated public static final int AddrLabelExpr = 0x00000078; + /** + * This is the GNU Statement Expression extension: ({int X=4; X;}) + */ @Generated public static final int StmtExpr = 0x00000079; + /** + * Represents a C11 generic selection. + */ @Generated public static final int GenericSelectionExpr = 0x0000007A; + /** + * 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 + * size and alignment as a pointer. + *

+ * The __null extension is typically only used by system headers, which define + * NULL as __null in C++ rather than using 0 (which is an integer that may not + * match the size of a pointer). + */ @Generated public static final int GNUNullExpr = 0x0000007B; + /** + * C++'s static_cast<> expression. + */ @Generated public static final int CXXStaticCastExpr = 0x0000007C; + /** + * C++'s dynamic_cast<> expression. + */ @Generated public static final int CXXDynamicCastExpr = 0x0000007D; + /** + * C++'s reinterpret_cast<> expression. + */ @Generated public static final int CXXReinterpretCastExpr = 0x0000007E; + /** + * C++'s const_cast<> expression. + */ @Generated public static final int CXXConstCastExpr = 0x0000007F; + /** + * Represents an explicit C++ type conversion that uses "functional" + * notion (C++ [expr.type.conv]). + *

+ * Example: + * \code + * x = int(0.5); + * \endcode + */ @Generated public static final int CXXFunctionalCastExpr = 0x00000080; + /** + * A C++ typeid expression (C++ [expr.typeid]). + */ @Generated public static final int CXXTypeidExpr = 0x00000081; + /** + * [C++ 2.13.5] C++ Boolean Literal. + */ @Generated public static final int CXXBoolLiteralExpr = 0x00000082; + /** + * [C++0x 2.14.7] C++ Pointer Literal. + */ @Generated public static final int CXXNullPtrLiteralExpr = 0x00000083; + /** + * Represents the "this" expression in C++ + */ @Generated public static final int CXXThisExpr = 0x00000084; + /** + * [C++ 15] C++ Throw Expression. + *

+ * This handles 'throw' and 'throw' assignment-expression. When + * assignment-expression isn't present, Op will be null. + */ @Generated public static final int CXXThrowExpr = 0x00000085; + /** + * A new expression for memory allocation and constructor calls, e.g: + * "new CXXNewExpr(foo)". + */ @Generated public static final int CXXNewExpr = 0x00000086; + /** + * A delete expression for memory deallocation and destructor calls, + * e.g. "delete[] pArray". + */ @Generated public static final int CXXDeleteExpr = 0x00000087; + /** + * A unary expression. (noexcept, sizeof, or other traits) + */ @Generated public static final int UnaryExpr = 0x00000088; + /** + * An Objective-C string literal i.e. @"foo". + */ @Generated public static final int ObjCStringLiteral = 0x00000089; + /** + * An Objective-C \@encode expression. + */ @Generated public static final int ObjCEncodeExpr = 0x0000008A; + /** + * An Objective-C \@selector expression. + */ @Generated public static final int ObjCSelectorExpr = 0x0000008B; + /** + * An Objective-C \@protocol expression. + */ @Generated public static final int ObjCProtocolExpr = 0x0000008C; + /** + * An Objective-C "bridged" cast expression, which casts between + * Objective-C pointers and C pointers, transferring ownership in the process. + *

+ * \code + * NSString *str = (__bridge_transfer NSString *)CFCreateString(); + * \endcode + */ @Generated public static final int ObjCBridgedCastExpr = 0x0000008D; + /** + * Represents a C++0x pack expansion that produces a sequence of + * expressions. + *

+ * A pack expansion expression contains a pattern (which itself is an + * expression) followed by an ellipsis. For example: + *

+ * \code + * template + * void forward(F f, Types &&...args) { + * f(static_cast(args)...); + * } + * \endcode + */ @Generated public static final int PackExpansionExpr = 0x0000008E; + /** + * Represents an expression that computes the length of a parameter + * pack. + *

+ * \code + * template + * struct count { + * static const unsigned value = sizeof...(Types); + * }; + * \endcode + */ @Generated public static final int SizeOfPackExpr = 0x0000008F; + /** + * Represents a C++ lambda expression that produces a local function + * object. + *

+ * \code + * void abssort(float *x, unsigned N) { + * std::sort(x, x + N, + * [](float a, float b) { + * return std::abs(a) < std::abs(b); + * }); + * } + * \endcode + */ @Generated public static final int LambdaExpr = 0x00000090; + /** + * Objective-c Boolean Literal. + */ @Generated public static final int ObjCBoolLiteralExpr = 0x00000091; + /** + * Represents the "self" expression in an Objective-C method. + */ @Generated public static final int ObjCSelfExpr = 0x00000092; - @Generated public static final int LastExpr = 0x00000094; + /** + * OpenCL's addrspace_cast<> expression. + */ + @Generated public static final int LastExpr = 0x00000098; + /** + * Statements + */ @Generated public static final int FirstStmt = 0x000000C8; + /** + * A statement whose specific kind is not exposed via this + * interface. + *

+ * Unexposed statements have the same operations as any other kind of + * statement; one can extract their location information, spelling, + * children, etc. However, the specific kind of the statement is not + * reported. + */ @Generated public static final int UnexposedStmt = 0x000000C8; + /** + * A labelled statement in a function. + *

+ * This cursor kind is used to describe the "start_over:" label statement in + * the following example: + *

+ * \code + * start_over: + * ++counter; + * \endcode + */ @Generated public static final int LabelStmt = 0x000000C9; + /** + * A group of statements like { stmt stmt }. + *

+ * This cursor kind is used to describe compound statements, e.g. function + * bodies. + */ @Generated public static final int CompoundStmt = 0x000000CA; + /** + * A case statement. + */ @Generated public static final int CaseStmt = 0x000000CB; + /** + * A default statement. + */ @Generated public static final int DefaultStmt = 0x000000CC; + /** + * An if statement + */ @Generated public static final int IfStmt = 0x000000CD; + /** + * A switch statement. + */ @Generated public static final int SwitchStmt = 0x000000CE; + /** + * A while statement. + */ @Generated public static final int WhileStmt = 0x000000CF; + /** + * A do statement. + */ @Generated public static final int DoStmt = 0x000000D0; + /** + * A for statement. + */ @Generated public static final int ForStmt = 0x000000D1; + /** + * A goto statement. + */ @Generated public static final int GotoStmt = 0x000000D2; + /** + * An indirect goto statement. + */ @Generated public static final int IndirectGotoStmt = 0x000000D3; + /** + * A continue statement. + */ @Generated public static final int ContinueStmt = 0x000000D4; + /** + * A break statement. + */ @Generated public static final int BreakStmt = 0x000000D5; + /** + * A return statement. + */ @Generated public static final int ReturnStmt = 0x000000D6; + /** + * A GCC inline assembly statement extension. + */ @Generated public static final int GCCAsmStmt = 0x000000D7; + /** + * A GCC inline assembly statement extension. + */ @Generated public static final int AsmStmt = 0x000000D7; + /** + * Objective-C's overall \@try-\@catch-\@finally statement. + */ @Generated public static final int ObjCAtTryStmt = 0x000000D8; + /** + * Objective-C's \@catch statement. + */ @Generated public static final int ObjCAtCatchStmt = 0x000000D9; + /** + * Objective-C's \@finally statement. + */ @Generated public static final int ObjCAtFinallyStmt = 0x000000DA; + /** + * Objective-C's \@throw statement. + */ @Generated public static final int ObjCAtThrowStmt = 0x000000DB; + /** + * Objective-C's \@synchronized statement. + */ @Generated public static final int ObjCAtSynchronizedStmt = 0x000000DC; + /** + * Objective-C's autorelease pool statement. + */ @Generated public static final int ObjCAutoreleasePoolStmt = 0x000000DD; + /** + * Objective-C's collection statement. + */ @Generated public static final int ObjCForCollectionStmt = 0x000000DE; + /** + * C++'s catch statement. + */ @Generated public static final int CXXCatchStmt = 0x000000DF; + /** + * C++'s try statement. + */ @Generated public static final int CXXTryStmt = 0x000000E0; + /** + * C++'s for (* : *) statement. + */ @Generated public static final int CXXForRangeStmt = 0x000000E1; + /** + * Windows Structured Exception Handling's try statement. + */ @Generated public static final int SEHTryStmt = 0x000000E2; + /** + * Windows Structured Exception Handling's except statement. + */ @Generated public static final int SEHExceptStmt = 0x000000E3; + /** + * Windows Structured Exception Handling's finally statement. + */ @Generated public static final int SEHFinallyStmt = 0x000000E4; + /** + * A MS inline assembly statement extension. + */ @Generated public static final int MSAsmStmt = 0x000000E5; + /** + * The null statement ";": C99 6.8.3p3. + *

+ * This cursor kind is used to describe the null statement. + */ @Generated public static final int NullStmt = 0x000000E6; + /** + * Adaptor class for mixing declarations with statements and + * expressions. + */ @Generated public static final int DeclStmt = 0x000000E7; + /** + * OpenMP parallel directive. + */ @Generated public static final int OMPParallelDirective = 0x000000E8; + /** + * OpenMP SIMD directive. + */ @Generated public static final int OMPSimdDirective = 0x000000E9; + /** + * OpenMP for directive. + */ @Generated public static final int OMPForDirective = 0x000000EA; + /** + * OpenMP sections directive. + */ @Generated public static final int OMPSectionsDirective = 0x000000EB; + /** + * OpenMP section directive. + */ @Generated public static final int OMPSectionDirective = 0x000000EC; + /** + * OpenMP single directive. + */ @Generated public static final int OMPSingleDirective = 0x000000ED; + /** + * OpenMP parallel for directive. + */ @Generated public static final int OMPParallelForDirective = 0x000000EE; + /** + * OpenMP parallel sections directive. + */ @Generated public static final int OMPParallelSectionsDirective = 0x000000EF; + /** + * OpenMP task directive. + */ @Generated public static final int OMPTaskDirective = 0x000000F0; + /** + * OpenMP master directive. + */ @Generated public static final int OMPMasterDirective = 0x000000F1; + /** + * OpenMP critical directive. + */ @Generated public static final int OMPCriticalDirective = 0x000000F2; + /** + * OpenMP taskyield directive. + */ @Generated public static final int OMPTaskyieldDirective = 0x000000F3; + /** + * OpenMP barrier directive. + */ @Generated public static final int OMPBarrierDirective = 0x000000F4; + /** + * OpenMP taskwait directive. + */ @Generated public static final int OMPTaskwaitDirective = 0x000000F5; + /** + * OpenMP flush directive. + */ @Generated public static final int OMPFlushDirective = 0x000000F6; + /** + * Windows Structured Exception Handling's leave statement. + */ @Generated public static final int SEHLeaveStmt = 0x000000F7; + /** + * OpenMP ordered directive. + */ @Generated public static final int OMPOrderedDirective = 0x000000F8; + /** + * OpenMP atomic directive. + */ @Generated public static final int OMPAtomicDirective = 0x000000F9; + /** + * OpenMP for SIMD directive. + */ @Generated public static final int OMPForSimdDirective = 0x000000FA; + /** + * OpenMP parallel for SIMD directive. + */ @Generated public static final int OMPParallelForSimdDirective = 0x000000FB; + /** + * OpenMP target directive. + */ @Generated public static final int OMPTargetDirective = 0x000000FC; + /** + * OpenMP teams directive. + */ @Generated public static final int OMPTeamsDirective = 0x000000FD; + /** + * OpenMP taskgroup directive. + */ @Generated public static final int OMPTaskgroupDirective = 0x000000FE; + /** + * OpenMP cancellation point directive. + */ @Generated public static final int OMPCancellationPointDirective = 0x000000FF; + /** + * OpenMP cancel directive. + */ @Generated public static final int OMPCancelDirective = 0x00000100; + /** + * OpenMP target data directive. + */ @Generated public static final int OMPTargetDataDirective = 0x00000101; - @Generated public static final int LastStmt = 0x0000010D; + /** + * OpenMP unroll directive. + */ + @Generated public static final int LastStmt = 0x00000125; + /** + * Cursor that represents the translation unit itself. + *

+ * The translation unit cursor exists primarily to act as the root + * cursor for traversing the contents of a translation unit. + */ @Generated public static final int TranslationUnit = 0x0000012C; + /** + * Attributes + */ @Generated public static final int FirstAttr = 0x00000190; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int UnexposedAttr = 0x00000190; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int IBActionAttr = 0x00000191; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int IBOutletAttr = 0x00000192; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int IBOutletCollectionAttr = 0x00000193; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CXXFinalAttr = 0x00000194; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CXXOverrideAttr = 0x00000195; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int AnnotateAttr = 0x00000196; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int AsmLabelAttr = 0x00000197; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int PackedAttr = 0x00000198; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int PureAttr = 0x00000199; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int ConstAttr = 0x0000019A; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int NoDuplicateAttr = 0x0000019B; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CUDAConstantAttr = 0x0000019C; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CUDADeviceAttr = 0x0000019D; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CUDAGlobalAttr = 0x0000019E; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CUDAHostAttr = 0x0000019F; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int CUDASharedAttr = 0x000001A0; - @Generated public static final int LastAttr = 0x000001A3; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int LastAttr = 0x000001B9; + /** + * Preprocessing + */ @Generated public static final int PreprocessingDirective = 0x000001F4; + /** + * Preprocessing + */ @Generated public static final int MacroDefinition = 0x000001F5; + /** + * Preprocessing + */ @Generated public static final int MacroExpansion = 0x000001F6; + /** + * Preprocessing + */ @Generated public static final int MacroInstantiation = 0x000001F6; + /** + * Preprocessing + */ @Generated public static final int InclusionDirective = 0x000001F7; + /** + * Preprocessing + */ @Generated public static final int FirstPreprocessing = 0x000001F4; + /** + * Preprocessing + */ @Generated public static final int LastPreprocessing = 0x000001F7; + /** + * Extra Declarations + * A module import declaration. + */ @Generated public static final int ModuleImportDecl = 0x00000258; + /** + * a friend declaration. + */ @Generated public static final int FirstExtraDecl = 0x00000258; - @Generated public static final int LastExtraDecl = 0x0000025A; + /** + * a friend declaration. + */ + @Generated public static final int LastExtraDecl = 0x0000025B; + /** + * A code completion overload candidate. + */ @Generated public static final int OverloadCandidate = 0x000002BC; + /** + * OpenMP 5.0 [2.1.5, Array Section]. + */ @Generated public static final int OMPArraySectionExpr = 0x00000093; + /** + * Represents an @available(...) check. + */ @Generated public static final int ObjCAvailabilityCheckExpr = 0x00000094; + /** + * OpenMP taskloop directive. + */ @Generated public static final int OMPTaskLoopDirective = 0x00000102; + /** + * OpenMP taskloop simd directive. + */ @Generated public static final int OMPTaskLoopSimdDirective = 0x00000103; + /** + * OpenMP distribute directive. + */ @Generated public static final int OMPDistributeDirective = 0x00000104; + /** + * OpenMP target enter data directive. + */ @Generated public static final int OMPTargetEnterDataDirective = 0x00000105; + /** + * OpenMP target exit data directive. + */ @Generated public static final int OMPTargetExitDataDirective = 0x00000106; + /** + * OpenMP target parallel directive. + */ @Generated public static final int OMPTargetParallelDirective = 0x00000107; + /** + * OpenMP target parallel for directive. + */ @Generated public static final int OMPTargetParallelForDirective = 0x00000108; + /** + * OpenMP target update directive. + */ @Generated public static final int OMPTargetUpdateDirective = 0x00000109; + /** + * OpenMP distribute parallel for directive. + */ @Generated public static final int OMPDistributeParallelForDirective = 0x0000010A; + /** + * OpenMP distribute parallel for simd directive. + */ @Generated public static final int OMPDistributeParallelForSimdDirective = 0x0000010B; + /** + * OpenMP distribute simd directive. + */ @Generated public static final int OMPDistributeSimdDirective = 0x0000010C; + /** + * OpenMP target parallel for simd directive. + */ @Generated public static final int OMPTargetParallelForSimdDirective = 0x0000010D; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int VisibilityAttr = 0x000001A1; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int DLLExport = 0x000001A2; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ @Generated public static final int DLLImport = 0x000001A3; + /** + * Extra Declarations + * A module import declaration. + */ @Generated public static final int TypeAliasTemplateDecl = 0x00000259; + /** + * A static_assert or _Static_assert node + */ @Generated public static final int StaticAssert = 0x0000025A; @Generated private CXCursorKind() { } + + /** + * Fixed point literal + */ + @Generated public static final int FixedPointLiteral = 0x00000095; + /** + * OpenMP 5.0 [2.1.4, Array Shaping]. + */ + @Generated public static final int OMPArrayShapingExpr = 0x00000096; + /** + * OpenMP 5.0 [2.1.6 Iterators] + */ + @Generated public static final int OMPIteratorExpr = 0x00000097; + /** + * OpenCL's addrspace_cast<> expression. + */ + @Generated public static final int CXXAddrspaceCastExpr = 0x00000098; + /** + * OpenMP target simd directive. + */ + @Generated public static final int OMPTargetSimdDirective = 0x0000010E; + /** + * OpenMP teams distribute directive. + */ + @Generated public static final int OMPTeamsDistributeDirective = 0x0000010F; + /** + * OpenMP teams distribute simd directive. + */ + @Generated public static final int OMPTeamsDistributeSimdDirective = 0x00000110; + /** + * OpenMP teams distribute parallel for simd directive. + */ + @Generated public static final int OMPTeamsDistributeParallelForSimdDirective = 0x00000111; + /** + * OpenMP teams distribute parallel for directive. + */ + @Generated public static final int OMPTeamsDistributeParallelForDirective = 0x00000112; + /** + * OpenMP target teams directive. + */ + @Generated public static final int OMPTargetTeamsDirective = 0x00000113; + /** + * OpenMP target teams distribute directive. + */ + @Generated public static final int OMPTargetTeamsDistributeDirective = 0x00000114; + /** + * OpenMP target teams distribute parallel for directive. + */ + @Generated public static final int OMPTargetTeamsDistributeParallelForDirective = 0x00000115; + /** + * OpenMP target teams distribute parallel for simd directive. + */ + @Generated public static final int OMPTargetTeamsDistributeParallelForSimdDirective = 0x00000116; + /** + * OpenMP target teams distribute simd directive. + */ + @Generated public static final int OMPTargetTeamsDistributeSimdDirective = 0x00000117; + /** + * C++2a std::bit_cast expression. + */ + @Generated public static final int BuiltinBitCastExpr = 0x00000118; + /** + * OpenMP master taskloop directive. + */ + @Generated public static final int OMPMasterTaskLoopDirective = 0x00000119; + /** + * OpenMP parallel master taskloop directive. + */ + @Generated public static final int OMPParallelMasterTaskLoopDirective = 0x0000011A; + /** + * OpenMP master taskloop simd directive. + */ + @Generated public static final int OMPMasterTaskLoopSimdDirective = 0x0000011B; + /** + * OpenMP parallel master taskloop simd directive. + */ + @Generated public static final int OMPParallelMasterTaskLoopSimdDirective = 0x0000011C; + /** + * OpenMP parallel master directive. + */ + @Generated public static final int OMPParallelMasterDirective = 0x0000011D; + /** + * OpenMP depobj directive. + */ + @Generated public static final int OMPDepobjDirective = 0x0000011E; + /** + * OpenMP scan directive. + */ + @Generated public static final int OMPScanDirective = 0x0000011F; + /** + * OpenMP tile directive. + */ + @Generated public static final int OMPTileDirective = 0x00000120; + /** + * OpenMP canonical loop. + */ + @Generated public static final int OMPCanonicalLoop = 0x00000121; + /** + * OpenMP interop directive. + */ + @Generated public static final int OMPInteropDirective = 0x00000122; + /** + * OpenMP dispatch directive. + */ + @Generated public static final int OMPDispatchDirective = 0x00000123; + /** + * OpenMP masked directive. + */ + @Generated public static final int OMPMaskedDirective = 0x00000124; + /** + * OpenMP unroll directive. + */ + @Generated public static final int OMPUnrollDirective = 0x00000125; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int NSReturnsRetained = 0x000001A4; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int NSReturnsNotRetained = 0x000001A5; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int NSReturnsAutoreleased = 0x000001A6; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int NSConsumesSelf = 0x000001A7; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int NSConsumed = 0x000001A8; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCException = 0x000001A9; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCNSObject = 0x000001AA; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCIndependentClass = 0x000001AB; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCPreciseLifetime = 0x000001AC; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCReturnsInnerPointer = 0x000001AD; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCRequiresSuper = 0x000001AE; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCRootClass = 0x000001AF; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCSubclassingRestricted = 0x000001B0; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCExplicitProtocolImpl = 0x000001B1; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCDesignatedInitializer = 0x000001B2; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCRuntimeVisible = 0x000001B3; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ObjCBoxable = 0x000001B4; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int FlagEnum = 0x000001B5; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int ConvergentAttr = 0x000001B6; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int WarnUnusedAttr = 0x000001B7; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int WarnUnusedResultAttr = 0x000001B8; + /** + * An attribute whose specific kind is not exposed via this + * interface. + */ + @Generated public static final int AlignedAttr = 0x000001B9; + /** + * a friend declaration. + */ + @Generated public static final int FriendDecl = 0x0000025B; } diff --git a/src/main/java/org/clang/enums/CXCursor_ExceptionSpecificationKind.java b/src/main/java/org/clang/enums/CXCursor_ExceptionSpecificationKind.java new file mode 100644 index 0000000..89d0715 --- /dev/null +++ b/src/main/java/org/clang/enums/CXCursor_ExceptionSpecificationKind.java @@ -0,0 +1,56 @@ +package org.clang.enums; + +import org.moe.natj.general.ann.Generated; + +/** + * Describes the exception specification of a cursor. + *

+ * A negative value indicates that the cursor is not a function declaration. + */ +@Generated +public final class CXCursor_ExceptionSpecificationKind { + @Generated + private CXCursor_ExceptionSpecificationKind() { + } + + /** + * The cursor has no exception specification. + */ + @Generated public static final int None = 0x00000000; + /** + * The cursor has exception specification throw() + */ + @Generated public static final int DynamicNone = 0x00000001; + /** + * The cursor has exception specification throw(T1, T2) + */ + @Generated public static final int Dynamic = 0x00000002; + /** + * The cursor has exception specification throw(...). + */ + @Generated public static final int MSAny = 0x00000003; + /** + * The cursor has exception specification basic noexcept. + */ + @Generated public static final int BasicNoexcept = 0x00000004; + /** + * The cursor has exception specification computed noexcept. + */ + @Generated public static final int ComputedNoexcept = 0x00000005; + /** + * The exception specification has not yet been evaluated. + */ + @Generated public static final int Unevaluated = 0x00000006; + /** + * The exception specification has not yet been instantiated. + */ + @Generated public static final int Uninstantiated = 0x00000007; + /** + * The exception specification has not been parsed yet. + */ + @Generated public static final int Unparsed = 0x00000008; + /** + * The cursor has a __declspec(nothrow) exception specification. + */ + @Generated public static final int NoThrow = 0x00000009; +} diff --git a/src/main/java/org/clang/enums/CXDiagnosticDisplayOptions.java b/src/main/java/org/clang/enums/CXDiagnosticDisplayOptions.java index cec510e..647fb51 100644 --- a/src/main/java/org/clang/enums/CXDiagnosticDisplayOptions.java +++ b/src/main/java/org/clang/enums/CXDiagnosticDisplayOptions.java @@ -18,13 +18,67 @@ import org.moe.natj.general.ann.Generated; +/** + * Options to control the display of diagnostics. + *

+ * The values in this enum are meant to be combined to customize the + * behavior of \c clang_formatDiagnostic(). + */ @Generated public final class CXDiagnosticDisplayOptions { + /** + * Display the source-location information where the + * diagnostic was located. + *

+ * When set, diagnostics will be prefixed by the file, line, and + * (optionally) column to which the diagnostic refers. For example, + *

+ * \code + * test.c:28: warning: extra tokens at end of #endif directive + * \endcode + *

+ * This option corresponds to the clang flag \c -fshow-source-location. + */ @Generated public static final int SourceLocation = 0x00000001; + /** + * If displaying the source-location information of the + * diagnostic, also include the column number. + *

+ * This option corresponds to the clang flag \c -fshow-column. + */ @Generated public static final int Column = 0x00000002; + /** + * If displaying the source-location information of the + * diagnostic, also include information about source ranges in a + * machine-parsable format. + *

+ * This option corresponds to the clang flag + * \c -fdiagnostics-print-source-range-info. + */ @Generated public static final int SourceRanges = 0x00000004; + /** + * Display the option name associated with this diagnostic, if any. + *

+ * The option name displayed (e.g., -Wconversion) will be placed in brackets + * after the diagnostic text. This option corresponds to the clang flag + * \c -fdiagnostics-show-option. + */ @Generated public static final int Option = 0x00000008; + /** + * Display the category number associated with this diagnostic, if any. + *

+ * The category number is displayed within brackets after the diagnostic text. + * This option corresponds to the clang flag + * \c -fdiagnostics-show-category=id. + */ @Generated public static final int CategoryId = 0x00000010; + /** + * Display the category name associated with this diagnostic, if any. + *

+ * The category name is displayed within brackets after the diagnostic text. + * This option corresponds to the clang flag + * \c -fdiagnostics-show-category=name. + */ @Generated public static final int CategoryName = 0x00000020; @Generated diff --git a/src/main/java/org/clang/enums/CXDiagnosticSeverity.java b/src/main/java/org/clang/enums/CXDiagnosticSeverity.java index 65261e5..d5eb62f 100644 --- a/src/main/java/org/clang/enums/CXDiagnosticSeverity.java +++ b/src/main/java/org/clang/enums/CXDiagnosticSeverity.java @@ -18,12 +18,35 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the severity of a particular diagnostic. + */ @Generated public final class CXDiagnosticSeverity { + /** + * A diagnostic that has been suppressed, e.g., by a command-line + * option. + */ @Generated public static final int Ignored = 0x00000000; + /** + * This diagnostic is a note that should be attached to the + * previous (non-note) diagnostic. + */ @Generated public static final int Note = 0x00000001; + /** + * This diagnostic indicates suspicious code that may not be + * wrong. + */ @Generated public static final int Warning = 0x00000002; + /** + * This diagnostic indicates that the code is ill-formed. + */ @Generated public static final int Error = 0x00000003; + /** + * This diagnostic indicates that the code is ill-formed such + * that future parser recovery is unlikely to produce useful + * results. + */ @Generated public static final int Fatal = 0x00000004; @Generated diff --git a/src/main/java/org/clang/enums/CXErrorCode.java b/src/main/java/org/clang/enums/CXErrorCode.java index d32b9d9..cdda820 100644 --- a/src/main/java/org/clang/enums/CXErrorCode.java +++ b/src/main/java/org/clang/enums/CXErrorCode.java @@ -18,12 +18,37 @@ import org.moe.natj.general.ann.Generated; +/** + * Error codes returned by libclang routines. + *

+ * Zero (\c CXError_Success) is the only error code indicating success. Other + * error codes, including not yet assigned non-zero values, indicate errors. + */ @Generated public final class CXErrorCode { + /** + * No error. + */ @Generated public static final int Success = 0x00000000; + /** + * A generic error code, no further details are available. + *

+ * Errors of this kind can get their own specific error codes in future + * libclang versions. + */ @Generated public static final int Failure = 0x00000001; + /** + * libclang crashed while performing the requested operation. + */ @Generated public static final int Crashed = 0x00000002; + /** + * The function detected that the arguments violate the function + * contract. + */ @Generated public static final int InvalidArguments = 0x00000003; + /** + * An AST deserialization error has occurred. + */ @Generated public static final int ASTReadError = 0x00000004; @Generated diff --git a/src/main/java/org/clang/enums/CXGlobalOptFlags.java b/src/main/java/org/clang/enums/CXGlobalOptFlags.java index a43fadb..4db6198 100644 --- a/src/main/java/org/clang/enums/CXGlobalOptFlags.java +++ b/src/main/java/org/clang/enums/CXGlobalOptFlags.java @@ -20,9 +20,30 @@ @Generated public final class CXGlobalOptFlags { + /** + * Used to indicate that no special CXIndex options are needed. + */ @Generated public static final int CXGlobalOpt_None = 0x00000000; + /** + * Used to indicate that threads that libclang creates for indexing + * purposes should use background priority. + *

+ * Affects #clang_indexSourceFile, #clang_indexTranslationUnit, + * #clang_parseTranslationUnit, #clang_saveTranslationUnit. + */ @Generated public static final int CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 0x00000001; + /** + * Used to indicate that threads that libclang creates for editing + * purposes should use background priority. + *

+ * Affects #clang_reparseTranslationUnit, #clang_codeCompleteAt, + * #clang_annotateTokens + */ @Generated public static final int CXGlobalOpt_ThreadBackgroundPriorityForEditing = 0x00000002; + /** + * Used to indicate that all threads that libclang creates should use + * background priority. + */ @Generated public static final int CXGlobalOpt_ThreadBackgroundPriorityForAll = 0x00000003; @Generated diff --git a/src/main/java/org/clang/enums/CXIdxEntityCXXTemplateKind.java b/src/main/java/org/clang/enums/CXIdxEntityCXXTemplateKind.java index 134ba1d..95184a8 100644 --- a/src/main/java/org/clang/enums/CXIdxEntityCXXTemplateKind.java +++ b/src/main/java/org/clang/enums/CXIdxEntityCXXTemplateKind.java @@ -18,6 +18,16 @@ import org.moe.natj.general.ann.Generated; +/** + * Extra C++ template information for an entity. This can apply to: + * CXIdxEntity_Function + * CXIdxEntity_CXXClass + * CXIdxEntity_CXXStaticMethod + * CXIdxEntity_CXXInstanceMethod + * CXIdxEntity_CXXConstructor + * CXIdxEntity_CXXConversionFunction + * CXIdxEntity_CXXTypeAlias + */ @Generated public final class CXIdxEntityCXXTemplateKind { @Generated public static final int CXIdxEntity_NonTemplate = 0x00000000; diff --git a/src/main/java/org/clang/enums/CXIdxEntityLanguage.java b/src/main/java/org/clang/enums/CXIdxEntityLanguage.java index e23e8cc..48ed46d 100644 --- a/src/main/java/org/clang/enums/CXIdxEntityLanguage.java +++ b/src/main/java/org/clang/enums/CXIdxEntityLanguage.java @@ -28,4 +28,6 @@ public final class CXIdxEntityLanguage { @Generated private CXIdxEntityLanguage() { } + + @Generated public static final int CXIdxEntityLang_Swift = 0x00000004; } diff --git a/src/main/java/org/clang/enums/CXIdxEntityRefKind.java b/src/main/java/org/clang/enums/CXIdxEntityRefKind.java index 9498208..070463b 100644 --- a/src/main/java/org/clang/enums/CXIdxEntityRefKind.java +++ b/src/main/java/org/clang/enums/CXIdxEntityRefKind.java @@ -18,9 +18,22 @@ import org.moe.natj.general.ann.Generated; +/** + * Data for IndexerCallbacks#indexEntityReference. + *

+ * This may be deprecated in a future version as this duplicates + * the \c CXSymbolRole_Implicit bit in \c CXSymbolRole. + */ @Generated public final class CXIdxEntityRefKind { + /** + * The entity is referenced directly in user's code. + */ @Generated public static final int CXIdxEntityRef_Direct = 0x00000001; + /** + * An implicit reference, e.g. a reference of an Objective-C method + * via the dot syntax. + */ @Generated public static final int CXIdxEntityRef_Implicit = 0x00000002; @Generated diff --git a/src/main/java/org/clang/enums/CXIndexOptFlags.java b/src/main/java/org/clang/enums/CXIndexOptFlags.java index 5d36459..b600f43 100644 --- a/src/main/java/org/clang/enums/CXIndexOptFlags.java +++ b/src/main/java/org/clang/enums/CXIndexOptFlags.java @@ -20,11 +20,35 @@ @Generated public final class CXIndexOptFlags { + /** + * Used to indicate that no special indexing options are needed. + */ @Generated public static final int CXIndexOpt_None = 0x00000000; + /** + * Used to indicate that IndexerCallbacks#indexEntityReference should + * be invoked for only one reference of an entity per source file that does + * not also include a declaration/definition of the entity. + */ @Generated public static final int CXIndexOpt_SuppressRedundantRefs = 0x00000001; + /** + * Function-local symbols should be indexed. If this is not set + * function-local symbols will be ignored. + */ @Generated public static final int CXIndexOpt_IndexFunctionLocalSymbols = 0x00000002; + /** + * Implicit function/class template instantiations should be indexed. + * If this is not set, implicit instantiations will be ignored. + */ @Generated public static final int CXIndexOpt_IndexImplicitTemplateInstantiations = 0x00000004; + /** + * Suppress all compiler warnings when parsing for indexing. + */ @Generated public static final int CXIndexOpt_SuppressWarnings = 0x00000008; + /** + * Skip a function/method body that was already parsed during an + * indexing session associated with a \c CXIndexAction object. + * Bodies in system headers are always skipped. + */ @Generated public static final int CXIndexOpt_SkipParsedBodiesInSession = 0x00000010; @Generated diff --git a/src/main/java/org/clang/enums/CXLanguageKind.java b/src/main/java/org/clang/enums/CXLanguageKind.java index 115b2da..2f5a2d3 100644 --- a/src/main/java/org/clang/enums/CXLanguageKind.java +++ b/src/main/java/org/clang/enums/CXLanguageKind.java @@ -18,6 +18,9 @@ import org.moe.natj.general.ann.Generated; +/** + * Describe the "language" of the entity referred to by a cursor. + */ @Generated public final class CXLanguageKind { @Generated public static final int Invalid = 0x00000000; diff --git a/src/main/java/org/clang/enums/CXLinkageKind.java b/src/main/java/org/clang/enums/CXLinkageKind.java index 64e017d..8a9f380 100644 --- a/src/main/java/org/clang/enums/CXLinkageKind.java +++ b/src/main/java/org/clang/enums/CXLinkageKind.java @@ -18,12 +18,33 @@ import org.moe.natj.general.ann.Generated; +/** + * Describe the linkage of the entity referred to by a cursor. + */ @Generated public final class CXLinkageKind { + /** + * This value indicates that no linkage information is available + * for a provided CXCursor. + */ @Generated public static final int Invalid = 0x00000000; + /** + * This is the linkage for variables, parameters, and so on that + * have automatic storage. This covers normal (non-extern) local variables. + */ @Generated public static final int NoLinkage = 0x00000001; + /** + * This is the linkage for static variables and static functions. + */ @Generated public static final int Internal = 0x00000002; + /** + * This is the linkage for entities with external linkage that live + * in C++ anonymous namespaces. + */ @Generated public static final int UniqueExternal = 0x00000003; + /** + * This is the linkage for entities with true, external linkage. + */ @Generated public static final int External = 0x00000004; @Generated diff --git a/src/main/java/org/clang/enums/CXLoadDiag_Error.java b/src/main/java/org/clang/enums/CXLoadDiag_Error.java index 8c4d926..114cf20 100644 --- a/src/main/java/org/clang/enums/CXLoadDiag_Error.java +++ b/src/main/java/org/clang/enums/CXLoadDiag_Error.java @@ -18,11 +18,30 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the kind of error that occurred (if any) in a call to + * \c clang_loadDiagnostics. + */ @Generated public final class CXLoadDiag_Error { + /** + * Indicates that no error occurred. + */ @Generated public static final int None = 0x00000000; + /** + * Indicates that an unknown error occurred while attempting to + * deserialize diagnostics. + */ @Generated public static final int Unknown = 0x00000001; + /** + * Indicates that the file containing the serialized diagnostics + * could not be opened. + */ @Generated public static final int CannotLoad = 0x00000002; + /** + * Indicates that the serialized diagnostics file is invalid or + * corrupt. + */ @Generated public static final int InvalidFile = 0x00000003; @Generated diff --git a/src/main/java/org/clang/enums/CXNameRefFlags.java b/src/main/java/org/clang/enums/CXNameRefFlags.java index 0e85484..3b163e8 100644 --- a/src/main/java/org/clang/enums/CXNameRefFlags.java +++ b/src/main/java/org/clang/enums/CXNameRefFlags.java @@ -20,8 +20,26 @@ @Generated public final class CXNameRefFlags { + /** + * Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the + * range. + */ @Generated public static final int Qualifier = 0x00000001; + /** + * Include the explicit template arguments, e.g. \ in x.f, + * in the range. + */ @Generated public static final int TemplateArgs = 0x00000002; + /** + * If the name is non-contiguous, return the full spanning range. + *

+ * Non-contiguous names occur in Objective-C when a selector with two or more + * parameters is used, or in C++ when using an operator: + * \code + * [object doSomething:here withValue:there]; // Objective-C + * return some_vector[1]; // C++ + * \endcode + */ @Generated public static final int SinglePiece = 0x00000004; @Generated diff --git a/src/main/java/org/clang/enums/CXNullabilityKind.java b/src/main/java/org/clang/enums/CXNullabilityKind.java deleted file mode 100644 index d0a8f9e..0000000 --- a/src/main/java/org/clang/enums/CXNullabilityKind.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2014-2016 Intel Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package org.clang.enums; - -import org.moe.natj.general.ann.Generated; - -@Generated -public final class CXNullabilityKind { - @Generated public static final int NonNull = 0x00000000; - @Generated public static final int Nullable = 0x00000001; - @Generated public static final int Unspecified = 0x00000002; - @Generated public static final int Invalid = 0x00000064; - - @Generated - private CXNullabilityKind() { - } -} diff --git a/src/main/java/org/clang/enums/CXObjCDeclQualifierKind.java b/src/main/java/org/clang/enums/CXObjCDeclQualifierKind.java index 17c0835..e0e9914 100644 --- a/src/main/java/org/clang/enums/CXObjCDeclQualifierKind.java +++ b/src/main/java/org/clang/enums/CXObjCDeclQualifierKind.java @@ -18,6 +18,10 @@ import org.moe.natj.general.ann.Generated; +/** + * 'Qualifiers' written next to the return and parameter types in + * Objective-C method declarations. + */ @Generated public final class CXObjCDeclQualifierKind { @Generated public static final int CXObjCDeclQualifier_None = 0x00000000; diff --git a/src/main/java/org/clang/enums/CXObjCPropertyAttrKind.java b/src/main/java/org/clang/enums/CXObjCPropertyAttrKind.java index 15b398f..7187855 100644 --- a/src/main/java/org/clang/enums/CXObjCPropertyAttrKind.java +++ b/src/main/java/org/clang/enums/CXObjCPropertyAttrKind.java @@ -18,6 +18,9 @@ import org.moe.natj.general.ann.Generated; +/** + * Property attributes for a \c CXCursor_ObjCPropertyDecl. + */ @Generated public final class CXObjCPropertyAttrKind { @Generated public static final int CXObjCPropertyAttr_noattr = 0x00000000; diff --git a/src/main/java/org/clang/enums/CXObjCTypeParamVariance.java b/src/main/java/org/clang/enums/CXObjCTypeParamVariance.java index dd10f5d..2e5c08d 100644 --- a/src/main/java/org/clang/enums/CXObjCTypeParamVariance.java +++ b/src/main/java/org/clang/enums/CXObjCTypeParamVariance.java @@ -21,8 +21,19 @@ @Generated public final class CXObjCTypeParamVariance { @Generated public static final int Invalid = 0xFFFFFFFF; + /** + * The parameter is invariant: must match exactly. + */ @Generated public static final int Invariant = 0x00000000; + /** + * The parameter is covariant, e.g., X is a subtype of X when + * the type parameter is covariant and T is a subtype of U. + */ @Generated public static final int Covariant = 0x00000001; + /** + * The parameter is contravariant, e.g., X is a subtype of X + * when the type parameter is covariant and U is a subtype of T. + */ @Generated public static final int Contravariant = 0x00000002; @Generated diff --git a/src/main/java/org/clang/enums/CXPrintingPolicyProperty.java b/src/main/java/org/clang/enums/CXPrintingPolicyProperty.java new file mode 100644 index 0000000..8adb67a --- /dev/null +++ b/src/main/java/org/clang/enums/CXPrintingPolicyProperty.java @@ -0,0 +1,43 @@ +package org.clang.enums; + +import org.moe.natj.general.ann.Generated; + +/** + * Properties for the printing policy. + *

+ * See \c clang::PrintingPolicy for more information. + */ +@Generated +public final class CXPrintingPolicyProperty { + @Generated + private CXPrintingPolicyProperty() { + } + + @Generated public static final int Indentation = 0x00000000; + @Generated public static final int SuppressSpecifiers = 0x00000001; + @Generated public static final int SuppressTagKeyword = 0x00000002; + @Generated public static final int IncludeTagDefinition = 0x00000003; + @Generated public static final int SuppressScope = 0x00000004; + @Generated public static final int SuppressUnwrittenScope = 0x00000005; + @Generated public static final int SuppressInitializers = 0x00000006; + @Generated public static final int ConstantArraySizeAsWritten = 0x00000007; + @Generated public static final int AnonymousTagLocations = 0x00000008; + @Generated public static final int SuppressStrongLifetime = 0x00000009; + @Generated public static final int SuppressLifetimeQualifiers = 0x0000000A; + @Generated public static final int SuppressTemplateArgsInCXXConstructors = 0x0000000B; + @Generated public static final int Bool = 0x0000000C; + @Generated public static final int Restrict = 0x0000000D; + @Generated public static final int Alignof = 0x0000000E; + @Generated public static final int UnderscoreAlignof = 0x0000000F; + @Generated public static final int UseVoidForZeroParams = 0x00000010; + @Generated public static final int TerseOutput = 0x00000011; + @Generated public static final int PolishForDeclaration = 0x00000012; + @Generated public static final int Half = 0x00000013; + @Generated public static final int MSWChar = 0x00000014; + @Generated public static final int IncludeNewlines = 0x00000015; + @Generated public static final int MSVCFormatting = 0x00000016; + @Generated public static final int ConstantsAsWritten = 0x00000017; + @Generated public static final int SuppressImplicitBase = 0x00000018; + @Generated public static final int FullyQualifiedName = 0x00000019; + @Generated public static final int LastProperty = 0x00000019; +} diff --git a/src/main/java/org/clang/enums/CXRefQualifierKind.java b/src/main/java/org/clang/enums/CXRefQualifierKind.java index d08dbac..f35bfeb 100644 --- a/src/main/java/org/clang/enums/CXRefQualifierKind.java +++ b/src/main/java/org/clang/enums/CXRefQualifierKind.java @@ -20,8 +20,17 @@ @Generated public final class CXRefQualifierKind { + /** + * No ref-qualifier was provided. + */ @Generated public static final int None = 0x00000000; + /** + * An lvalue ref-qualifier was provided (\c &). + */ @Generated public static final int LValue = 0x00000001; + /** + * An rvalue ref-qualifier was provided (\c &&). + */ @Generated public static final int RValue = 0x00000002; @Generated diff --git a/src/main/java/org/clang/enums/CXReparse_Flags.java b/src/main/java/org/clang/enums/CXReparse_Flags.java index e1dde0a..e2dc447 100644 --- a/src/main/java/org/clang/enums/CXReparse_Flags.java +++ b/src/main/java/org/clang/enums/CXReparse_Flags.java @@ -18,8 +18,18 @@ import org.moe.natj.general.ann.Generated; +/** + * Flags that control the reparsing of translation units. + *

+ * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * reparsing the translation unit. + */ @Generated public final class CXReparse_Flags { + /** + * Used to indicate that no special reparsing options are needed. + */ @Generated public static final int CXReparse_None = 0x00000000; @Generated diff --git a/src/main/java/org/clang/enums/CXResult.java b/src/main/java/org/clang/enums/CXResult.java index 6c523ff..8ecddeb 100644 --- a/src/main/java/org/clang/enums/CXResult.java +++ b/src/main/java/org/clang/enums/CXResult.java @@ -20,8 +20,18 @@ @Generated public final class CXResult { + /** + * Function returned successfully. + */ @Generated public static final int CXResult_Success = 0x00000000; + /** + * One of the parameters was invalid for the function. + */ @Generated public static final int CXResult_Invalid = 0x00000001; + /** + * The function was terminated by a callback (e.g. it returned + * CXVisit_Break) + */ @Generated public static final int CXResult_VisitBreak = 0x00000002; @Generated diff --git a/src/main/java/org/clang/enums/CXSaveError.java b/src/main/java/org/clang/enums/CXSaveError.java index 2d38364..3d6e231 100644 --- a/src/main/java/org/clang/enums/CXSaveError.java +++ b/src/main/java/org/clang/enums/CXSaveError.java @@ -18,11 +18,36 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the kind of error that occurred (if any) in a call to + * \c clang_saveTranslationUnit(). + */ @Generated public final class CXSaveError { + /** + * Indicates that no error occurred while saving a translation unit. + */ @Generated public static final int None = 0x00000000; + /** + * Indicates that an unknown error occurred while attempting to save + * the file. + *

+ * This error typically indicates that file I/O failed when attempting to + * write the file. + */ @Generated public static final int Unknown = 0x00000001; + /** + * Indicates that errors during translation prevented this attempt + * to save the translation unit. + *

+ * Errors that prevent the translation unit from being saved can be + * extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic(). + */ @Generated public static final int TranslationErrors = 0x00000002; + /** + * Indicates that the translation unit to be saved was somehow + * invalid (e.g., NULL). + */ @Generated public static final int InvalidTU = 0x00000003; @Generated diff --git a/src/main/java/org/clang/enums/CXSaveTranslationUnit_Flags.java b/src/main/java/org/clang/enums/CXSaveTranslationUnit_Flags.java index b28893d..fb53e39 100644 --- a/src/main/java/org/clang/enums/CXSaveTranslationUnit_Flags.java +++ b/src/main/java/org/clang/enums/CXSaveTranslationUnit_Flags.java @@ -18,8 +18,18 @@ import org.moe.natj.general.ann.Generated; +/** + * Flags that control how translation units are saved. + *

+ * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * saving the translation unit. + */ @Generated public final class CXSaveTranslationUnit_Flags { + /** + * Used to indicate that no special saving options are needed. + */ @Generated public static final int CXSaveTranslationUnit_None = 0x00000000; @Generated diff --git a/src/main/java/org/clang/enums/CXSymbolRole.java b/src/main/java/org/clang/enums/CXSymbolRole.java new file mode 100644 index 0000000..efbba17 --- /dev/null +++ b/src/main/java/org/clang/enums/CXSymbolRole.java @@ -0,0 +1,27 @@ +package org.clang.enums; + +import org.moe.natj.general.ann.Generated; + +/** + * Roles that are attributed to symbol occurrences. + *

+ * Internal: this currently mirrors low 9 bits of clang::index::SymbolRole with + * higher bits zeroed. These high bits may be exposed in the future. + */ +@Generated +public final class CXSymbolRole { + @Generated + private CXSymbolRole() { + } + + @Generated public static final int CXSymbolRole_None = 0x00000000; + @Generated public static final int CXSymbolRole_Declaration = 0x00000001; + @Generated public static final int CXSymbolRole_Definition = 0x00000002; + @Generated public static final int CXSymbolRole_Reference = 0x00000004; + @Generated public static final int CXSymbolRole_Read = 0x00000008; + @Generated public static final int CXSymbolRole_Write = 0x00000010; + @Generated public static final int CXSymbolRole_Call = 0x00000020; + @Generated public static final int CXSymbolRole_Dynamic = 0x00000040; + @Generated public static final int CXSymbolRole_AddressOf = 0x00000080; + @Generated public static final int CXSymbolRole_Implicit = 0x00000100; +} diff --git a/src/main/java/org/clang/enums/CXTLSKind.java b/src/main/java/org/clang/enums/CXTLSKind.java new file mode 100644 index 0000000..847971e --- /dev/null +++ b/src/main/java/org/clang/enums/CXTLSKind.java @@ -0,0 +1,18 @@ +package org.clang.enums; + +import org.moe.natj.general.ann.Generated; + +/** + * Describe the "thread-local storage (TLS) kind" of the declaration + * referred to by a cursor. + */ +@Generated +public final class CXTLSKind { + @Generated + private CXTLSKind() { + } + + @Generated public static final int None = 0x00000000; + @Generated public static final int Dynamic = 0x00000001; + @Generated public static final int Static = 0x00000002; +} diff --git a/src/main/java/org/clang/enums/CXTUResourceUsageKind.java b/src/main/java/org/clang/enums/CXTUResourceUsageKind.java index 165f16b..a247cef 100644 --- a/src/main/java/org/clang/enums/CXTUResourceUsageKind.java +++ b/src/main/java/org/clang/enums/CXTUResourceUsageKind.java @@ -18,6 +18,9 @@ import org.moe.natj.general.ann.Generated; +/** + * Categorizes how memory is being used by a translation unit. + */ @Generated public final class CXTUResourceUsageKind { @Generated public static final int AST = 0x00000001; diff --git a/src/main/java/org/clang/enums/CXTemplateArgumentKind.java b/src/main/java/org/clang/enums/CXTemplateArgumentKind.java index 7a76bfa..867c246 100644 --- a/src/main/java/org/clang/enums/CXTemplateArgumentKind.java +++ b/src/main/java/org/clang/enums/CXTemplateArgumentKind.java @@ -18,6 +18,12 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the kind of a template argument. + *

+ * See the definition of llvm::clang::TemplateArgument::ArgKind for full + * element descriptions. + */ @Generated public final class CXTemplateArgumentKind { @Generated public static final int Null = 0x00000000; @@ -29,6 +35,9 @@ public final class CXTemplateArgumentKind { @Generated public static final int TemplateExpansion = 0x00000006; @Generated public static final int Expression = 0x00000007; @Generated public static final int Pack = 0x00000008; + /** + * Indicates an error case, preventing the kind from being deduced. + */ @Generated public static final int Invalid = 0x00000009; @Generated diff --git a/src/main/java/org/clang/enums/CXTokenKind.java b/src/main/java/org/clang/enums/CXTokenKind.java index d7f300f..3638514 100644 --- a/src/main/java/org/clang/enums/CXTokenKind.java +++ b/src/main/java/org/clang/enums/CXTokenKind.java @@ -18,12 +18,30 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes a kind of token. + */ @Generated public final class CXTokenKind { + /** + * A token that contains some kind of punctuation. + */ @Generated public static final int Punctuation = 0x00000000; + /** + * A language keyword. + */ @Generated public static final int Keyword = 0x00000001; + /** + * An identifier (that is not a keyword). + */ @Generated public static final int Identifier = 0x00000002; + /** + * A numeric, string, or character literal. + */ @Generated public static final int Literal = 0x00000003; + /** + * A comment. + */ @Generated public static final int Comment = 0x00000004; @Generated diff --git a/src/main/java/org/clang/enums/CXTranslationUnit_Flags.java b/src/main/java/org/clang/enums/CXTranslationUnit_Flags.java index 8c7aec3..bb302d6 100644 --- a/src/main/java/org/clang/enums/CXTranslationUnit_Flags.java +++ b/src/main/java/org/clang/enums/CXTranslationUnit_Flags.java @@ -18,21 +18,148 @@ import org.moe.natj.general.ann.Generated; +/** + * Flags that control the creation of translation units. + *

+ * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * constructing the translation unit. + */ @Generated public final class CXTranslationUnit_Flags { + /** + * Used to indicate that no special translation-unit options are + * needed. + */ @Generated public static final int None = 0x00000000; + /** + * Used to indicate that the parser should construct a "detailed" + * preprocessing record, including all macro definitions and instantiations. + *

+ * Constructing a detailed preprocessing record requires more memory + * and time to parse, since the information contained in the record + * is usually not retained. However, it can be useful for + * applications that require more detailed information about the + * behavior of the preprocessor. + */ @Generated public static final int DetailedPreprocessingRecord = 0x00000001; + /** + * Used to indicate that the translation unit is incomplete. + *

+ * When a translation unit is considered "incomplete", semantic + * analysis that is typically performed at the end of the + * translation unit will be suppressed. For example, this suppresses + * the completion of tentative declarations in C and of + * instantiation of implicitly-instantiation function templates in + * C++. This option is typically used when parsing a header with the + * intent of producing a precompiled header. + */ @Generated public static final int Incomplete = 0x00000002; + /** + * Used to indicate that the translation unit should be built with an + * implicit precompiled header for the preamble. + *

+ * An implicit precompiled header is used as an optimization when a + * particular translation unit is likely to be reparsed many times + * when the sources aren't changing that often. In this case, an + * implicit precompiled header will be built containing all of the + * initial includes at the top of the main file (what we refer to as + * the "preamble" of the file). In subsequent parses, if the + * preamble or the files in it have not changed, \c + * clang_reparseTranslationUnit() will re-use the implicit + * precompiled header to improve parsing performance. + */ @Generated public static final int PrecompiledPreamble = 0x00000004; + /** + * Used to indicate that the translation unit should cache some + * code-completion results with each reparse of the source file. + *

+ * Caching of code-completion results is a performance optimization that + * introduces some overhead to reparsing but improves the performance of + * code-completion operations. + */ @Generated public static final int CacheCompletionResults = 0x00000008; + /** + * Used to indicate that the translation unit will be serialized with + * \c clang_saveTranslationUnit. + *

+ * This option is typically used when parsing a header with the intent of + * producing a precompiled header. + */ @Generated public static final int ForSerialization = 0x00000010; + /** + * DEPRECATED: Enabled chained precompiled preambles in C++. + *

+ * Note: this is a *temporary* option that is available only while + * we are testing C++ precompiled preamble support. It is deprecated. + */ @Generated public static final int CXXChainedPCH = 0x00000020; + /** + * Used to indicate that function/method bodies should be skipped while + * parsing. + *

+ * This option can be used to search for declarations/definitions while + * ignoring the usages. + */ @Generated public static final int SkipFunctionBodies = 0x00000040; + /** + * Used to indicate that brief documentation comments should be + * included into the set of code completions returned from this translation + * unit. + */ @Generated public static final int IncludeBriefCommentsInCodeCompletion = 0x00000080; + /** + * Used to indicate that the precompiled preamble should be created on + * the first parse. Otherwise it will be created on the first reparse. This + * trades runtime on the first parse (serializing the preamble takes time) for + * reduced runtime on the second parse (can now reuse the preamble). + */ @Generated public static final int CreatePreambleOnFirstParse = 0x00000100; + /** + * Do not stop processing when fatal errors are encountered. + *

+ * When fatal errors are encountered while parsing a translation unit, + * semantic analysis is typically stopped early when compiling code. A common + * source for fatal errors are unresolvable include files. For the + * purposes of an IDE, this is undesirable behavior and as much information + * as possible should be reported. Use this flag to enable this behavior. + */ @Generated public static final int KeepGoing = 0x00000200; @Generated private CXTranslationUnit_Flags() { } + + /** + * Sets the preprocessor in a mode for parsing a single file only. + */ + @Generated public static final int SingleFileParse = 0x00000400; + /** + * Used in combination with CXTranslationUnit_SkipFunctionBodies to + * constrain the skipping of function bodies to the preamble. + *

+ * The function bodies of the main file are not skipped. + */ + @Generated public static final int LimitSkipFunctionBodiesToPreamble = 0x00000800; + /** + * Used to indicate that attributed types should be included in CXType. + */ + @Generated public static final int IncludeAttributedTypes = 0x00001000; + /** + * Used to indicate that implicit attributes should be visited. + */ + @Generated public static final int VisitImplicitAttributes = 0x00002000; + /** + * Used to indicate that non-errors from included files should be ignored. + *

+ * If set, clang_getDiagnosticSetFromTU() will not report e.g. warnings from + * included files anymore. This speeds up clang_getDiagnosticSetFromTU() for + * the case where these warnings are not of interest, as for an IDE for + * example, which typically shows only the diagnostics in the main file. + */ + @Generated public static final int IgnoreNonErrorsFromIncludedFiles = 0x00004000; + /** + * Tells the preprocessor not to skip excluded conditional blocks. + */ + @Generated public static final int RetainExcludedConditionalBlocks = 0x00008000; } diff --git a/src/main/java/org/clang/enums/CXTypeKind.java b/src/main/java/org/clang/enums/CXTypeKind.java index f011087..21263e9 100644 --- a/src/main/java/org/clang/enums/CXTypeKind.java +++ b/src/main/java/org/clang/enums/CXTypeKind.java @@ -18,63 +18,497 @@ import org.moe.natj.general.ann.Generated; +/** + * Describes the kind of type + */ @Generated public final class CXTypeKind { + /** + * Represents an invalid type (e.g., where no type is available). + */ @Generated public static final int Invalid = 0x00000000; + /** + * A type whose specific kind is not exposed via this + * interface. + */ @Generated public static final int Unexposed = 0x00000001; + /** + * Builtin types + */ @Generated public static final int Void = 0x00000002; + /** + * Builtin types + */ @Generated public static final int Bool = 0x00000003; + /** + * Builtin types + */ @Generated public static final int Char_U = 0x00000004; + /** + * Builtin types + */ @Generated public static final int UChar = 0x00000005; + /** + * Builtin types + */ @Generated public static final int Char16 = 0x00000006; + /** + * Builtin types + */ @Generated public static final int Char32 = 0x00000007; + /** + * Builtin types + */ @Generated public static final int UShort = 0x00000008; + /** + * Builtin types + */ @Generated public static final int UInt = 0x00000009; + /** + * Builtin types + */ @Generated public static final int ULong = 0x0000000A; + /** + * Builtin types + */ @Generated public static final int ULongLong = 0x0000000B; + /** + * Builtin types + */ @Generated public static final int UInt128 = 0x0000000C; + /** + * Builtin types + */ @Generated public static final int Char_S = 0x0000000D; + /** + * Builtin types + */ @Generated public static final int SChar = 0x0000000E; + /** + * Builtin types + */ @Generated public static final int WChar = 0x0000000F; + /** + * Builtin types + */ @Generated public static final int Short = 0x00000010; + /** + * Builtin types + */ @Generated public static final int Int = 0x00000011; + /** + * Builtin types + */ @Generated public static final int Long = 0x00000012; + /** + * Builtin types + */ @Generated public static final int LongLong = 0x00000013; + /** + * Builtin types + */ @Generated public static final int Int128 = 0x00000014; + /** + * Builtin types + */ @Generated public static final int Float = 0x00000015; + /** + * Builtin types + */ @Generated public static final int Double = 0x00000016; + /** + * Builtin types + */ @Generated public static final int LongDouble = 0x00000017; + /** + * Builtin types + */ @Generated public static final int NullPtr = 0x00000018; + /** + * Builtin types + */ @Generated public static final int Overload = 0x00000019; + /** + * Builtin types + */ @Generated public static final int Dependent = 0x0000001A; + /** + * Builtin types + */ @Generated public static final int ObjCId = 0x0000001B; + /** + * Builtin types + */ @Generated public static final int ObjCClass = 0x0000001C; + /** + * Builtin types + */ @Generated public static final int ObjCSel = 0x0000001D; + /** + * Builtin types + */ @Generated public static final int Float128 = 0x0000001E; + /** + * Builtin types + */ @Generated public static final int FirstBuiltin = 0x00000002; - @Generated public static final int LastBuiltin = 0x0000001D; + /** + * Builtin types + */ + @Generated public static final int LastBuiltin = 0x00000027; + /** + * Builtin types + */ @Generated public static final int Complex = 0x00000064; + /** + * Builtin types + */ @Generated public static final int Pointer = 0x00000065; + /** + * Builtin types + */ @Generated public static final int BlockPointer = 0x00000066; + /** + * Builtin types + */ @Generated public static final int LValueReference = 0x00000067; + /** + * Builtin types + */ @Generated public static final int RValueReference = 0x00000068; + /** + * Builtin types + */ @Generated public static final int Record = 0x00000069; + /** + * Builtin types + */ @Generated public static final int Enum = 0x0000006A; + /** + * Builtin types + */ @Generated public static final int Typedef = 0x0000006B; + /** + * Builtin types + */ @Generated public static final int ObjCInterface = 0x0000006C; + /** + * Builtin types + */ @Generated public static final int ObjCObjectPointer = 0x0000006D; + /** + * Builtin types + */ @Generated public static final int FunctionNoProto = 0x0000006E; + /** + * Builtin types + */ @Generated public static final int FunctionProto = 0x0000006F; + /** + * Builtin types + */ @Generated public static final int ConstantArray = 0x00000070; + /** + * Builtin types + */ @Generated public static final int Vector = 0x00000071; + /** + * Builtin types + */ @Generated public static final int IncompleteArray = 0x00000072; + /** + * Builtin types + */ @Generated public static final int VariableArray = 0x00000073; + /** + * Builtin types + */ @Generated public static final int DependentSizedArray = 0x00000074; + /** + * Builtin types + */ @Generated public static final int MemberPointer = 0x00000075; + /** + * Builtin types + */ @Generated public static final int Auto = 0x00000076; + /** + * Represents a type that was referred to using an elaborated type keyword. + *

+ * E.g., struct S, or via a qualified name, e.g., N::M::type, or both. + */ @Generated public static final int Elaborated = 0x00000077; @Generated private CXTypeKind() { } + + /** + * Builtin types + */ + @Generated public static final int Half = 0x0000001F; + /** + * Builtin types + */ + @Generated public static final int Float16 = 0x00000020; + /** + * Builtin types + */ + @Generated public static final int ShortAccum = 0x00000021; + /** + * Builtin types + */ + @Generated public static final int Accum = 0x00000022; + /** + * Builtin types + */ + @Generated public static final int LongAccum = 0x00000023; + /** + * Builtin types + */ + @Generated public static final int UShortAccum = 0x00000024; + /** + * Builtin types + */ + @Generated public static final int UAccum = 0x00000025; + /** + * Builtin types + */ + @Generated public static final int ULongAccum = 0x00000026; + /** + * Builtin types + */ + @Generated public static final int BFloat16 = 0x00000027; + /** + * OpenCL PipeType. + */ + @Generated public static final int Pipe = 0x00000078; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dRO = 0x00000079; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dArrayRO = 0x0000007A; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dBufferRO = 0x0000007B; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dRO = 0x0000007C; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayRO = 0x0000007D; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dDepthRO = 0x0000007E; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayDepthRO = 0x0000007F; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dMSAARO = 0x00000080; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayMSAARO = 0x00000081; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dMSAADepthRO = 0x00000082; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayMSAADepthRO = 0x00000083; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage3dRO = 0x00000084; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dWO = 0x00000085; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dArrayWO = 0x00000086; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dBufferWO = 0x00000087; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dWO = 0x00000088; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayWO = 0x00000089; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dDepthWO = 0x0000008A; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayDepthWO = 0x0000008B; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dMSAAWO = 0x0000008C; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayMSAAWO = 0x0000008D; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dMSAADepthWO = 0x0000008E; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayMSAADepthWO = 0x0000008F; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage3dWO = 0x00000090; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dRW = 0x00000091; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dArrayRW = 0x00000092; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage1dBufferRW = 0x00000093; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dRW = 0x00000094; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayRW = 0x00000095; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dDepthRW = 0x00000096; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayDepthRW = 0x00000097; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dMSAARW = 0x00000098; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayMSAARW = 0x00000099; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dMSAADepthRW = 0x0000009A; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage2dArrayMSAADepthRW = 0x0000009B; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLImage3dRW = 0x0000009C; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLSampler = 0x0000009D; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLEvent = 0x0000009E; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLQueue = 0x0000009F; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLReserveID = 0x000000A0; + /** + * OpenCL builtin types. + */ + @Generated public static final int ObjCObject = 0x000000A1; + /** + * OpenCL builtin types. + */ + @Generated public static final int ObjCTypeParam = 0x000000A2; + /** + * OpenCL builtin types. + */ + @Generated public static final int Attributed = 0x000000A3; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCMcePayload = 0x000000A4; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCImePayload = 0x000000A5; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCRefPayload = 0x000000A6; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCSicPayload = 0x000000A7; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCMceResult = 0x000000A8; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCImeResult = 0x000000A9; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCRefResult = 0x000000AA; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCSicResult = 0x000000AB; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCImeResultSingleRefStreamout = 0x000000AC; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCImeResultDualRefStreamout = 0x000000AD; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCImeSingleRefStreamin = 0x000000AE; + /** + * OpenCL builtin types. + */ + @Generated public static final int OCLIntelSubgroupAVCImeDualRefStreamin = 0x000000AF; + /** + * OpenCL builtin types. + */ + @Generated public static final int ExtVector = 0x000000B0; + /** + * OpenCL builtin types. + */ + @Generated public static final int Atomic = 0x000000B1; } diff --git a/src/main/java/org/clang/enums/CXTypeLayoutError.java b/src/main/java/org/clang/enums/CXTypeLayoutError.java index 1261e53..ed1e076 100644 --- a/src/main/java/org/clang/enums/CXTypeLayoutError.java +++ b/src/main/java/org/clang/enums/CXTypeLayoutError.java @@ -18,15 +18,43 @@ import org.moe.natj.general.ann.Generated; +/** + * List the possible error codes for \c clang_Type_getSizeOf, + * \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and + * \c clang_Cursor_getOffsetOf. + *

+ * A value of this enumeration type can be returned if the target type is not + * a valid argument to sizeof, alignof or offsetof. + */ @Generated public final class CXTypeLayoutError { + /** + * Type is of kind CXType_Invalid. + */ @Generated public static final int Invalid = 0xFFFFFFFF; + /** + * The type is an incomplete Type. + */ @Generated public static final int Incomplete = 0xFFFFFFFE; + /** + * The type is a dependent Type. + */ @Generated public static final int Dependent = 0xFFFFFFFD; + /** + * The type is not a constant size type. + */ @Generated public static final int NotConstantSize = 0xFFFFFFFC; + /** + * The Field name is not valid for this record. + */ @Generated public static final int InvalidFieldName = 0xFFFFFFFB; @Generated private CXTypeLayoutError() { } + + /** + * The type is undeduced. + */ + @Generated public static final int Undeduced = 0xFFFFFFFA; } diff --git a/src/main/java/org/clang/enums/CXTypeNullabilityKind.java b/src/main/java/org/clang/enums/CXTypeNullabilityKind.java new file mode 100644 index 0000000..2b20a0c --- /dev/null +++ b/src/main/java/org/clang/enums/CXTypeNullabilityKind.java @@ -0,0 +1,37 @@ +package org.clang.enums; + +import org.moe.natj.general.ann.Generated; + +@Generated +public final class CXTypeNullabilityKind { + @Generated + private CXTypeNullabilityKind() { + } + + /** + * Values of this type can never be null. + */ + @Generated public static final int NonNull = 0x00000000; + /** + * Values of this type can be null. + */ + @Generated public static final int Nullable = 0x00000001; + /** + * Whether values of this type can be null is (explicitly) + * unspecified. This captures a (fairly rare) case where we + * can't conclude anything about the nullability of the type even + * though it has been considered. + */ + @Generated public static final int Unspecified = 0x00000002; + /** + * Nullability is not applicable to this type. + */ + @Generated public static final int Invalid = 0x00000003; + /** + * Generally behaves like Nullable, except when used in a block parameter that + * was imported into a swift async method. There, swift will assume that the + * parameter can get null even if no error occured. _Nullable parameters are + * assumed to only get null on error. + */ + @Generated public static final int NullableResult = 0x00000004; +} diff --git a/src/main/java/org/clang/enums/CXVisibilityKind.java b/src/main/java/org/clang/enums/CXVisibilityKind.java index db67b89..295ff1d 100644 --- a/src/main/java/org/clang/enums/CXVisibilityKind.java +++ b/src/main/java/org/clang/enums/CXVisibilityKind.java @@ -4,9 +4,22 @@ @Generated public final class CXVisibilityKind { + /** + * This value indicates that no visibility information is available + * for a provided CXCursor. + */ @Generated public static final int Invalid = 0x00000000; + /** + * Symbol not seen by the linker. + */ @Generated public static final int Hidden = 0x00000001; + /** + * Symbol seen by the linker but resolves to a symbol inside this object. + */ @Generated public static final int Protected = 0x00000002; + /** + * Symbol seen by the linker and acts like a normal symbol. + */ @Generated public static final int Default = 0x00000003; @Generated diff --git a/src/main/java/org/clang/enums/CXVisitorResult.java b/src/main/java/org/clang/enums/CXVisitorResult.java index 27c2c46..361a18b 100644 --- a/src/main/java/org/clang/enums/CXVisitorResult.java +++ b/src/main/java/org/clang/enums/CXVisitorResult.java @@ -18,6 +18,11 @@ import org.moe.natj.general.ann.Generated; +/** + * \defgroup CINDEX_HIGH Higher level API functions + * + * @{ + */ @Generated public final class CXVisitorResult { @Generated public static final int Break = 0x00000000; diff --git a/src/main/java/org/clang/enums/CX_CXXAccessSpecifier.java b/src/main/java/org/clang/enums/CX_CXXAccessSpecifier.java index fbee18d..d4ec382 100644 --- a/src/main/java/org/clang/enums/CX_CXXAccessSpecifier.java +++ b/src/main/java/org/clang/enums/CX_CXXAccessSpecifier.java @@ -18,6 +18,10 @@ import org.moe.natj.general.ann.Generated; +/** + * Represents the C++ access control level to a base class for a + * cursor with kind CX_CXXBaseSpecifier. + */ @Generated public final class CX_CXXAccessSpecifier { @Generated public static final int InvalidAccessSpecifier = 0x00000000; diff --git a/src/main/java/org/clang/enums/CX_StorageClass.java b/src/main/java/org/clang/enums/CX_StorageClass.java index db689ff..f16b20b 100644 --- a/src/main/java/org/clang/enums/CX_StorageClass.java +++ b/src/main/java/org/clang/enums/CX_StorageClass.java @@ -18,6 +18,10 @@ import org.moe.natj.general.ann.Generated; +/** + * Represents the storage classes as declared in the source. CX_SC_Invalid + * was added for the case that the passed cursor in not a declaration. + */ @Generated public final class CX_StorageClass { @Generated public static final int Invalid = 0x00000000; diff --git a/src/main/java/org/clang/opaque/CXTargetInfo.java b/src/main/java/org/clang/opaque/CXTargetInfo.java new file mode 100644 index 0000000..6c9562d --- /dev/null +++ b/src/main/java/org/clang/opaque/CXTargetInfo.java @@ -0,0 +1,20 @@ +package org.clang.opaque; + +import org.moe.natj.c.CRuntime; +import org.moe.natj.c.OpaquePtr; +import org.moe.natj.general.Pointer; +import org.moe.natj.general.ann.Generated; +import org.moe.natj.general.ann.Runtime; +import org.moe.natj.general.ptr.impl.OpaquePtrImpl; + +@Generated +@Runtime(CRuntime.class) +public interface CXTargetInfo extends OpaquePtr { + @Generated + class Impl extends OpaquePtrImpl implements CXTargetInfo { + @Generated + protected Impl(Pointer peer) { + super(peer); + } + } +} diff --git a/src/main/java/org/clang/struct/CXCodeCompleteResults.java b/src/main/java/org/clang/struct/CXCodeCompleteResults.java index 101ddd7..4e635d3 100644 --- a/src/main/java/org/clang/struct/CXCodeCompleteResults.java +++ b/src/main/java/org/clang/struct/CXCodeCompleteResults.java @@ -53,20 +53,34 @@ public CXCodeCompleteResults( setNumResults(NumResults); } + /** + * The code-completion results. + */ @Generated @StructureField(order = 0, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXCompletionResult Results(); + /** + * The code-completion results. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setResults( @UncertainArgument("Options: reference, array Fallback: reference") CXCompletionResult value); + /** + * The number of code-completion results stored in the + * \c Results array. + */ @Generated @StructureField(order = 1, isGetter = true) public native int NumResults(); + /** + * The number of code-completion results stored in the + * \c Results array. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setNumResults(int value); diff --git a/src/main/java/org/clang/struct/CXCompletionResult.java b/src/main/java/org/clang/struct/CXCompletionResult.java index fe17468..1e5bc6b 100644 --- a/src/main/java/org/clang/struct/CXCompletionResult.java +++ b/src/main/java/org/clang/struct/CXCompletionResult.java @@ -50,18 +50,46 @@ public CXCompletionResult(int CursorKind, VoidPtr CompletionString) { setCompletionString(CompletionString); } + /** + * The kind of entity that this completion refers to. + *

+ * The cursor kind will be a macro, keyword, or a declaration (one of the + * *Decl cursor kinds), describing the entity that the completion is + * referring to. + *

+ * \todo In the future, we would like to provide a full cursor, to allow + * the client to extract additional information from declaration. + */ @Generated @StructureField(order = 0, isGetter = true) public native int CursorKind(); + /** + * The kind of entity that this completion refers to. + *

+ * The cursor kind will be a macro, keyword, or a declaration (one of the + * *Decl cursor kinds), describing the entity that the completion is + * referring to. + *

+ * \todo In the future, we would like to provide a full cursor, to allow + * the client to extract additional information from declaration. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setCursorKind(int value); + /** + * The code-completion string that describes how to insert this + * code-completion result into the editing buffer. + */ @Generated @StructureField(order = 1, isGetter = true) public native VoidPtr CompletionString(); + /** + * The code-completion string that describes how to insert this + * code-completion result into the editing buffer. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setCompletionString(VoidPtr value); diff --git a/src/main/java/org/clang/struct/CXIdxDeclInfo.java b/src/main/java/org/clang/struct/CXIdxDeclInfo.java index e813b8e..83a6ad2 100644 --- a/src/main/java/org/clang/struct/CXIdxDeclInfo.java +++ b/src/main/java/org/clang/struct/CXIdxDeclInfo.java @@ -86,11 +86,19 @@ public native void setEntityInfo( public native void setSemanticContainer( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxContainerInfo value); + /** + * Generally same as #semanticContainer but can be different in + * cases like out-of-line C++ member functions. + */ @Generated @StructureField(order = 4, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXIdxContainerInfo lexicalContainer(); + /** + * Generally same as #semanticContainer but can be different in + * cases like out-of-line C++ member functions. + */ @Generated @StructureField(order = 4, isGetter = false) public native void setLexicalContainer( @@ -130,10 +138,18 @@ public native void setLexicalContainer( public native void setDeclAsContainer( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxContainerInfo value); + /** + * Whether the declaration exists in code or was created implicitly + * by the compiler, e.g. implicit Objective-C methods for properties. + */ @Generated @StructureField(order = 9, isGetter = true) public native int isImplicit(); + /** + * Whether the declaration exists in code or was created implicitly + * by the compiler, e.g. implicit Objective-C methods for properties. + */ @Generated @StructureField(order = 9, isGetter = false) public native void setIsImplicit(int value); diff --git a/src/main/java/org/clang/struct/CXIdxEntityRefInfo.java b/src/main/java/org/clang/struct/CXIdxEntityRefInfo.java index 5729537..346ae3a 100644 --- a/src/main/java/org/clang/struct/CXIdxEntityRefInfo.java +++ b/src/main/java/org/clang/struct/CXIdxEntityRefInfo.java @@ -53,11 +53,17 @@ protected CXIdxEntityRefInfo(Pointer peer) { @StructureField(order = 0, isGetter = false) public native void setKind(int value); + /** + * Reference cursor. + */ @Generated @StructureField(order = 1, isGetter = true) @ByValue public native CXCursor cursor(); + /** + * Reference cursor. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setCursor(@ByValue CXCursor value); @@ -71,33 +77,81 @@ protected CXIdxEntityRefInfo(Pointer peer) { @StructureField(order = 2, isGetter = false) public native void setLoc(@ByValue CXIdxLoc value); + /** + * The entity that gets referenced. + */ @Generated @StructureField(order = 3, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXIdxEntityInfo referencedEntity(); + /** + * The entity that gets referenced. + */ @Generated @StructureField(order = 3, isGetter = false) public native void setReferencedEntity( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxEntityInfo value); + /** + * Immediate "parent" of the reference. For example: + *

+ * \code + * Foo *var; + * \endcode + *

+ * The parent of reference of type 'Foo' is the variable 'var'. + * For references inside statement bodies of functions/methods, + * the parentEntity will be the function/method. + */ @Generated @StructureField(order = 4, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXIdxEntityInfo parentEntity(); + /** + * Immediate "parent" of the reference. For example: + *

+ * \code + * Foo *var; + * \endcode + *

+ * The parent of reference of type 'Foo' is the variable 'var'. + * For references inside statement bodies of functions/methods, + * the parentEntity will be the function/method. + */ @Generated @StructureField(order = 4, isGetter = false) public native void setParentEntity( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxEntityInfo value); + /** + * Lexical container context of the reference. + */ @Generated @StructureField(order = 5, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXIdxContainerInfo container(); + /** + * Lexical container context of the reference. + */ @Generated @StructureField(order = 5, isGetter = false) public native void setContainer( @UncertainArgument("Options: reference, array Fallback: reference") CXIdxContainerInfo value); + + /** + * Sets of symbol roles of the reference. + */ + @Generated + @StructureField(order = 6, isGetter = true) + public native int role(); + + /** + * Sets of symbol roles of the reference. + */ + @Generated + @StructureField(order = 6, isGetter = false) + public native void setRole(int value); } diff --git a/src/main/java/org/clang/struct/CXIdxImportedASTFileInfo.java b/src/main/java/org/clang/struct/CXIdxImportedASTFileInfo.java index 8d939dc..541c48c 100644 --- a/src/main/java/org/clang/struct/CXIdxImportedASTFileInfo.java +++ b/src/main/java/org/clang/struct/CXIdxImportedASTFileInfo.java @@ -53,35 +53,61 @@ public CXIdxImportedASTFileInfo(VoidPtr file, VoidPtr module, @ByValue CXIdxLoc setIsImplicit(isImplicit); } + /** + * Top level AST file containing the imported PCH, module or submodule. + */ @Generated @StructureField(order = 0, isGetter = true) public native VoidPtr file(); + /** + * Top level AST file containing the imported PCH, module or submodule. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setFile(VoidPtr value); + /** + * The imported module or NULL if the AST file is a PCH. + */ @Generated @StructureField(order = 1, isGetter = true) public native VoidPtr module(); + /** + * The imported module or NULL if the AST file is a PCH. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setModule(VoidPtr value); + /** + * Location where the file is imported. Applicable only for modules. + */ @Generated @StructureField(order = 2, isGetter = true) @ByValue public native CXIdxLoc loc(); + /** + * Location where the file is imported. Applicable only for modules. + */ @Generated @StructureField(order = 2, isGetter = false) public native void setLoc(@ByValue CXIdxLoc value); + /** + * Non-zero if an inclusion directive was automatically turned into + * a module import. Applicable only for modules. + */ @Generated @StructureField(order = 3, isGetter = true) public native int isImplicit(); + /** + * Non-zero if an inclusion directive was automatically turned into + * a module import. Applicable only for modules. + */ @Generated @StructureField(order = 3, isGetter = false) public native void setIsImplicit(int value); diff --git a/src/main/java/org/clang/struct/CXIdxIncludedFileInfo.java b/src/main/java/org/clang/struct/CXIdxIncludedFileInfo.java index ec4d3aa..8809605 100644 --- a/src/main/java/org/clang/struct/CXIdxIncludedFileInfo.java +++ b/src/main/java/org/clang/struct/CXIdxIncludedFileInfo.java @@ -46,29 +46,47 @@ protected CXIdxIncludedFileInfo(Pointer peer) { super(peer); } + /** + * Location of '#' in the \#include/\#import directive. + */ @Generated @StructureField(order = 0, isGetter = true) @ByValue public native CXIdxLoc hashLoc(); + /** + * Location of '#' in the \#include/\#import directive. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setHashLoc(@ByValue CXIdxLoc value); + /** + * Filename as written in the \#include/\#import directive. + */ @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") @Generated @StructureField(order = 1, isGetter = true) public native String filename(); + /** + * Filename as written in the \#include/\#import directive. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setFilename( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String value); + /** + * The actual file that the \#include/\#import directive resolved to. + */ @Generated @StructureField(order = 2, isGetter = true) public native VoidPtr file(); + /** + * The actual file that the \#include/\#import directive resolved to. + */ @Generated @StructureField(order = 2, isGetter = false) public native void setFile(VoidPtr value); @@ -89,10 +107,18 @@ public native void setFilename( @StructureField(order = 4, isGetter = false) public native void setIsAngled(int value); + /** + * Non-zero if the directive was automatically turned into a module + * import. + */ @Generated @StructureField(order = 5, isGetter = true) public native int isModuleImport(); + /** + * Non-zero if the directive was automatically turned into a module + * import. + */ @Generated @StructureField(order = 5, isGetter = false) public native void setIsModuleImport(int value); diff --git a/src/main/java/org/clang/struct/CXIdxLoc.java b/src/main/java/org/clang/struct/CXIdxLoc.java index 2b556ff..e753187 100644 --- a/src/main/java/org/clang/struct/CXIdxLoc.java +++ b/src/main/java/org/clang/struct/CXIdxLoc.java @@ -64,8 +64,8 @@ protected CXIdxLoc(Pointer peer) { /* Comfort java methods */ public VoidPtr getFileLocation() { - @SuppressWarnings("unchecked") Ptr file_ref = (Ptr)PtrFactory - .newPointerPtr(Void.class, 2, 1, true, false); + @SuppressWarnings("unchecked") Ptr file_ref = (Ptr)PtrFactory.newPointerPtr(Void.class, 2, 1, + true, false); clang.clang_indexLoc_getFileLocation(this, null, file_ref, null, null, null); return file_ref.get(); } diff --git a/src/main/java/org/clang/struct/CXPlatformAvailability.java b/src/main/java/org/clang/struct/CXPlatformAvailability.java index e1fef50..8b8567c 100644 --- a/src/main/java/org/clang/struct/CXPlatformAvailability.java +++ b/src/main/java/org/clang/struct/CXPlatformAvailability.java @@ -43,55 +43,103 @@ protected CXPlatformAvailability(Pointer peer) { super(peer); } + /** + * A string that describes the platform for which this structure + * provides availability information. + *

+ * Possible values are "ios" or "macos". + */ @Generated @StructureField(order = 0, isGetter = true) @ByValue public native CXString Platform(); + /** + * A string that describes the platform for which this structure + * provides availability information. + *

+ * Possible values are "ios" or "macos". + */ @Generated @StructureField(order = 0, isGetter = false) public native void setPlatform(@ByValue CXString value); + /** + * The version number in which this entity was introduced. + */ @Generated @StructureField(order = 1, isGetter = true) @ByValue public native CXVersion Introduced(); + /** + * The version number in which this entity was introduced. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setIntroduced(@ByValue CXVersion value); + /** + * The version number in which this entity was deprecated (but is + * still available). + */ @Generated @StructureField(order = 2, isGetter = true) @ByValue public native CXVersion Deprecated(); + /** + * The version number in which this entity was deprecated (but is + * still available). + */ @Generated @StructureField(order = 2, isGetter = false) public native void setDeprecated(@ByValue CXVersion value); + /** + * The version number in which this entity was obsoleted, and therefore + * is no longer available. + */ @Generated @StructureField(order = 3, isGetter = true) @ByValue public native CXVersion Obsoleted(); + /** + * The version number in which this entity was obsoleted, and therefore + * is no longer available. + */ @Generated @StructureField(order = 3, isGetter = false) public native void setObsoleted(@ByValue CXVersion value); + /** + * Whether the entity is unconditionally unavailable on this platform. + */ @Generated @StructureField(order = 4, isGetter = true) public native int Unavailable(); + /** + * Whether the entity is unconditionally unavailable on this platform. + */ @Generated @StructureField(order = 4, isGetter = false) public native void setUnavailable(int value); + /** + * An optional message to provide to a user of this API, e.g., to + * suggest replacement APIs. + */ @Generated @StructureField(order = 5, isGetter = true) @ByValue public native CXString Message(); + /** + * An optional message to provide to a user of this API, e.g., to + * suggest replacement APIs. + */ @Generated @StructureField(order = 5, isGetter = false) public native void setMessage(@ByValue CXString value); diff --git a/src/main/java/org/clang/struct/CXSourceLocation.java b/src/main/java/org/clang/struct/CXSourceLocation.java index f96730e..573b42e 100644 --- a/src/main/java/org/clang/struct/CXSourceLocation.java +++ b/src/main/java/org/clang/struct/CXSourceLocation.java @@ -66,8 +66,8 @@ protected CXSourceLocation(Pointer peer) { /* Comfort java methods */ public VoidPtr getFile() { - @SuppressWarnings("unchecked") Ptr file_ref = (Ptr)PtrFactory - .newPointerPtr(Void.class, 2, 1, true, false); + @SuppressWarnings("unchecked") Ptr file_ref = (Ptr)PtrFactory.newPointerPtr(Void.class, 2, 1, + true, false); clang.clang_getExpansionLocation(this, file_ref, null, null, null); VoidPtr file = file_ref.get(); return file; diff --git a/src/main/java/org/clang/struct/CXSourceRangeList.java b/src/main/java/org/clang/struct/CXSourceRangeList.java index 15d7625..edae9e0 100644 --- a/src/main/java/org/clang/struct/CXSourceRangeList.java +++ b/src/main/java/org/clang/struct/CXSourceRangeList.java @@ -52,19 +52,31 @@ public CXSourceRangeList(int count, setRanges(ranges); } + /** + * The number of ranges in the \c ranges array. + */ @Generated @StructureField(order = 0, isGetter = true) public native int count(); + /** + * The number of ranges in the \c ranges array. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setCount(int value); + /** + * An array of \c CXSourceRanges. + */ @Generated @StructureField(order = 1, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXSourceRange ranges(); + /** + * An array of \c CXSourceRanges. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setRanges( diff --git a/src/main/java/org/clang/struct/CXStringSet.java b/src/main/java/org/clang/struct/CXStringSet.java index e3b143b..4a3f1c7 100644 --- a/src/main/java/org/clang/struct/CXStringSet.java +++ b/src/main/java/org/clang/struct/CXStringSet.java @@ -52,4 +52,4 @@ public CXStringSet(@UncertainArgument("Options: reference, array Fallback: refer @Generated @StructureField(order = 1, isGetter = false) public native void setCount(int value); -} \ No newline at end of file +} diff --git a/src/main/java/org/clang/struct/CXTUResourceUsage.java b/src/main/java/org/clang/struct/CXTUResourceUsage.java index 44541b5..8c40f03 100644 --- a/src/main/java/org/clang/struct/CXTUResourceUsage.java +++ b/src/main/java/org/clang/struct/CXTUResourceUsage.java @@ -54,27 +54,47 @@ public CXTUResourceUsage(VoidPtr data, int numEntries, setEntries(entries); } + /** + * Private data member, used for queries. + */ @Generated @StructureField(order = 0, isGetter = true) public native VoidPtr data(); + /** + * Private data member, used for queries. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setData(VoidPtr value); + /** + * The number of entries in the 'entries' array. + */ @Generated @StructureField(order = 1, isGetter = true) public native int numEntries(); + /** + * The number of entries in the 'entries' array. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setNumEntries(int value); + /** + * An array of key-value pairs, representing the breakdown of memory + * usage. + */ @Generated @StructureField(order = 2, isGetter = true) @UncertainReturn("Options: reference, array Fallback: reference") public native CXTUResourceUsageEntry entries(); + /** + * An array of key-value pairs, representing the breakdown of memory + * usage. + */ @Generated @StructureField(order = 2, isGetter = false) public native void setEntries( diff --git a/src/main/java/org/clang/struct/CXTUResourceUsageEntry.java b/src/main/java/org/clang/struct/CXTUResourceUsageEntry.java index 0fcae66..0203cb1 100644 --- a/src/main/java/org/clang/struct/CXTUResourceUsageEntry.java +++ b/src/main/java/org/clang/struct/CXTUResourceUsageEntry.java @@ -49,18 +49,32 @@ public CXTUResourceUsageEntry(int kind, long amount) { setAmount(amount); } + /** + * The memory usage category. + */ @Generated @StructureField(order = 0, isGetter = true) public native int kind(); + /** + * The memory usage category. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setKind(int value); + /** + * Amount of resources used. + * The units will depend on the resource kind. + */ @Generated @StructureField(order = 1, isGetter = true) public native long amount(); + /** + * Amount of resources used. + * The units will depend on the resource kind. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setAmount(long value); diff --git a/src/main/java/org/clang/struct/CXUnsavedFile.java b/src/main/java/org/clang/struct/CXUnsavedFile.java index 8d39e62..96eaeae 100644 --- a/src/main/java/org/clang/struct/CXUnsavedFile.java +++ b/src/main/java/org/clang/struct/CXUnsavedFile.java @@ -55,30 +55,52 @@ public CXUnsavedFile( setLength(Length); } + /** + * The file whose contents have not yet been saved. + *

+ * This file must already exist in the file system. + */ @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") @Generated @StructureField(order = 0, isGetter = true) public native String Filename(); + /** + * The file whose contents have not yet been saved. + *

+ * This file must already exist in the file system. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setFilename( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String value); + /** + * A buffer containing the unsaved contents of this file. + */ @UncertainReturn("Options: java.string, c.const-byte-ptr Fallback: java.string") @Generated @StructureField(order = 1, isGetter = true) public native String Contents(); + /** + * A buffer containing the unsaved contents of this file. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setContents( @UncertainArgument("Options: java.string, c.const-byte-ptr Fallback: java.string") String value); + /** + * The length of the unsaved contents of this buffer. + */ @Generated @StructureField(order = 2, isGetter = true) public native long Length(); + /** + * The length of the unsaved contents of this buffer. + */ @Generated @StructureField(order = 2, isGetter = false) public native void setLength(long value); diff --git a/src/main/java/org/clang/struct/CXVersion.java b/src/main/java/org/clang/struct/CXVersion.java index d8fdd0d..cc00754 100644 --- a/src/main/java/org/clang/struct/CXVersion.java +++ b/src/main/java/org/clang/struct/CXVersion.java @@ -50,26 +50,54 @@ public CXVersion(int Major, int Minor, int Subminor) { setSubminor(Subminor); } + /** + * The major version number, e.g., the '10' in '10.7.3'. A negative + * value indicates that there is no version number at all. + */ @Generated @StructureField(order = 0, isGetter = true) public native int Major(); + /** + * The major version number, e.g., the '10' in '10.7.3'. A negative + * value indicates that there is no version number at all. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setMajor(int value); + /** + * The minor version number, e.g., the '7' in '10.7.3'. This value + * will be negative if no minor version number was provided, e.g., for + * version '10'. + */ @Generated @StructureField(order = 1, isGetter = true) public native int Minor(); + /** + * The minor version number, e.g., the '7' in '10.7.3'. This value + * will be negative if no minor version number was provided, e.g., for + * version '10'. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setMinor(int value); + /** + * The subminor version number, e.g., the '3' in '10.7.3'. This value + * will be negative if no minor or subminor version number was provided, + * e.g., in version '10' or '10.7'. + */ @Generated @StructureField(order = 2, isGetter = true) public native int Subminor(); + /** + * The subminor version number, e.g., the '3' in '10.7.3'. This value + * will be negative if no minor or subminor version number was provided, + * e.g., in version '10' or '10.7'. + */ @Generated @StructureField(order = 2, isGetter = false) public native void setSubminor(int value); diff --git a/src/main/java/org/clang/struct/IndexerCallbacks.java b/src/main/java/org/clang/struct/IndexerCallbacks.java index a30dfe6..3a67b7f 100644 --- a/src/main/java/org/clang/struct/IndexerCallbacks.java +++ b/src/main/java/org/clang/struct/IndexerCallbacks.java @@ -47,10 +47,17 @@ protected IndexerCallbacks(Pointer peer) { super(peer); } + /** + * Called periodically to check whether indexing should be aborted. + * Should return 0 to continue, and non-zero to abort. + */ @Generated @StructureField(order = 0, isGetter = false) public native void setAbortQuery(@FunctionPtr(name = "call_abortQuery") Function_abortQuery value); + /** + * Called at the end of indexing; passes the complete diagnostic set. + */ @Generated @StructureField(order = 1, isGetter = false) public native void setDiagnostic(@FunctionPtr(name = "call_diagnostic") Function_diagnostic value); @@ -59,14 +66,28 @@ protected IndexerCallbacks(Pointer peer) { @StructureField(order = 2, isGetter = false) public native void setEnteredMainFile(@FunctionPtr(name = "call_enteredMainFile") Function_enteredMainFile value); + /** + * Called when a file gets \#included/\#imported. + */ @Generated @StructureField(order = 3, isGetter = false) public native void setPpIncludedFile(@FunctionPtr(name = "call_ppIncludedFile") Function_ppIncludedFile value); + /** + * Called when a AST file (PCH or module) gets imported. + *

+ * AST files will not get indexed (there will not be callbacks to index all + * the entities in an AST file). The recommended action is that, if the AST + * file is not already indexed, to initiate a new indexing job specific to + * the AST file. + */ @Generated @StructureField(order = 4, isGetter = false) public native void setImportedASTFile(@FunctionPtr(name = "call_importedASTFile") Function_importedASTFile value); + /** + * Called at the beginning of indexing a translation unit. + */ @Generated @StructureField(order = 5, isGetter = false) public native void setStartedTranslationUnit( @@ -77,16 +98,26 @@ public native void setStartedTranslationUnit( public native void setIndexDeclaration( @FunctionPtr(name = "call_indexDeclaration") Function_indexDeclaration value); + /** + * Called to index a reference of an entity. + */ @Generated @StructureField(order = 7, isGetter = false) public native void setIndexEntityReference( @FunctionPtr(name = "call_indexEntityReference") Function_indexEntityReference value); + /** + * Called periodically to check whether indexing should be aborted. + * Should return 0 to continue, and non-zero to abort. + */ @Generated @StructureField(order = 0, isGetter = true) @FunctionPtr(name = "call_abortQuery") public native Function_abortQuery abortQuery(); + /** + * Called at the end of indexing; passes the complete diagnostic set. + */ @Generated @StructureField(order = 1, isGetter = true) @FunctionPtr(name = "call_diagnostic") @@ -97,16 +128,30 @@ public native void setIndexEntityReference( @FunctionPtr(name = "call_enteredMainFile") public native Function_enteredMainFile enteredMainFile(); + /** + * Called when a file gets \#included/\#imported. + */ @Generated @StructureField(order = 3, isGetter = true) @FunctionPtr(name = "call_ppIncludedFile") public native Function_ppIncludedFile ppIncludedFile(); + /** + * Called when a AST file (PCH or module) gets imported. + *

+ * AST files will not get indexed (there will not be callbacks to index all + * the entities in an AST file). The recommended action is that, if the AST + * file is not already indexed, to initiate a new indexing job specific to + * the AST file. + */ @Generated @StructureField(order = 4, isGetter = true) @FunctionPtr(name = "call_importedASTFile") public native Function_importedASTFile importedASTFile(); + /** + * Called at the beginning of indexing a translation unit. + */ @Generated @StructureField(order = 5, isGetter = true) @FunctionPtr(name = "call_startedTranslationUnit") @@ -117,6 +162,9 @@ public native void setIndexEntityReference( @FunctionPtr(name = "call_indexDeclaration") public native Function_indexDeclaration indexDeclaration(); + /** + * Called to index a reference of an entity. + */ @Generated @StructureField(order = 7, isGetter = true) @FunctionPtr(name = "call_indexEntityReference")