Class ClangIndex
- java.lang.Object
-
- org.lwjgl.llvm.ClangIndex
-
public class ClangIndex extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClangIndex.Functions
Contains the function pointers loaded from the CLANGSharedLibrary
.
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clang_annotateTokens(long TU, CXToken.Buffer Tokens, CXCursor.Buffer Cursors)
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.static CXCodeCompleteResults
clang_codeCompleteAt(long TU, java.lang.CharSequence complete_filename, int complete_line, int complete_column, CXUnsavedFile.Buffer unsaved_files, int options)
Perform code completion at a given location in a translation unit.static CXCodeCompleteResults
clang_codeCompleteAt(long TU, java.nio.ByteBuffer complete_filename, int complete_line, int complete_column, CXUnsavedFile.Buffer unsaved_files, int options)
Perform code completion at a given location in a translation unit.static int
clang_codeCompleteGetContainerKind(CXCodeCompleteResults Results, java.nio.IntBuffer IsIncomplete)
Returns the cursor kind for the container for the current code completion context.static CXString
clang_codeCompleteGetContainerUSR(CXCodeCompleteResults Results, CXString __result)
Returns the USR for the container for the current code completion context.static long
clang_codeCompleteGetContexts(CXCodeCompleteResults Results)
Determines what completions are appropriate for the context the given code completion.static long
clang_codeCompleteGetDiagnostic(CXCodeCompleteResults Results, int Index)
Retrieve a diagnostic associated with the given code completion.static int
clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults Results)
Determine the number of diagnostics produced prior to the location where code completion was performed.static CXString
clang_codeCompleteGetObjCSelector(CXCodeCompleteResults Results, CXString __result)
Returns the currently-entered selector for an Objective-C message send, formatted like "initWithFoo:bar:".static CXString
clang_constructUSR_ObjCCategory(java.lang.CharSequence class_name, java.lang.CharSequence category_name, CXString __result)
Construct a USR for a specified Objective-C category.static CXString
clang_constructUSR_ObjCCategory(java.nio.ByteBuffer class_name, java.nio.ByteBuffer category_name, CXString __result)
Construct a USR for a specified Objective-C category.static CXString
clang_constructUSR_ObjCClass(java.lang.CharSequence class_name, CXString __result)
Construct a USR for a specified Objective-C class.static CXString
clang_constructUSR_ObjCClass(java.nio.ByteBuffer class_name, CXString __result)
Construct a USR for a specified Objective-C class.static CXString
clang_constructUSR_ObjCIvar(java.lang.CharSequence name, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C instance variable and the USR for its containing class.static CXString
clang_constructUSR_ObjCIvar(java.nio.ByteBuffer name, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C instance variable and the USR for its containing class.static CXString
clang_constructUSR_ObjCMethod(java.lang.CharSequence name, boolean isInstanceMethod, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C method and the USR for its containing class.static CXString
clang_constructUSR_ObjCMethod(java.nio.ByteBuffer name, boolean isInstanceMethod, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C method and the USR for its containing class.static CXString
clang_constructUSR_ObjCProperty(java.lang.CharSequence property, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C property and the USR for its containing class.static CXString
clang_constructUSR_ObjCProperty(java.nio.ByteBuffer property, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C property and the USR for its containing class.static CXString
clang_constructUSR_ObjCProtocol(java.lang.CharSequence protocol_name, CXString __result)
Construct a USR for a specified Objective-C protocol.static CXString
clang_constructUSR_ObjCProtocol(java.nio.ByteBuffer protocol_name, CXString __result)
Construct a USR for a specified Objective-C protocol.static long
clang_createCXCursorSet()
Creates an empty CXCursorSet.static long
clang_createIndex(boolean excludeDeclarationsFromPCH, boolean displayDiagnostics)
Provides a shared context for creating translation units.static long
clang_createTranslationUnit(long CIdx, java.lang.CharSequence ast_filename)
Same ascreateTranslationUnit2
, but returns theCXTranslationUnit
instead of an error code.static long
clang_createTranslationUnit(long CIdx, java.nio.ByteBuffer ast_filename)
Same ascreateTranslationUnit2
, but returns theCXTranslationUnit
instead of an error code.static int
clang_createTranslationUnit2(long CIdx, java.lang.CharSequence ast_filename, org.lwjgl.PointerBuffer out_TU)
Create a translation unit from an AST file (-emit-ast
).static int
clang_createTranslationUnit2(long CIdx, java.nio.ByteBuffer ast_filename, org.lwjgl.PointerBuffer out_TU)
Create a translation unit from an AST file (-emit-ast
).static long
clang_createTranslationUnitFromSourceFile(long CIdx, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer clang_command_line_args, CXUnsavedFile.Buffer unsaved_files)
Return theCXTranslationUnit
for a given source file and the provided command line arguments one would pass to the compiler.static long
clang_createTranslationUnitFromSourceFile(long CIdx, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer clang_command_line_args, CXUnsavedFile.Buffer unsaved_files)
Return theCXTranslationUnit
for a given source file and the provided command line arguments one would pass to the compiler.static long
clang_Cursor_Evaluate(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.static CXCursor
clang_Cursor_getArgument(CXCursor C, int i, CXCursor __result)
Retrieve the argument cursor of a function or method.static CXString
clang_Cursor_getBriefCommentText(CXCursor C, CXString __result)
Given a cursor that represents a documentable entity (e.g., declaration), return the associated; otherwise return thestatic CXSourceRange
clang_Cursor_getCommentRange(CXCursor C, CXSourceRange __result)
Given a cursor that represents a declaration, return the associated comment's source range.static CXStringSet
clang_Cursor_getCXXManglings(CXCursor cursor)
Retrieve theCXString
s representing the mangled symbols of the C++ constructor or destructor at the cursor.static CXString
clang_Cursor_getMangling(CXCursor cursor, CXString __result)
Retrieve theCXString
representing the mangled name of the cursor.static long
clang_Cursor_getModule(CXCursor C)
Given aCursor_ModuleImportDecl
cursor, return the associated module.static int
clang_Cursor_getNumArguments(CXCursor C)
Retrieve the number of non-variadic arguments associated with a given cursor.static int
clang_Cursor_getNumTemplateArguments(CXCursor C)
Returns the number of template args of a function decl representing a template specialization.static int
clang_Cursor_getObjCDeclQualifiers(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.static CXStringSet
clang_Cursor_getObjCManglings(CXCursor cursor)
Retrieve theCXString
s representing the mangled symbols of the ObjC class interface or implementation at the cursor.static int
clang_Cursor_getObjCPropertyAttributes(CXCursor C, int reserved)
Given a cursor that represents a property declaration, return the associated property attributes.static CXString
clang_Cursor_getObjCPropertyGetterName(CXCursor C, CXString __result)
Given a cursor that represents a property declaration, return the name of the method that implements the getter.static CXString
clang_Cursor_getObjCPropertySetterName(CXCursor C, CXString __result)
Given a cursor that represents a property declaration, return the name of the method that implements the setter, if any.static int
clang_Cursor_getObjCSelectorIndex(CXCursor cursor)
If the cursor points to a selector identifier in an Objective-C method or message expression, this returns the selector index.static long
clang_Cursor_getOffsetOfField(CXCursor C)
Return the offset of the field represented by the Cursor.static CXString
clang_Cursor_getRawCommentText(CXCursor C, CXString __result)
Given a cursor that represents a declaration, return the associated comment text, including comment markers.static CXType
clang_Cursor_getReceiverType(CXCursor C, CXType __result)
Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns theCXType
of the receiver.static CXSourceRange
clang_Cursor_getSpellingNameRange(CXCursor cursor, int pieceIndex, int options, CXSourceRange __result)
Retrieve a range for a piece that forms the cursors spelling name.static int
clang_Cursor_getStorageClass(CXCursor cursor)
Returns the storage class for a function or variable declaration.static int
clang_Cursor_getTemplateArgumentKind(CXCursor C, int I)
Retrieve the kind of the I'th template argument of theCXCursor
C
.static CXType
clang_Cursor_getTemplateArgumentType(CXCursor C, int I, CXType __result)
Retrieve aCXType
representing the type of aTemplateArgument
of a function decl representing a template specialization.static long
clang_Cursor_getTemplateArgumentUnsignedValue(CXCursor C, int I)
Retrieve the value of anIntegral
TemplateArgument
(of a function decl representing a template specialization) as anunsigned long long
.static long
clang_Cursor_getTemplateArgumentValue(CXCursor C, int I)
Retrieve the value of anIntegral
TemplateArgument
(of a function decl representing a template specialization) as asigned long long
.static long
clang_Cursor_getTranslationUnit(CXCursor cursor)
Returns the translation unit that a cursor originated from.static boolean
clang_Cursor_hasAttrs(CXCursor C)
Determine whether the given cursor has any attributes.static boolean
clang_Cursor_isAnonymous(CXCursor C)
Determine whether the given cursor represents an anonymous record declaration.static boolean
clang_Cursor_isBitField(CXCursor C)
Returns non-zero if the cursor specifies a Record member that is a bitfield.static boolean
clang_Cursor_isDynamicCall(CXCursor C)
Given a cursor pointing to a C++ method call or an Objective-C message, returns non-zero if the method/message is "dynamic", meaning:static boolean
clang_Cursor_isExternalSymbol(CXCursor C, CXString.Buffer language, CXString.Buffer definedIn, java.nio.IntBuffer isGenerated)
Returns non-zero if the given cursor points to a symbol marked with external_source_symbol attribute.static boolean
clang_Cursor_isFunctionInlined(CXCursor C)
Determine whether aCXCursor
that is a function declaration, is an inline declaration.static boolean
clang_Cursor_isMacroBuiltin(CXCursor C)
Determine whether aCXCursor
that is a macro, is a builtin one.static boolean
clang_Cursor_isMacroFunctionLike(CXCursor C)
Determine whether aCXCursor
that is a macro, is function like.static boolean
clang_Cursor_isNull(CXCursor cursor)
Returns non-zero ifcursor
is null.static boolean
clang_Cursor_isObjCOptional(CXCursor C)
Given a cursor that represents an Objective-C method or property declaration, return non-zero if the declaration was affected by "@optional".static boolean
clang_Cursor_isVariadic(CXCursor C)
Returns non-zero if the given cursor is a variadic function or method.static boolean
clang_CXCursorSet_contains(long cset, CXCursor cursor)
Queries a CXCursorSet to see if it contains a specific CXCursor.static boolean
clang_CXCursorSet_insert(long cset, CXCursor cursor)
Inserts a CXCursor into a CXCursorSet.static int
clang_CXIndex_getGlobalOptions(long index)
Gets the general options associated with a CXIndex.static void
clang_CXIndex_setGlobalOptions(long index, int options)
Sets general options associated with aCXIndex
.static void
clang_CXIndex_setInvocationEmissionPathOption(long index, java.lang.CharSequence Path)
Sets the invocation emission path option in aCXIndex
.static void
clang_CXIndex_setInvocationEmissionPathOption(long index, java.nio.ByteBuffer Path)
Sets the invocation emission path option in aCXIndex
.static boolean
clang_CXXConstructor_isConvertingConstructor(CXCursor C)
Determine if a C++ constructor is a converting constructor.static boolean
clang_CXXConstructor_isCopyConstructor(CXCursor C)
Determine if a C++ constructor is a copy constructor.static boolean
clang_CXXConstructor_isDefaultConstructor(CXCursor C)
Determine if a C++ constructor is the default constructor.static boolean
clang_CXXConstructor_isMoveConstructor(CXCursor C)
Determine if a C++ constructor is a move constructor.static boolean
clang_CXXField_isMutable(CXCursor C)
Determine if a C++ field is declared 'mutable'.static boolean
clang_CXXMethod_isConst(CXCursor C)
Determine if a C++ member function or member function template is declared 'const'.static boolean
clang_CXXMethod_isDefaulted(CXCursor C)
Determine if a C++ method is declared '= default'.static boolean
clang_CXXMethod_isPureVirtual(CXCursor C)
Determine if a C++ member function or member function template is pure virtual.static boolean
clang_CXXMethod_isStatic(CXCursor C)
Determine if a C++ member function or member function template is declared 'static'.static boolean
clang_CXXMethod_isVirtual(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.static boolean
clang_CXXRecord_isAbstract(CXCursor C)
Determine if a C++ record is abstract, i.e.static int
clang_defaultCodeCompleteOptions()
Returns a default set of code-completion options that can be passed tocodeCompleteAt
.static int
clang_defaultDiagnosticDisplayOptions()
Retrieve the set of display options most similar to the default behavior of the clang compiler.static int
clang_defaultEditingTranslationUnitOptions()
Returns the set of flags that is suitable for parsing a translation unit that is being edited.static int
clang_defaultReparseOptions(long TU)
Returns the set of flags that is suitable for reparsing a translation unit.static int
clang_defaultSaveOptions(long TU)
Returns the set of flags that is suitable for saving a translation unit.static void
clang_disposeCodeCompleteResults(CXCodeCompleteResults Results)
Free the given set of code-completion results.static void
clang_disposeCXCursorSet(long cset)
Disposes a CXCursorSet and releases its associated memory.static void
clang_disposeCXPlatformAvailability(CXPlatformAvailability availability)
Free the memory associated with aCXPlatformAvailability
structure.static void
clang_disposeCXTUResourceUsage(CXTUResourceUsage usage)
static void
clang_disposeDiagnostic(long Diagnostic)
Destroy a diagnostic.static void
clang_disposeDiagnosticSet(long Diags)
Release aCXDiagnosticSet
and all of its contained diagnostics.static void
clang_disposeIndex(long index)
Destroy the given index.static void
clang_disposeOverriddenCursors(CXCursor.Buffer overridden)
Free the set of overridden cursors returned byclang_getOverriddenCursors()
.static void
clang_disposeSourceRangeList(CXSourceRangeList ranges)
Destroy the givenCXSourceRangeList
.static void
clang_disposeString(CXString string)
Free the given string.static void
clang_disposeStringSet(CXStringSet set)
Free the given string set.static void
clang_disposeTokens(long TU, CXToken.Buffer Tokens)
Free the given set of tokens.static void
clang_disposeTranslationUnit(long TU)
Destroy the specified CXTranslationUnit object.static void
clang_enableStackTraces()
static boolean
clang_EnumDecl_isScoped(CXCursor C)
Determine if an enum declaration refers to a scoped enum.static boolean
clang_equalCursors(CXCursor A, CXCursor B)
Determine whether two cursors are equivalent.static boolean
clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2)
Determine whether two source locations, which must refer into the same translation unit, refer to exactly the same point in the source code.static boolean
clang_equalRanges(CXSourceRange range1, CXSourceRange range2)
Determine whether two ranges are equivalent.static boolean
clang_equalTypes(CXType A, CXType B)
Determine whether twoCXTypes
represent the same type.static void
clang_EvalResult_dispose(long E)
Disposes the createdEval
memory.static double
clang_EvalResult_getAsDouble(long E)
Returns the evaluation result as double if the kind is double.static int
clang_EvalResult_getAsInt(long E)
Returns the evaluation result as integer if the kind is Int.static long
clang_EvalResult_getAsLongLong(long E)
Returns the evaluation result as a long long integer if the kind is Int.static java.lang.String
clang_EvalResult_getAsStr(long E)
Returns the evaluation result as a constant string if the kind is other than Int or float.static long
clang_EvalResult_getAsUnsigned(long E)
Returns the evaluation result as an unsigned integer if the kind is Int andEvalResult_isUnsignedInt
is non-zero.static int
clang_EvalResult_getKind(long E)
Returns the kind of the evaluated result.static boolean
clang_EvalResult_isUnsignedInt(long E)
Returns a non-zero value if the kind is Int and the evaluation result resulted in an unsigned integer.static void
clang_executeOnThread(CXExecuteOnThreadI fn, long user_data, int stack_size)
static boolean
clang_File_isEqual(long file1, long file2)
Returns non-zero if thefile1
andfile2
point to the same file, or they are bothNULL
.static CXString
clang_File_tryGetRealPathName(long file, CXString __result)
Returns the real path name offile
.static int
clang_findIncludesInFile(long TU, long file, CXCursorAndRangeVisitor visitor)
Find#import/#include
directives in a specific file.static int
clang_findReferencesInFile(CXCursor cursor, long file, CXCursorAndRangeVisitor visitor)
Find references of a declaration in a specific file.static CXString
clang_formatDiagnostic(long Diagnostic, int Options, CXString __result)
Format the given diagnostic in a manner that is suitable for display.static int
clang_getAddressSpace(CXType T)
Returns the address space of the given type.static CXSourceRangeList
clang_getAllSkippedRanges(long tu)
Retrieve all ranges from all files that were skipped by the preprocessor.static CXType
clang_getArgType(CXType T, int i, CXType __result)
Retrieve the type of a parameter of a function type.static CXType
clang_getArrayElementType(CXType T, CXType __result)
Return the element type of an array type.static long
clang_getArraySize(CXType T)
Return the array size of a constant array.static CXCursor
clang_getCanonicalCursor(CXCursor cursor, CXCursor __result)
Retrieve the canonical cursor corresponding to the given cursor.static CXType
clang_getCanonicalType(CXType T, CXType __result)
Return the canonical type for aCXType
.static long
clang_getChildDiagnostics(long D)
Retrieve the child diagnostics of aCXDiagnostic
.static CXString
clang_getClangVersion(CXString __result)
Return a version string, suitable for showing to a user, but not intended to be parsed (the format is not guaranteed to be stable).static CXString
clang_getCompletionAnnotation(long completion_string, int annotation_number, CXString __result)
Retrieve the annotation associated with the given completion string.static int
clang_getCompletionAvailability(long completion_string)
Determine the availability of the entity that this code-completion string refers to.static CXString
clang_getCompletionBriefComment(long completion_string, CXString __result)
Retrieve the brief documentation comment attached to the declaration that corresponds to the given completion string.static long
clang_getCompletionChunkCompletionString(long completion_string, int chunk_number)
Retrieve the completion string associated with a particular chunk within a completion string.static int
clang_getCompletionChunkKind(long completion_string, int chunk_number)
Determine the kind of a particular chunk within a completion string.static CXString
clang_getCompletionChunkText(long completion_string, int chunk_number, CXString __result)
Retrieve the text associated with a particular chunk within a completion string.static CXString
clang_getCompletionFixIt(CXCodeCompleteResults results, int completion_index, int fixit_index, CXSourceRange replacement_range, CXString __result)
Fix-its that must be applied before inserting the text for the corresponding completion.static int
clang_getCompletionNumAnnotations(long completion_string)
Retrieve the number of annotations associated with the given completion string.static int
clang_getCompletionNumFixIts(CXCodeCompleteResults results, int completion_index)
Retrieve the number of fix-its for the given completion index.static CXString
clang_getCompletionParent(long completion_string, java.nio.IntBuffer kind, CXString __result)
Retrieve the parent context of the given completion string.static int
clang_getCompletionPriority(long completion_string)
Determine the priority of this code completion.static java.lang.String
clang_getCString(CXString string)
Retrieve the character data associated with the given string.static CXCursor
clang_getCursor(long TU, CXSourceLocation location, CXCursor __result)
Map a source location to the cursor that describes the entity at that location in the source code.static int
clang_getCursorAvailability(CXCursor cursor)
Determine the availability of the entity that this cursor refers to, taking the current target platform into account.static long
clang_getCursorCompletionString(CXCursor cursor)
Retrieve a completion string for an arbitrary declaration or macro definition cursor.static CXCursor
clang_getCursorDefinition(CXCursor cursor, CXCursor __result)
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.static CXString
clang_getCursorDisplayName(CXCursor cursor, CXString __result)
Retrieve the display name for the entity referenced by this cursor.static int
clang_getCursorExceptionSpecificationType(CXCursor C)
Retrieve the exception specification type associated with a given cursor.static CXSourceRange
clang_getCursorExtent(CXCursor cursor, CXSourceRange __result)
Retrieve the physical extent of the source construct referenced by the given cursor.static int
clang_getCursorKind(CXCursor cursor)
Retrieve the kind of the given cursor.static CXString
clang_getCursorKindSpelling(int Kind, CXString __result)
static int
clang_getCursorLanguage(CXCursor cursor)
Determine the "language" of the entity referred to by a given cursor.static CXCursor
clang_getCursorLexicalParent(CXCursor cursor, CXCursor __result)
Determine the lexical parent of the given cursor.static int
clang_getCursorLinkage(CXCursor cursor)
Determine the linkage of the entity referred to by a given cursor.static CXSourceLocation
clang_getCursorLocation(CXCursor cursor, CXSourceLocation __result)
Retrieve the physical location of the source constructor referenced by the given cursor.static int
clang_getCursorPlatformAvailability(CXCursor cursor, java.nio.IntBuffer always_deprecated, CXString deprecated_message, java.nio.IntBuffer always_unavailable, CXString unavailable_message, CXPlatformAvailability.Buffer availability)
Determine the availability of the entity that this cursor refers to on any platforms for which availability information is known.static CXString
clang_getCursorPrettyPrinted(CXCursor Cursor, long Policy, CXString __result)
Pretty print declarations.static long
clang_getCursorPrintingPolicy(CXCursor cursor)
Retrieve the default policy for the cursor.static CXCursor
clang_getCursorReferenced(CXCursor cursor, CXCursor __result)
For a cursor that is a reference, retrieve a cursor representing the entity that it references.static CXSourceRange
clang_getCursorReferenceNameRange(CXCursor C, int NameFlags, int PieceIndex, CXSourceRange __result)
Given a cursor that references something else, return the source range covering that reference.static CXType
clang_getCursorResultType(CXCursor C, CXType __result)
Retrieve the return type associated with a given cursor.static CXCursor
clang_getCursorSemanticParent(CXCursor cursor, CXCursor __result)
Determine the semantic parent of the given cursor.static CXString
clang_getCursorSpelling(CXCursor cursor, CXString __result)
Retrieve a name for the entity referenced by this cursor.static int
clang_getCursorTLSKind(CXCursor cursor)
Determine the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.static CXType
clang_getCursorType(CXCursor C, CXType __result)
Retrieve the type of aCXCursor
(if any).static CXString
clang_getCursorUSR(CXCursor cursor, CXString __result)
Retrieve a Unified Symbol Resolution (USR) for the entity referenced by the given cursor.static int
clang_getCursorVisibility(CXCursor cursor)
Describe the visibility of the entity referred to by a cursor.static CXTUResourceUsage
clang_getCXTUResourceUsage(long TU, CXTUResourceUsage __result)
Return the memory usage of a translation unit.static int
clang_getCXXAccessSpecifier(CXCursor cursor)
Returns the access control level for the referenced object.static CXString
clang_getDeclObjCTypeEncoding(CXCursor C, CXString __result)
Returns the Objective-C type encoding for the specified declaration.static void
clang_getDefinitionSpellingAndExtent(CXCursor cursor, org.lwjgl.PointerBuffer startBuf, org.lwjgl.PointerBuffer endBuf, java.nio.IntBuffer startLine, java.nio.IntBuffer startColumn, java.nio.IntBuffer endLine, java.nio.IntBuffer endColumn)
static long
clang_getDiagnostic(long Unit, int Index)
Retrieve a diagnostic associated with the given translation unit.static int
clang_getDiagnosticCategory(long Diagnostic)
Retrieve the category number for this diagnostic.static CXString
clang_getDiagnosticCategoryText(long Diagnostic, CXString __result)
Retrieve the diagnostic category text for a given diagnostic.static CXString
clang_getDiagnosticFixIt(long Diagnostic, int FixIt, CXSourceRange ReplacementRange, CXString __result)
Retrieve the replacement information for a given fix-it.static long
clang_getDiagnosticInSet(long Diags, int Index)
Retrieve a diagnostic associated with the givenCXDiagnosticSet
.static CXSourceLocation
clang_getDiagnosticLocation(long Diagnostic, CXSourceLocation __result)
Retrieve the source location of the given diagnostic.static int
clang_getDiagnosticNumFixIts(long Diagnostic)
Determine the number of fix-it hints associated with the given diagnostic.static int
clang_getDiagnosticNumRanges(long Diagnostic)
Determine the number of source ranges associated with the given diagnostic.static CXString
clang_getDiagnosticOption(long Diag, CXString Disable, CXString __result)
Retrieve the name of the command-line option that enabled this diagnostic.static CXSourceRange
clang_getDiagnosticRange(long Diagnostic, int Range, CXSourceRange __result)
Retrieve a source range associated with the diagnostic.static long
clang_getDiagnosticSetFromTU(long Unit)
Retrieve the complete set of diagnostics associated with a translation unit.static int
clang_getDiagnosticSeverity(long Diagnostic)
Determine the severity of the given diagnostic.static CXString
clang_getDiagnosticSpelling(long Diagnostic, CXString __result)
Retrieve the text of the given diagnostic.static CXType
clang_getElementType(CXType T, CXType __result)
Return the element type of an array, complex, or vector type.static long
clang_getEnumConstantDeclUnsignedValue(CXCursor C)
Retrieve the integer value of an enum constant declaration as an unsigned long long.static long
clang_getEnumConstantDeclValue(CXCursor C)
Retrieve the integer value of an enum constant declaration as a signed long long.static CXType
clang_getEnumDeclIntegerType(CXCursor C, CXType __result)
Retrieve the integer type of an enum declaration.static int
clang_getExceptionSpecificationType(CXType T)
Retrieve the exception specification type associated with a function type.static void
clang_getExpansionLocation(CXSourceLocation location, org.lwjgl.PointerBuffer file, java.nio.IntBuffer line, java.nio.IntBuffer column, java.nio.IntBuffer offset)
Retrieve the file, line, column, and offset represented by the given source location.static int
clang_getFieldDeclBitWidth(CXCursor C)
Retrieve the bit width of a bit field declaration as an integer.static long
clang_getFile(long tu, java.lang.CharSequence file_name)
Retrieve a file handle within the given translation unit.static long
clang_getFile(long tu, java.nio.ByteBuffer file_name)
Retrieve a file handle within the given translation unit.static java.nio.ByteBuffer
clang_getFileContents(long tu, long file)
Retrieve the buffer associated with the given file.static void
clang_getFileLocation(CXSourceLocation location, org.lwjgl.PointerBuffer file, java.nio.IntBuffer line, java.nio.IntBuffer column, java.nio.IntBuffer offset)
Retrieve the file, line, column, and offset represented by the given source location.static CXString
clang_getFileName(long SFile, CXString __result)
Retrieve the complete file and path name of the given file.static long
clang_getFileTime(long SFile)
Retrieve the last modification time of the given file.static int
clang_getFileUniqueID(long file, CXFileUniqueID outID)
Retrieve the unique ID for the givenfile
.static int
clang_getFunctionTypeCallingConv(CXType T)
Retrieve the calling convention associated with a function type.static CXType
clang_getIBOutletCollectionType(CXCursor cursor, CXType __result)
For cursors representing aniboutletcollection
attribute, this function returns the collection element type.static long
clang_getIncludedFile(CXCursor cursor)
Retrieve the file that is included by the given inclusion directive cursor.static void
clang_getInclusions(long tu, CXInclusionVisitorI visitor, long client_data)
Visit the set of preprocessor inclusions in a translation unit.static CXSourceLocation
clang_getLocation(long tu, long file, int line, int column, CXSourceLocation __result)
Retrieves the source location associated with a given file/line/column in a particular translation unit.static CXSourceLocation
clang_getLocationForOffset(long tu, long file, int offset, CXSourceLocation __result)
Retrieves the source location associated with a given character offset in a particular translation unit.static long
clang_getModuleForFile(long TU, long file)
Given aCXFile
header file, return the module that contains it, if one exists.static CXCursor
clang_getNullCursor(CXCursor __result)
Retrieve theNULL
cursor, which represents no entity.static CXSourceLocation
clang_getNullLocation(CXSourceLocation __result)
Retrieve aNULL
(invalid) source location.static CXSourceRange
clang_getNullRange(CXSourceRange __result)
Retrieve aNULL
(invalid) source range.static int
clang_getNumArgTypes(CXType T)
Retrieve the number of non-variadic parameters associated with a function type.static int
clang_getNumCompletionChunks(long completion_string)
Retrieve the number of chunks in the given code-completion string.static int
clang_getNumDiagnostics(long Unit)
Determine the number of diagnostics produced for the given translation unit.static int
clang_getNumDiagnosticsInSet(long Diags)
Determine the number of diagnostics in aCXDiagnosticSet
.static long
clang_getNumElements(CXType T)
Return the number of elements of an array or vector type.static int
clang_getNumOverloadedDecls(CXCursor cursor)
Determine the number of overloaded declarations referenced by aCursor_OverloadedDeclRef
cursor.static CXCursor
clang_getOverloadedDecl(CXCursor cursor, int index, CXCursor __result)
Retrieve a cursor for one of the overloaded declarations referenced by aCursor_OverloadedDeclRef
cursor.static void
clang_getOverriddenCursors(CXCursor cursor, org.lwjgl.PointerBuffer overridden, java.nio.IntBuffer num_overridden)
Determine the set of methods that are overridden by the given method.static CXType
clang_getPointeeType(CXType T, CXType __result)
For pointer types, returns the type of the pointee.static void
clang_getPresumedLocation(CXSourceLocation location, CXString.Buffer filename, java.nio.IntBuffer line, java.nio.IntBuffer column)
Retrieve the file, line and column represented by the given source location, as specified in a # line directive.static CXSourceRange
clang_getRange(CXSourceLocation begin, CXSourceLocation end, CXSourceRange __result)
Retrieve a source range given the beginning and ending source locations.static CXSourceLocation
clang_getRangeEnd(CXSourceRange range, CXSourceLocation __result)
Retrieve a source location representing the last character within a source range.static CXSourceLocation
clang_getRangeStart(CXSourceRange range, CXSourceLocation __result)
Retrieve a source location representing the first character within a source range.static long
clang_getRemappings(java.lang.CharSequence path)
Retrieve a remapping.static long
clang_getRemappings(java.nio.ByteBuffer path)
Retrieve a remapping.static long
clang_getRemappingsFromFileList(org.lwjgl.PointerBuffer filePaths)
Retrieve a remapping.static CXType
clang_getResultType(CXType T, CXType __result)
Retrieve the return type associated with a function type.static CXSourceRangeList
clang_getSkippedRanges(long tu, long file)
Retrieve all ranges that were skipped by the preprocessor.static CXCursor
clang_getSpecializedCursorTemplate(CXCursor C, CXCursor __result)
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.static void
clang_getSpellingLocation(CXSourceLocation location, org.lwjgl.PointerBuffer file, java.nio.IntBuffer line, java.nio.IntBuffer column, java.nio.IntBuffer offset)
Retrieve the file, line, column, and offset represented by the given source location.static int
clang_getTemplateCursorKind(CXCursor C)
Given a cursor that represents a template, determine the cursor kind of the specializations would be generated by instantiating the template.static CXToken
clang_getToken(long TU, CXSourceLocation Location)
Get the raw lexical token starting with the given location.static CXSourceRange
clang_getTokenExtent(long TU, CXToken token, CXSourceRange __result)
Retrieve a source range that covers the given token.static int
clang_getTokenKind(CXToken token)
Determine the kind of the given token.static CXSourceLocation
clang_getTokenLocation(long TU, CXToken token, CXSourceLocation __result)
Retrieve the source location of the given token.static CXString
clang_getTokenSpelling(long TU, CXToken token, CXString __result)
Determine the spelling of the given token.static CXCursor
clang_getTranslationUnitCursor(long TU, CXCursor __result)
Retrieve the cursor that represents the given translation unit.static CXString
clang_getTranslationUnitSpelling(long CTUnit, CXString __result)
Get the original translation unit source file name.static long
clang_getTranslationUnitTargetInfo(long CTUnit)
Get target information for this translation unit.static java.lang.String
clang_getTUResourceUsageName(int kind)
Returns the human-readable null-terminated C string that represents the name of the memory category.static CXCursor
clang_getTypeDeclaration(CXType T, CXCursor __result)
Return the cursor for the declaration of the given type.static CXType
clang_getTypedefDeclUnderlyingType(CXCursor C, CXType __result)
Retrieve the underlying type of a typedef declaration.static CXString
clang_getTypedefName(CXType CT, CXString __result)
Returns the typedef name of the given type.static CXString
clang_getTypeKindSpelling(int K, CXString __result)
Retrieve the spelling of a givenCXTypeKind
.static CXString
clang_getTypeSpelling(CXType CT, CXString __result)
Pretty-print the underlying type using the rules of the language of the translation unit from which it came.static int
clang_hashCursor(CXCursor cursor)
Compute a hash value for the given cursor.static long
clang_index_getClientContainer(CXIdxContainerInfo info)
For retrieving a customCXIdxClientContainer
attached to a container.static long
clang_index_getClientEntity(CXIdxEntityInfo info)
For retrieving a customCXIdxClientEntity
attached to an entity.static CXIdxCXXClassDeclInfo
clang_index_getCXXClassDeclInfo(CXIdxDeclInfo info)
static CXIdxIBOutletCollectionAttrInfo
clang_index_getIBOutletCollectionAttrInfo(CXIdxAttrInfo info)
static CXIdxObjCCategoryDeclInfo
clang_index_getObjCCategoryDeclInfo(CXIdxDeclInfo info)
static CXIdxObjCContainerDeclInfo
clang_index_getObjCContainerDeclInfo(CXIdxDeclInfo info)
static CXIdxObjCInterfaceDeclInfo
clang_index_getObjCInterfaceDeclInfo(CXIdxDeclInfo info)
static CXIdxObjCPropertyDeclInfo
clang_index_getObjCPropertyDeclInfo(CXIdxDeclInfo info)
static CXIdxObjCProtocolRefListInfo
clang_index_getObjCProtocolRefListInfo(CXIdxDeclInfo info)
static boolean
clang_index_isEntityObjCContainerKind(int kind)
static void
clang_index_setClientContainer(CXIdxContainerInfo info, long container)
For setting a customCXIdxClientContainer
attached to a container.static void
clang_index_setClientEntity(CXIdxEntityInfo info, long entity)
For setting a customCXIdxClientEntity
attached to an entity.static long
clang_IndexAction_create(long CIdx)
An indexing action/session, to be applied to one or multiple translation units.static void
clang_IndexAction_dispose(long action)
Destroy the given index action.static CXSourceLocation
clang_indexLoc_getCXSourceLocation(CXIdxLoc loc, CXSourceLocation __result)
Retrieve theCXSourceLocation
represented by the givenCXIdxLoc
.static void
clang_indexLoc_getFileLocation(CXIdxLoc loc, org.lwjgl.PointerBuffer indexFile, org.lwjgl.PointerBuffer file, java.nio.IntBuffer line, java.nio.IntBuffer column, java.nio.IntBuffer offset)
Retrieve theCXIdxFile
, file, line, column, and offset represented by the givenCXIdxLoc
.static int
clang_indexSourceFile(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, org.lwjgl.PointerBuffer out_TU, int TU_options)
Index the given source file and the translation unit corresponding to that file via callbacks implemented throughIndexerCallbacks
.static int
clang_indexSourceFile(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, org.lwjgl.PointerBuffer out_TU, int TU_options)
Index the given source file and the translation unit corresponding to that file via callbacks implemented throughIndexerCallbacks
.static int
clang_indexSourceFileFullArgv(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, org.lwjgl.PointerBuffer out_TU, int TU_options)
static int
clang_indexSourceFileFullArgv(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, org.lwjgl.PointerBuffer out_TU, int TU_options)
static boolean
clang_indexTranslationUnit(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, long TU)
Index the given translation unit via callbacks implemented throughIndexerCallbacks
.static boolean
clang_isAttribute(int kind)
Determine whether the given cursor kind represents an attribute.static boolean
clang_isConstQualifiedType(CXType T)
Determine whether aCXType
has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.static boolean
clang_isCursorDefinition(CXCursor cursor)
Determine whether the declaration pointed to by this cursor is also a definition of that entity.static boolean
clang_isDeclaration(int kind)
Determine whether the given cursor kind represents a declaration.static boolean
clang_isExpression(int kind)
Determine whether the given cursor kind represents an expression.static boolean
clang_isFileMultipleIncludeGuarded(long tu, long file)
Determine whether the given header is guarded against multiple inclusions, either with the conventional #ifndef/#define/#endif macro guards or with #pragma once.static boolean
clang_isFunctionTypeVariadic(CXType T)
Return 1 if theCXType
is a variadic function type, and 0 otherwise.static boolean
clang_isInvalid(int kind)
Determine whether the given cursor kind represents an invalid cursor.static boolean
clang_isInvalidDeclaration(CXCursor cursor)
Determine whether the given declaration is invalid.static boolean
clang_isPODType(CXType T)
Return 1 if theCXType
is a POD (plain old data) type, and 0 otherwise.static boolean
clang_isPreprocessing(int kind)
Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.static boolean
clang_isReference(int kind)
Determine whether the given cursor kind represents a simple reference.static boolean
clang_isRestrictQualifiedType(CXType T)
Determine whether aCXType
has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.static boolean
clang_isStatement(int kind)
Determine whether the given cursor kind represents a statement.static boolean
clang_isTranslationUnit(int kind)
Determine whether the given cursor kind represents a translation unit.static boolean
clang_isUnexposed(int kind)
Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).static boolean
clang_isVirtualBase(CXCursor cursor)
Returns 1 if the base class specified by the cursor with kindCursor_CXXBaseSpecifier
is virtual.static boolean
clang_isVolatileQualifiedType(CXType T)
Determine whether aCXType
has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.static long
clang_loadDiagnostics(java.lang.CharSequence file, java.nio.IntBuffer error, CXString errorString)
Deserialize a set of diagnostics from a Clang diagnostics bitcode file.static long
clang_loadDiagnostics(java.nio.ByteBuffer file, java.nio.IntBuffer error, CXString errorString)
Deserialize a set of diagnostics from a Clang diagnostics bitcode file.static boolean
clang_Location_isFromMainFile(CXSourceLocation location)
Returns non-zero if the given source location is in the main file of the corresponding translation unit.static boolean
clang_Location_isInSystemHeader(CXSourceLocation location)
Returns non-zero if the given source location is in a system header.static long
clang_Module_getASTFile(long Module)
static CXString
clang_Module_getFullName(long Module, CXString __result)
static CXString
clang_Module_getName(long Module, CXString __result)
static int
clang_Module_getNumTopLevelHeaders(long TU, long Module)
static long
clang_Module_getParent(long Module)
static long
clang_Module_getTopLevelHeader(long TU, long Module, int Index)
static boolean
clang_Module_isSystem(long Module)
static long
clang_parseTranslationUnit(long CIdx, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, int options)
Same asparseTranslationUnit2
, but returns theCXTranslationUnit
instead of an error code.static long
clang_parseTranslationUnit(long CIdx, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, int options)
Same asparseTranslationUnit2
, but returns theCXTranslationUnit
instead of an error code.static int
clang_parseTranslationUnit2(long CIdx, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU)
Parse the given source file and the translation unit corresponding to that file.static int
clang_parseTranslationUnit2(long CIdx, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU)
Parse the given source file and the translation unit corresponding to that file.static int
clang_parseTranslationUnit2FullArgv(long CIdx, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU)
Same asparseTranslationUnit2
but requires a full command line forcommand_line_args
includingargv[0]
.static int
clang_parseTranslationUnit2FullArgv(long CIdx, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU)
Same asparseTranslationUnit2
but requires a full command line forcommand_line_args
includingargv[0]
.static void
clang_PrintingPolicy_dispose(long Policy)
Release a printing policy.static int
clang_PrintingPolicy_getProperty(long Policy, int Property)
Get a property value for the given printing policy.static void
clang_PrintingPolicy_setProperty(long Policy, int Property, int Value)
Set a property value for the given printing policy.static boolean
clang_Range_isNull(CXSourceRange range)
Returns non-zero ifrange
is null.static void
clang_remap_dispose(long Remapping)
Dispose the remapping.static void
clang_remap_getFilenames(long Remapping, int index, CXString original, CXString transformed)
Get the original and the associated filename from the remapping.static int
clang_remap_getNumFiles(long Remapping)
Determine the number of remappings.static int
clang_reparseTranslationUnit(long TU, CXUnsavedFile.Buffer unsaved_files, int options)
Reparse the source files that produced this translation unit.static int
clang_saveTranslationUnit(long TU, java.lang.CharSequence FileName, int options)
Saves a translation unit into a serialized representation of that translation unit on disk.static int
clang_saveTranslationUnit(long TU, java.nio.ByteBuffer FileName, int options)
Saves a translation unit into a serialized representation of that translation unit on disk.static void
clang_sortCodeCompletionResults(CXCompletionResult.Buffer Results)
Sort the code-completion results in case-insensitive alphabetical order.static boolean
clang_suspendTranslationUnit(long TU)
Suspend a translation unit in order to free memory associated with it.static void
clang_TargetInfo_dispose(long Info)
Destroy theCXTargetInfo
object.static int
clang_TargetInfo_getPointerWidth(long Info)
Get the pointer width of the target in bits.static CXString
clang_TargetInfo_getTriple(long Info, CXString __result)
Get the normalized target triple as a string.static void
clang_toggleCrashRecovery(boolean isEnabled)
Enable/disable crash recovery.static void
clang_tokenize(long TU, CXSourceRange Range, org.lwjgl.PointerBuffer Tokens, java.nio.IntBuffer NumTokens)
Tokenize the source code described by the given range into raw lexical tokens.static long
clang_Type_getAlignOf(CXType T)
Return the alignment of a type in bytes as perC++[expr.alignof]
standard.static CXType
clang_Type_getClassType(CXType T, CXType __result)
Return the class type of an member pointer type.static int
clang_Type_getCXXRefQualifier(CXType T)
Retrieve the ref-qualifier kind of a function or method.static CXType
clang_Type_getModifiedType(CXType T, CXType __result)
Return the type that was modified by this attributed type.static CXType
clang_Type_getNamedType(CXType T, CXType __result)
Retrieve the type named by the qualified-id.static int
clang_Type_getNullability(CXType T)
Retrieve the nullability kind of a pointer type.static int
clang_Type_getNumObjCProtocolRefs(CXType T)
Retrieve the number of protocol references associated with an ObjC object/id.static int
clang_Type_getNumObjCTypeArgs(CXType T)
Retreive the number of type arguments associated with an ObjC object.static int
clang_Type_getNumTemplateArguments(CXType T)
Returns the number of template arguments for given template specialization, or -1 if typeT
is not a template specialization.static CXString
clang_Type_getObjCEncoding(CXType type, CXString __result)
Returns the Objective-C type encoding for the specifiedCXType
.static CXType
clang_Type_getObjCObjectBaseType(CXType T, CXType __result)
Retrieves the base type of theObjCObjectType
.static CXCursor
clang_Type_getObjCProtocolDecl(CXType T, int i, CXCursor __result)
Retrieve the decl for a protocol reference for an ObjC object/id.static CXType
clang_Type_getObjCTypeArg(CXType T, int i, CXType __result)
Retrieve a type argument associated with an ObjC object.static long
clang_Type_getOffsetOf(CXType T, java.lang.CharSequence S)
Return the offset of a field namedS
in a record of typeT
in bits as it would be returned by__offsetof__
as perC++11[18.2p4]
static long
clang_Type_getOffsetOf(CXType T, java.nio.ByteBuffer S)
Return the offset of a field namedS
in a record of typeT
in bits as it would be returned by__offsetof__
as perC++11[18.2p4]
static long
clang_Type_getSizeOf(CXType T)
Return the size of a type in bytes as perC++[expr.sizeof]
standard.static CXType
clang_Type_getTemplateArgumentAsType(CXType T, int i, CXType __result)
Returns the type template argument of a template class specialization at given index.static boolean
clang_Type_isTransparentTagTypedef(CXType T)
Determine if a typedef is 'transparent' tag.static boolean
clang_Type_visitFields(CXType T, CXFieldVisitorI visitor)
Visit the fields of a particular type.static boolean
clang_visitChildren(CXCursor parent, CXCursorVisitorI visitor)
Visit the children of a particular cursor.static org.lwjgl.system.SharedLibrary
getLibrary()
Returns the CLANGSharedLibrary
.static void
nclang_annotateTokens(long TU, long Tokens, int NumTokens, long Cursors)
Unsafe version of:annotateTokens
static long
nclang_codeCompleteAt(long TU, long complete_filename, int complete_line, int complete_column, long unsaved_files, int num_unsaved_files, int options)
Unsafe version of:codeCompleteAt
static int
nclang_codeCompleteGetContainerKind(long Results, long IsIncomplete)
Unsafe version of:codeCompleteGetContainerKind
static void
nclang_codeCompleteGetContainerUSR(long Results, long __result)
Unsafe version of:codeCompleteGetContainerUSR
static void
nclang_codeCompleteGetContainerUSR(long Results, long __functionAddress, long __result)
Unsafe version of:codeCompleteGetContainerUSR
static long
nclang_codeCompleteGetContexts(long Results)
Unsafe version of:codeCompleteGetContexts
static long
nclang_codeCompleteGetDiagnostic(long Results, int Index)
Unsafe version of:codeCompleteGetDiagnostic
static int
nclang_codeCompleteGetNumDiagnostics(long Results)
Unsafe version of:codeCompleteGetNumDiagnostics
static void
nclang_codeCompleteGetObjCSelector(long Results, long __result)
Unsafe version of:codeCompleteGetObjCSelector
static void
nclang_codeCompleteGetObjCSelector(long Results, long __functionAddress, long __result)
Unsafe version of:codeCompleteGetObjCSelector
static void
nclang_constructUSR_ObjCCategory(long class_name, long category_name, long __result)
Unsafe version of:constructUSR_ObjCCategory
static void
nclang_constructUSR_ObjCCategory(long class_name, long category_name, long __functionAddress, long __result)
Unsafe version of:constructUSR_ObjCCategory
static void
nclang_constructUSR_ObjCClass(long class_name, long __result)
Unsafe version of:constructUSR_ObjCClass
static void
nclang_constructUSR_ObjCClass(long class_name, long __functionAddress, long __result)
Unsafe version of:constructUSR_ObjCClass
static void
nclang_constructUSR_ObjCIvar(long name, long classUSR, long __result)
Unsafe version of:constructUSR_ObjCIvar
static void
nclang_constructUSR_ObjCIvar(long name, long classUSR, long __functionAddress, long __result)
Unsafe version of:constructUSR_ObjCIvar
static void
nclang_constructUSR_ObjCMethod(long name, int isInstanceMethod, long classUSR, long __result)
Unsafe version of:constructUSR_ObjCMethod
static void
nclang_constructUSR_ObjCMethod(long name, int isInstanceMethod, long classUSR, long __functionAddress, long __result)
Unsafe version of:constructUSR_ObjCMethod
static void
nclang_constructUSR_ObjCProperty(long property, long classUSR, long __result)
Unsafe version of:constructUSR_ObjCProperty
static void
nclang_constructUSR_ObjCProperty(long property, long classUSR, long __functionAddress, long __result)
Unsafe version of:constructUSR_ObjCProperty
static void
nclang_constructUSR_ObjCProtocol(long protocol_name, long __result)
Unsafe version of:constructUSR_ObjCProtocol
static void
nclang_constructUSR_ObjCProtocol(long protocol_name, long __functionAddress, long __result)
Unsafe version of:constructUSR_ObjCProtocol
static long
nclang_createTranslationUnit(long CIdx, long ast_filename)
Unsafe version of:createTranslationUnit
static int
nclang_createTranslationUnit2(long CIdx, long ast_filename, long out_TU)
Unsafe version of:createTranslationUnit2
static long
nclang_createTranslationUnitFromSourceFile(long CIdx, long source_filename, int num_clang_command_line_args, long clang_command_line_args, int num_unsaved_files, long unsaved_files)
Unsafe version of:createTranslationUnitFromSourceFile
static long
nclang_Cursor_Evaluate(long C)
Unsafe version of:Cursor_Evaluate
static long
nclang_Cursor_Evaluate(long C, long __functionAddress)
Unsafe version of:Cursor_Evaluate
static void
nclang_Cursor_getArgument(long C, int i, long __result)
Unsafe version of:Cursor_getArgument
static void
nclang_Cursor_getArgument(long C, int i, long __functionAddress, long __result)
Unsafe version of:Cursor_getArgument
static void
nclang_Cursor_getBriefCommentText(long C, long __result)
Unsafe version of:Cursor_getBriefCommentText
static void
nclang_Cursor_getBriefCommentText(long C, long __functionAddress, long __result)
Unsafe version of:Cursor_getBriefCommentText
static void
nclang_Cursor_getCommentRange(long C, long __result)
Unsafe version of:Cursor_getCommentRange
static void
nclang_Cursor_getCommentRange(long C, long __functionAddress, long __result)
Unsafe version of:Cursor_getCommentRange
static long
nclang_Cursor_getCXXManglings(long cursor)
Unsafe version of:Cursor_getCXXManglings
static long
nclang_Cursor_getCXXManglings(long cursor, long __functionAddress)
Unsafe version of:Cursor_getCXXManglings
static void
nclang_Cursor_getMangling(long cursor, long __result)
Unsafe version of:Cursor_getMangling
static void
nclang_Cursor_getMangling(long cursor, long __functionAddress, long __result)
Unsafe version of:Cursor_getMangling
static long
nclang_Cursor_getModule(long C)
Unsafe version of:Cursor_getModule
static long
nclang_Cursor_getModule(long C, long __functionAddress)
Unsafe version of:Cursor_getModule
static int
nclang_Cursor_getNumArguments(long C)
Unsafe version of:Cursor_getNumArguments
static int
nclang_Cursor_getNumArguments(long C, long __functionAddress)
Unsafe version of:Cursor_getNumArguments
static int
nclang_Cursor_getNumTemplateArguments(long C)
Unsafe version of:Cursor_getNumTemplateArguments
static int
nclang_Cursor_getNumTemplateArguments(long C, long __functionAddress)
Unsafe version of:Cursor_getNumTemplateArguments
static int
nclang_Cursor_getObjCDeclQualifiers(long C)
Unsafe version of:Cursor_getObjCDeclQualifiers
static int
nclang_Cursor_getObjCDeclQualifiers(long C, long __functionAddress)
Unsafe version of:Cursor_getObjCDeclQualifiers
static long
nclang_Cursor_getObjCManglings(long cursor)
Unsafe version of:Cursor_getObjCManglings
static long
nclang_Cursor_getObjCManglings(long cursor, long __functionAddress)
Unsafe version of:Cursor_getObjCManglings
static int
nclang_Cursor_getObjCPropertyAttributes(long C, int reserved)
Unsafe version of:Cursor_getObjCPropertyAttributes
static int
nclang_Cursor_getObjCPropertyAttributes(long C, int reserved, long __functionAddress)
Unsafe version of:Cursor_getObjCPropertyAttributes
static void
nclang_Cursor_getObjCPropertyGetterName(long C, long __result)
Unsafe version of:Cursor_getObjCPropertyGetterName
static void
nclang_Cursor_getObjCPropertyGetterName(long C, long __functionAddress, long __result)
Unsafe version of:Cursor_getObjCPropertyGetterName
static void
nclang_Cursor_getObjCPropertySetterName(long C, long __result)
Unsafe version of:Cursor_getObjCPropertySetterName
static void
nclang_Cursor_getObjCPropertySetterName(long C, long __functionAddress, long __result)
Unsafe version of:Cursor_getObjCPropertySetterName
static int
nclang_Cursor_getObjCSelectorIndex(long cursor)
Unsafe version of:Cursor_getObjCSelectorIndex
static int
nclang_Cursor_getObjCSelectorIndex(long cursor, long __functionAddress)
Unsafe version of:Cursor_getObjCSelectorIndex
static long
nclang_Cursor_getOffsetOfField(long C)
Unsafe version of:Cursor_getOffsetOfField
static long
nclang_Cursor_getOffsetOfField(long C, long __functionAddress)
Unsafe version of:Cursor_getOffsetOfField
static void
nclang_Cursor_getRawCommentText(long C, long __result)
Unsafe version of:Cursor_getRawCommentText
static void
nclang_Cursor_getRawCommentText(long C, long __functionAddress, long __result)
Unsafe version of:Cursor_getRawCommentText
static void
nclang_Cursor_getReceiverType(long C, long __result)
Unsafe version of:Cursor_getReceiverType
static void
nclang_Cursor_getReceiverType(long C, long __functionAddress, long __result)
Unsafe version of:Cursor_getReceiverType
static void
nclang_Cursor_getSpellingNameRange(long cursor, int pieceIndex, int options, long __result)
Unsafe version of:Cursor_getSpellingNameRange
static void
nclang_Cursor_getSpellingNameRange(long cursor, int pieceIndex, int options, long __functionAddress, long __result)
Unsafe version of:Cursor_getSpellingNameRange
static int
nclang_Cursor_getStorageClass(long cursor)
Unsafe version of:Cursor_getStorageClass
static int
nclang_Cursor_getStorageClass(long cursor, long __functionAddress)
Unsafe version of:Cursor_getStorageClass
static int
nclang_Cursor_getTemplateArgumentKind(long C, int I)
Unsafe version of:Cursor_getTemplateArgumentKind
static int
nclang_Cursor_getTemplateArgumentKind(long C, int I, long __functionAddress)
Unsafe version of:Cursor_getTemplateArgumentKind
static void
nclang_Cursor_getTemplateArgumentType(long C, int I, long __result)
Unsafe version of:Cursor_getTemplateArgumentType
static void
nclang_Cursor_getTemplateArgumentType(long C, int I, long __functionAddress, long __result)
Unsafe version of:Cursor_getTemplateArgumentType
static long
nclang_Cursor_getTemplateArgumentUnsignedValue(long C, int I)
Unsafe version of:Cursor_getTemplateArgumentUnsignedValue
static long
nclang_Cursor_getTemplateArgumentUnsignedValue(long C, int I, long __functionAddress)
Unsafe version of:Cursor_getTemplateArgumentUnsignedValue
static long
nclang_Cursor_getTemplateArgumentValue(long C, int I)
Unsafe version of:Cursor_getTemplateArgumentValue
static long
nclang_Cursor_getTemplateArgumentValue(long C, int I, long __functionAddress)
Unsafe version of:Cursor_getTemplateArgumentValue
static long
nclang_Cursor_getTranslationUnit(long cursor)
Unsafe version of:Cursor_getTranslationUnit
static long
nclang_Cursor_getTranslationUnit(long cursor, long __functionAddress)
Unsafe version of:Cursor_getTranslationUnit
static int
nclang_Cursor_hasAttrs(long C)
Unsafe version of:Cursor_hasAttrs
static int
nclang_Cursor_hasAttrs(long C, long __functionAddress)
Unsafe version of:Cursor_hasAttrs
static int
nclang_Cursor_isAnonymous(long C)
Unsafe version of:Cursor_isAnonymous
static int
nclang_Cursor_isAnonymous(long C, long __functionAddress)
Unsafe version of:Cursor_isAnonymous
static int
nclang_Cursor_isBitField(long C)
Unsafe version of:Cursor_isBitField
static int
nclang_Cursor_isBitField(long C, long __functionAddress)
Unsafe version of:Cursor_isBitField
static int
nclang_Cursor_isDynamicCall(long C)
Unsafe version of:Cursor_isDynamicCall
static int
nclang_Cursor_isDynamicCall(long C, long __functionAddress)
Unsafe version of:Cursor_isDynamicCall
static int
nclang_Cursor_isExternalSymbol(long C, long language, long definedIn, long isGenerated)
Unsafe version of:Cursor_isExternalSymbol
static int
nclang_Cursor_isExternalSymbol(long C, long language, long definedIn, long isGenerated, long __functionAddress)
Unsafe version of:Cursor_isExternalSymbol
static int
nclang_Cursor_isFunctionInlined(long C)
Unsafe version of:Cursor_isFunctionInlined
static int
nclang_Cursor_isFunctionInlined(long C, long __functionAddress)
Unsafe version of:Cursor_isFunctionInlined
static int
nclang_Cursor_isMacroBuiltin(long C)
Unsafe version of:Cursor_isMacroBuiltin
static int
nclang_Cursor_isMacroBuiltin(long C, long __functionAddress)
Unsafe version of:Cursor_isMacroBuiltin
static int
nclang_Cursor_isMacroFunctionLike(long C)
Unsafe version of:Cursor_isMacroFunctionLike
static int
nclang_Cursor_isMacroFunctionLike(long C, long __functionAddress)
Unsafe version of:Cursor_isMacroFunctionLike
static int
nclang_Cursor_isNull(long cursor)
Unsafe version of:Cursor_isNull
static int
nclang_Cursor_isNull(long cursor, long __functionAddress)
Unsafe version of:Cursor_isNull
static int
nclang_Cursor_isObjCOptional(long C)
Unsafe version of:Cursor_isObjCOptional
static int
nclang_Cursor_isObjCOptional(long C, long __functionAddress)
Unsafe version of:Cursor_isObjCOptional
static int
nclang_Cursor_isVariadic(long C)
Unsafe version of:Cursor_isVariadic
static int
nclang_Cursor_isVariadic(long C, long __functionAddress)
Unsafe version of:Cursor_isVariadic
static int
nclang_CXCursorSet_contains(long cset, long cursor)
Unsafe version of:CXCursorSet_contains
static int
nclang_CXCursorSet_contains(long cset, long cursor, long __functionAddress)
Unsafe version of:CXCursorSet_contains
static int
nclang_CXCursorSet_insert(long cset, long cursor)
Unsafe version of:CXCursorSet_insert
static int
nclang_CXCursorSet_insert(long cset, long cursor, long __functionAddress)
Unsafe version of:CXCursorSet_insert
static void
nclang_CXIndex_setInvocationEmissionPathOption(long index, long Path)
Unsafe version of:CXIndex_setInvocationEmissionPathOption
static int
nclang_CXXConstructor_isConvertingConstructor(long C)
Unsafe version of:CXXConstructor_isConvertingConstructor
static int
nclang_CXXConstructor_isConvertingConstructor(long C, long __functionAddress)
Unsafe version of:CXXConstructor_isConvertingConstructor
static int
nclang_CXXConstructor_isCopyConstructor(long C)
Unsafe version of:CXXConstructor_isCopyConstructor
static int
nclang_CXXConstructor_isCopyConstructor(long C, long __functionAddress)
Unsafe version of:CXXConstructor_isCopyConstructor
static int
nclang_CXXConstructor_isDefaultConstructor(long C)
Unsafe version of:CXXConstructor_isDefaultConstructor
static int
nclang_CXXConstructor_isDefaultConstructor(long C, long __functionAddress)
Unsafe version of:CXXConstructor_isDefaultConstructor
static int
nclang_CXXConstructor_isMoveConstructor(long C)
Unsafe version of:CXXConstructor_isMoveConstructor
static int
nclang_CXXConstructor_isMoveConstructor(long C, long __functionAddress)
Unsafe version of:CXXConstructor_isMoveConstructor
static int
nclang_CXXField_isMutable(long C)
Unsafe version of:CXXField_isMutable
static int
nclang_CXXField_isMutable(long C, long __functionAddress)
Unsafe version of:CXXField_isMutable
static int
nclang_CXXMethod_isConst(long C)
Unsafe version of:CXXMethod_isConst
static int
nclang_CXXMethod_isConst(long C, long __functionAddress)
Unsafe version of:CXXMethod_isConst
static int
nclang_CXXMethod_isDefaulted(long C)
Unsafe version of:CXXMethod_isDefaulted
static int
nclang_CXXMethod_isDefaulted(long C, long __functionAddress)
Unsafe version of:CXXMethod_isDefaulted
static int
nclang_CXXMethod_isPureVirtual(long C)
Unsafe version of:CXXMethod_isPureVirtual
static int
nclang_CXXMethod_isPureVirtual(long C, long __functionAddress)
Unsafe version of:CXXMethod_isPureVirtual
static int
nclang_CXXMethod_isStatic(long C)
Unsafe version of:CXXMethod_isStatic
static int
nclang_CXXMethod_isStatic(long C, long __functionAddress)
Unsafe version of:CXXMethod_isStatic
static int
nclang_CXXMethod_isVirtual(long C)
Unsafe version of:CXXMethod_isVirtual
static int
nclang_CXXMethod_isVirtual(long C, long __functionAddress)
Unsafe version of:CXXMethod_isVirtual
static int
nclang_CXXRecord_isAbstract(long C)
Unsafe version of:CXXRecord_isAbstract
static int
nclang_CXXRecord_isAbstract(long C, long __functionAddress)
Unsafe version of:CXXRecord_isAbstract
static void
nclang_disposeCodeCompleteResults(long Results)
Unsafe version of:disposeCodeCompleteResults
static void
nclang_disposeCXPlatformAvailability(long availability)
Unsafe version of:disposeCXPlatformAvailability
static void
nclang_disposeCXTUResourceUsage(long usage)
static void
nclang_disposeCXTUResourceUsage(long usage, long __functionAddress)
static void
nclang_disposeOverriddenCursors(long overridden)
Unsafe version of:disposeOverriddenCursors
static void
nclang_disposeSourceRangeList(long ranges)
Unsafe version of:disposeSourceRangeList
static void
nclang_disposeString(long string)
Unsafe version of:disposeString
static void
nclang_disposeString(long string, long __functionAddress)
Unsafe version of:disposeString
static void
nclang_disposeStringSet(long set)
Unsafe version of:disposeStringSet
static void
nclang_disposeTokens(long TU, long Tokens, int NumTokens)
Unsafe version of:disposeTokens
static int
nclang_EnumDecl_isScoped(long C)
Unsafe version of:EnumDecl_isScoped
static int
nclang_EnumDecl_isScoped(long C, long __functionAddress)
Unsafe version of:EnumDecl_isScoped
static int
nclang_equalCursors(long A, long B)
Unsafe version of:equalCursors
static int
nclang_equalCursors(long A, long B, long __functionAddress)
Unsafe version of:equalCursors
static int
nclang_equalLocations(long loc1, long loc2)
Unsafe version of:equalLocations
static int
nclang_equalLocations(long loc1, long loc2, long __functionAddress)
Unsafe version of:equalLocations
static int
nclang_equalRanges(long range1, long range2)
Unsafe version of:equalRanges
static int
nclang_equalRanges(long range1, long range2, long __functionAddress)
Unsafe version of:equalRanges
static int
nclang_equalTypes(long A, long B)
Unsafe version of:equalTypes
static int
nclang_equalTypes(long A, long B, long __functionAddress)
Unsafe version of:equalTypes
static long
nclang_EvalResult_getAsStr(long E)
Unsafe version of:EvalResult_getAsStr
static void
nclang_executeOnThread(long fn, long user_data, int stack_size)
static void
nclang_File_tryGetRealPathName(long file, long __result)
Unsafe version of:File_tryGetRealPathName
static void
nclang_File_tryGetRealPathName(long file, long __functionAddress, long __result)
Unsafe version of:File_tryGetRealPathName
static int
nclang_findIncludesInFile(long TU, long file, long visitor)
Unsafe version of:findIncludesInFile
static int
nclang_findIncludesInFile(long TU, long file, long visitor, long __functionAddress)
Unsafe version of:findIncludesInFile
static int
nclang_findReferencesInFile(long cursor, long file, long visitor)
Unsafe version of:findReferencesInFile
static int
nclang_findReferencesInFile(long cursor, long file, long visitor, long __functionAddress)
Unsafe version of:findReferencesInFile
static void
nclang_formatDiagnostic(long Diagnostic, int Options, long __result)
Unsafe version of:formatDiagnostic
static void
nclang_formatDiagnostic(long Diagnostic, int Options, long __functionAddress, long __result)
Unsafe version of:formatDiagnostic
static int
nclang_getAddressSpace(long T)
Unsafe version of:getAddressSpace
static int
nclang_getAddressSpace(long T, long __functionAddress)
Unsafe version of:getAddressSpace
static long
nclang_getAllSkippedRanges(long tu)
Unsafe version of:getAllSkippedRanges
static void
nclang_getArgType(long T, int i, long __result)
Unsafe version of:getArgType
static void
nclang_getArgType(long T, int i, long __functionAddress, long __result)
Unsafe version of:getArgType
static void
nclang_getArrayElementType(long T, long __result)
Unsafe version of:getArrayElementType
static void
nclang_getArrayElementType(long T, long __functionAddress, long __result)
Unsafe version of:getArrayElementType
static long
nclang_getArraySize(long T)
Unsafe version of:getArraySize
static long
nclang_getArraySize(long T, long __functionAddress)
Unsafe version of:getArraySize
static void
nclang_getCanonicalCursor(long cursor, long __result)
Unsafe version of:getCanonicalCursor
static void
nclang_getCanonicalCursor(long cursor, long __functionAddress, long __result)
Unsafe version of:getCanonicalCursor
static void
nclang_getCanonicalType(long T, long __result)
Unsafe version of:getCanonicalType
static void
nclang_getCanonicalType(long T, long __functionAddress, long __result)
Unsafe version of:getCanonicalType
static void
nclang_getClangVersion(long __result)
Unsafe version of:getClangVersion
static void
nclang_getClangVersion(long __functionAddress, long __result)
Unsafe version of:getClangVersion
static void
nclang_getCompletionAnnotation(long completion_string, int annotation_number, long __result)
Unsafe version of:getCompletionAnnotation
static void
nclang_getCompletionAnnotation(long completion_string, int annotation_number, long __functionAddress, long __result)
Unsafe version of:getCompletionAnnotation
static void
nclang_getCompletionBriefComment(long completion_string, long __result)
Unsafe version of:getCompletionBriefComment
static void
nclang_getCompletionBriefComment(long completion_string, long __functionAddress, long __result)
Unsafe version of:getCompletionBriefComment
static void
nclang_getCompletionChunkText(long completion_string, int chunk_number, long __result)
Unsafe version of:getCompletionChunkText
static void
nclang_getCompletionChunkText(long completion_string, int chunk_number, long __functionAddress, long __result)
Unsafe version of:getCompletionChunkText
static void
nclang_getCompletionFixIt(long results, int completion_index, int fixit_index, long replacement_range, long __result)
Unsafe version of:getCompletionFixIt
static void
nclang_getCompletionFixIt(long results, int completion_index, int fixit_index, long replacement_range, long __functionAddress, long __result)
Unsafe version of:getCompletionFixIt
static int
nclang_getCompletionNumFixIts(long results, int completion_index)
Unsafe version of:getCompletionNumFixIts
static void
nclang_getCompletionParent(long completion_string, long kind, long __result)
Unsafe version of:getCompletionParent
static void
nclang_getCompletionParent(long completion_string, long kind, long __functionAddress, long __result)
Unsafe version of:getCompletionParent
static long
nclang_getCString(long string)
Unsafe version of:getCString
static long
nclang_getCString(long string, long __functionAddress)
Unsafe version of:getCString
static void
nclang_getCursor(long TU, long location, long __result)
Unsafe version of:getCursor
static void
nclang_getCursor(long TU, long location, long __functionAddress, long __result)
Unsafe version of:getCursor
static int
nclang_getCursorAvailability(long cursor)
Unsafe version of:getCursorAvailability
static int
nclang_getCursorAvailability(long cursor, long __functionAddress)
Unsafe version of:getCursorAvailability
static long
nclang_getCursorCompletionString(long cursor)
Unsafe version of:getCursorCompletionString
static long
nclang_getCursorCompletionString(long cursor, long __functionAddress)
Unsafe version of:getCursorCompletionString
static void
nclang_getCursorDefinition(long cursor, long __result)
Unsafe version of:getCursorDefinition
static void
nclang_getCursorDefinition(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorDefinition
static void
nclang_getCursorDisplayName(long cursor, long __result)
Unsafe version of:getCursorDisplayName
static void
nclang_getCursorDisplayName(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorDisplayName
static int
nclang_getCursorExceptionSpecificationType(long C)
Unsafe version of:getCursorExceptionSpecificationType
static int
nclang_getCursorExceptionSpecificationType(long C, long __functionAddress)
Unsafe version of:getCursorExceptionSpecificationType
static void
nclang_getCursorExtent(long cursor, long __result)
Unsafe version of:getCursorExtent
static void
nclang_getCursorExtent(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorExtent
static int
nclang_getCursorKind(long cursor)
Unsafe version of:getCursorKind
static int
nclang_getCursorKind(long cursor, long __functionAddress)
Unsafe version of:getCursorKind
static void
nclang_getCursorKindSpelling(int Kind, long __result)
static void
nclang_getCursorKindSpelling(int Kind, long __functionAddress, long __result)
static int
nclang_getCursorLanguage(long cursor)
Unsafe version of:getCursorLanguage
static int
nclang_getCursorLanguage(long cursor, long __functionAddress)
Unsafe version of:getCursorLanguage
static void
nclang_getCursorLexicalParent(long cursor, long __result)
Unsafe version of:getCursorLexicalParent
static void
nclang_getCursorLexicalParent(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorLexicalParent
static int
nclang_getCursorLinkage(long cursor)
Unsafe version of:getCursorLinkage
static int
nclang_getCursorLinkage(long cursor, long __functionAddress)
Unsafe version of:getCursorLinkage
static void
nclang_getCursorLocation(long cursor, long __result)
Unsafe version of:getCursorLocation
static void
nclang_getCursorLocation(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorLocation
static int
nclang_getCursorPlatformAvailability(long cursor, long always_deprecated, long deprecated_message, long always_unavailable, long unavailable_message, long availability, int availability_size)
Unsafe version of:getCursorPlatformAvailability
static int
nclang_getCursorPlatformAvailability(long cursor, long always_deprecated, long deprecated_message, long always_unavailable, long unavailable_message, long availability, int availability_size, long __functionAddress)
Unsafe version of:getCursorPlatformAvailability
static void
nclang_getCursorPrettyPrinted(long Cursor, long Policy, long __result)
Unsafe version of:getCursorPrettyPrinted
static void
nclang_getCursorPrettyPrinted(long Cursor, long Policy, long __functionAddress, long __result)
Unsafe version of:getCursorPrettyPrinted
static long
nclang_getCursorPrintingPolicy(long cursor)
Unsafe version of:getCursorPrintingPolicy
static long
nclang_getCursorPrintingPolicy(long cursor, long __functionAddress)
Unsafe version of:getCursorPrintingPolicy
static void
nclang_getCursorReferenced(long cursor, long __result)
Unsafe version of:getCursorReferenced
static void
nclang_getCursorReferenced(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorReferenced
static void
nclang_getCursorReferenceNameRange(long C, int NameFlags, int PieceIndex, long __result)
Unsafe version of:getCursorReferenceNameRange
static void
nclang_getCursorReferenceNameRange(long C, int NameFlags, int PieceIndex, long __functionAddress, long __result)
Unsafe version of:getCursorReferenceNameRange
static void
nclang_getCursorResultType(long C, long __result)
Unsafe version of:getCursorResultType
static void
nclang_getCursorResultType(long C, long __functionAddress, long __result)
Unsafe version of:getCursorResultType
static void
nclang_getCursorSemanticParent(long cursor, long __result)
Unsafe version of:getCursorSemanticParent
static void
nclang_getCursorSemanticParent(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorSemanticParent
static void
nclang_getCursorSpelling(long cursor, long __result)
Unsafe version of:getCursorSpelling
static void
nclang_getCursorSpelling(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorSpelling
static int
nclang_getCursorTLSKind(long cursor)
Unsafe version of:getCursorTLSKind
static int
nclang_getCursorTLSKind(long cursor, long __functionAddress)
Unsafe version of:getCursorTLSKind
static void
nclang_getCursorType(long C, long __result)
Unsafe version of:getCursorType
static void
nclang_getCursorType(long C, long __functionAddress, long __result)
Unsafe version of:getCursorType
static void
nclang_getCursorUSR(long cursor, long __result)
Unsafe version of:getCursorUSR
static void
nclang_getCursorUSR(long cursor, long __functionAddress, long __result)
Unsafe version of:getCursorUSR
static int
nclang_getCursorVisibility(long cursor)
Unsafe version of:getCursorVisibility
static int
nclang_getCursorVisibility(long cursor, long __functionAddress)
Unsafe version of:getCursorVisibility
static void
nclang_getCXTUResourceUsage(long TU, long __result)
Unsafe version of:getCXTUResourceUsage
static void
nclang_getCXTUResourceUsage(long TU, long __functionAddress, long __result)
Unsafe version of:getCXTUResourceUsage
static int
nclang_getCXXAccessSpecifier(long cursor)
Unsafe version of:getCXXAccessSpecifier
static int
nclang_getCXXAccessSpecifier(long cursor, long __functionAddress)
Unsafe version of:getCXXAccessSpecifier
static void
nclang_getDeclObjCTypeEncoding(long C, long __result)
Unsafe version of:getDeclObjCTypeEncoding
static void
nclang_getDeclObjCTypeEncoding(long C, long __functionAddress, long __result)
Unsafe version of:getDeclObjCTypeEncoding
static void
nclang_getDefinitionSpellingAndExtent(long cursor, long startBuf, long endBuf, long startLine, long startColumn, long endLine, long endColumn)
static void
nclang_getDefinitionSpellingAndExtent(long cursor, long startBuf, long endBuf, long startLine, long startColumn, long endLine, long endColumn, long __functionAddress)
static void
nclang_getDiagnosticCategoryText(long Diagnostic, long __result)
Unsafe version of:getDiagnosticCategoryText
static void
nclang_getDiagnosticCategoryText(long Diagnostic, long __functionAddress, long __result)
Unsafe version of:getDiagnosticCategoryText
static void
nclang_getDiagnosticFixIt(long Diagnostic, int FixIt, long ReplacementRange, long __result)
Unsafe version of:getDiagnosticFixIt
static void
nclang_getDiagnosticFixIt(long Diagnostic, int FixIt, long ReplacementRange, long __functionAddress, long __result)
Unsafe version of:getDiagnosticFixIt
static void
nclang_getDiagnosticLocation(long Diagnostic, long __result)
Unsafe version of:getDiagnosticLocation
static void
nclang_getDiagnosticLocation(long Diagnostic, long __functionAddress, long __result)
Unsafe version of:getDiagnosticLocation
static void
nclang_getDiagnosticOption(long Diag, long Disable, long __result)
Unsafe version of:getDiagnosticOption
static void
nclang_getDiagnosticOption(long Diag, long Disable, long __functionAddress, long __result)
Unsafe version of:getDiagnosticOption
static void
nclang_getDiagnosticRange(long Diagnostic, int Range, long __result)
Unsafe version of:getDiagnosticRange
static void
nclang_getDiagnosticRange(long Diagnostic, int Range, long __functionAddress, long __result)
Unsafe version of:getDiagnosticRange
static void
nclang_getDiagnosticSpelling(long Diagnostic, long __result)
Unsafe version of:getDiagnosticSpelling
static void
nclang_getDiagnosticSpelling(long Diagnostic, long __functionAddress, long __result)
Unsafe version of:getDiagnosticSpelling
static void
nclang_getElementType(long T, long __result)
Unsafe version of:getElementType
static void
nclang_getElementType(long T, long __functionAddress, long __result)
Unsafe version of:getElementType
static long
nclang_getEnumConstantDeclUnsignedValue(long C)
Unsafe version of:getEnumConstantDeclUnsignedValue
static long
nclang_getEnumConstantDeclUnsignedValue(long C, long __functionAddress)
Unsafe version of:getEnumConstantDeclUnsignedValue
static long
nclang_getEnumConstantDeclValue(long C)
Unsafe version of:getEnumConstantDeclValue
static long
nclang_getEnumConstantDeclValue(long C, long __functionAddress)
Unsafe version of:getEnumConstantDeclValue
static void
nclang_getEnumDeclIntegerType(long C, long __result)
Unsafe version of:getEnumDeclIntegerType
static void
nclang_getEnumDeclIntegerType(long C, long __functionAddress, long __result)
Unsafe version of:getEnumDeclIntegerType
static int
nclang_getExceptionSpecificationType(long T)
Unsafe version of:getExceptionSpecificationType
static int
nclang_getExceptionSpecificationType(long T, long __functionAddress)
Unsafe version of:getExceptionSpecificationType
static void
nclang_getExpansionLocation(long location, long file, long line, long column, long offset)
Unsafe version of:getExpansionLocation
static void
nclang_getExpansionLocation(long location, long file, long line, long column, long offset, long __functionAddress)
Unsafe version of:getExpansionLocation
static int
nclang_getFieldDeclBitWidth(long C)
Unsafe version of:getFieldDeclBitWidth
static int
nclang_getFieldDeclBitWidth(long C, long __functionAddress)
Unsafe version of:getFieldDeclBitWidth
static long
nclang_getFile(long tu, long file_name)
Unsafe version of:getFile
static long
nclang_getFileContents(long tu, long file, long size)
Unsafe version of:getFileContents
static void
nclang_getFileLocation(long location, long file, long line, long column, long offset)
Unsafe version of:getFileLocation
static void
nclang_getFileLocation(long location, long file, long line, long column, long offset, long __functionAddress)
Unsafe version of:getFileLocation
static void
nclang_getFileName(long SFile, long __result)
Unsafe version of:getFileName
static void
nclang_getFileName(long SFile, long __functionAddress, long __result)
Unsafe version of:getFileName
static int
nclang_getFileUniqueID(long file, long outID)
Unsafe version of:getFileUniqueID
static int
nclang_getFunctionTypeCallingConv(long T)
Unsafe version of:getFunctionTypeCallingConv
static int
nclang_getFunctionTypeCallingConv(long T, long __functionAddress)
Unsafe version of:getFunctionTypeCallingConv
static void
nclang_getIBOutletCollectionType(long cursor, long __result)
Unsafe version of:getIBOutletCollectionType
static void
nclang_getIBOutletCollectionType(long cursor, long __functionAddress, long __result)
Unsafe version of:getIBOutletCollectionType
static long
nclang_getIncludedFile(long cursor)
Unsafe version of:getIncludedFile
static long
nclang_getIncludedFile(long cursor, long __functionAddress)
Unsafe version of:getIncludedFile
static void
nclang_getInclusions(long tu, long visitor, long client_data)
Unsafe version of:getInclusions
static void
nclang_getLocation(long tu, long file, int line, int column, long __result)
Unsafe version of:getLocation
static void
nclang_getLocation(long tu, long file, int line, int column, long __functionAddress, long __result)
Unsafe version of:getLocation
static void
nclang_getLocationForOffset(long tu, long file, int offset, long __result)
Unsafe version of:getLocationForOffset
static void
nclang_getLocationForOffset(long tu, long file, int offset, long __functionAddress, long __result)
Unsafe version of:getLocationForOffset
static void
nclang_getNullCursor(long __result)
Unsafe version of:getNullCursor
static void
nclang_getNullCursor(long __functionAddress, long __result)
Unsafe version of:getNullCursor
static void
nclang_getNullLocation(long __result)
Unsafe version of:getNullLocation
static void
nclang_getNullLocation(long __functionAddress, long __result)
Unsafe version of:getNullLocation
static void
nclang_getNullRange(long __result)
Unsafe version of:getNullRange
static void
nclang_getNullRange(long __functionAddress, long __result)
Unsafe version of:getNullRange
static int
nclang_getNumArgTypes(long T)
Unsafe version of:getNumArgTypes
static int
nclang_getNumArgTypes(long T, long __functionAddress)
Unsafe version of:getNumArgTypes
static long
nclang_getNumElements(long T)
Unsafe version of:getNumElements
static long
nclang_getNumElements(long T, long __functionAddress)
Unsafe version of:getNumElements
static int
nclang_getNumOverloadedDecls(long cursor)
Unsafe version of:getNumOverloadedDecls
static int
nclang_getNumOverloadedDecls(long cursor, long __functionAddress)
Unsafe version of:getNumOverloadedDecls
static void
nclang_getOverloadedDecl(long cursor, int index, long __result)
Unsafe version of:getOverloadedDecl
static void
nclang_getOverloadedDecl(long cursor, int index, long __functionAddress, long __result)
Unsafe version of:getOverloadedDecl
static void
nclang_getOverriddenCursors(long cursor, long overridden, long num_overridden)
Unsafe version of:getOverriddenCursors
static void
nclang_getOverriddenCursors(long cursor, long overridden, long num_overridden, long __functionAddress)
Unsafe version of:getOverriddenCursors
static void
nclang_getPointeeType(long T, long __result)
Unsafe version of:getPointeeType
static void
nclang_getPointeeType(long T, long __functionAddress, long __result)
Unsafe version of:getPointeeType
static void
nclang_getPresumedLocation(long location, long filename, long line, long column)
Unsafe version of:getPresumedLocation
static void
nclang_getPresumedLocation(long location, long filename, long line, long column, long __functionAddress)
Unsafe version of:getPresumedLocation
static void
nclang_getRange(long begin, long end, long __result)
Unsafe version of:getRange
static void
nclang_getRange(long begin, long end, long __functionAddress, long __result)
Unsafe version of:getRange
static void
nclang_getRangeEnd(long range, long __result)
Unsafe version of:getRangeEnd
static void
nclang_getRangeEnd(long range, long __functionAddress, long __result)
Unsafe version of:getRangeEnd
static void
nclang_getRangeStart(long range, long __result)
Unsafe version of:getRangeStart
static void
nclang_getRangeStart(long range, long __functionAddress, long __result)
Unsafe version of:getRangeStart
static long
nclang_getRemappings(long path)
Unsafe version of:getRemappings
static long
nclang_getRemappingsFromFileList(long filePaths, int numFiles)
Unsafe version of:getRemappingsFromFileList
static void
nclang_getResultType(long T, long __result)
Unsafe version of:getResultType
static void
nclang_getResultType(long T, long __functionAddress, long __result)
Unsafe version of:getResultType
static long
nclang_getSkippedRanges(long tu, long file)
Unsafe version of:getSkippedRanges
static void
nclang_getSpecializedCursorTemplate(long C, long __result)
Unsafe version of:getSpecializedCursorTemplate
static void
nclang_getSpecializedCursorTemplate(long C, long __functionAddress, long __result)
Unsafe version of:getSpecializedCursorTemplate
static void
nclang_getSpellingLocation(long location, long file, long line, long column, long offset)
Unsafe version of:getSpellingLocation
static void
nclang_getSpellingLocation(long location, long file, long line, long column, long offset, long __functionAddress)
Unsafe version of:getSpellingLocation
static int
nclang_getTemplateCursorKind(long C)
Unsafe version of:getTemplateCursorKind
static int
nclang_getTemplateCursorKind(long C, long __functionAddress)
Unsafe version of:getTemplateCursorKind
static long
nclang_getToken(long TU, long Location)
Unsafe version of:getToken
static long
nclang_getToken(long TU, long Location, long __functionAddress)
Unsafe version of:getToken
static void
nclang_getTokenExtent(long TU, long token, long __result)
Unsafe version of:getTokenExtent
static void
nclang_getTokenExtent(long TU, long token, long __functionAddress, long __result)
Unsafe version of:getTokenExtent
static int
nclang_getTokenKind(long token)
Unsafe version of:getTokenKind
static int
nclang_getTokenKind(long token, long __functionAddress)
Unsafe version of:getTokenKind
static void
nclang_getTokenLocation(long TU, long token, long __result)
Unsafe version of:getTokenLocation
static void
nclang_getTokenLocation(long TU, long token, long __functionAddress, long __result)
Unsafe version of:getTokenLocation
static void
nclang_getTokenSpelling(long TU, long token, long __result)
Unsafe version of:getTokenSpelling
static void
nclang_getTokenSpelling(long TU, long token, long __functionAddress, long __result)
Unsafe version of:getTokenSpelling
static void
nclang_getTranslationUnitCursor(long TU, long __result)
Unsafe version of:getTranslationUnitCursor
static void
nclang_getTranslationUnitCursor(long TU, long __functionAddress, long __result)
Unsafe version of:getTranslationUnitCursor
static void
nclang_getTranslationUnitSpelling(long CTUnit, long __result)
Unsafe version of:getTranslationUnitSpelling
static void
nclang_getTranslationUnitSpelling(long CTUnit, long __functionAddress, long __result)
Unsafe version of:getTranslationUnitSpelling
static long
nclang_getTUResourceUsageName(int kind)
Unsafe version of:getTUResourceUsageName
static void
nclang_getTypeDeclaration(long T, long __result)
Unsafe version of:getTypeDeclaration
static void
nclang_getTypeDeclaration(long T, long __functionAddress, long __result)
Unsafe version of:getTypeDeclaration
static void
nclang_getTypedefDeclUnderlyingType(long C, long __result)
Unsafe version of:getTypedefDeclUnderlyingType
static void
nclang_getTypedefDeclUnderlyingType(long C, long __functionAddress, long __result)
Unsafe version of:getTypedefDeclUnderlyingType
static void
nclang_getTypedefName(long CT, long __result)
Unsafe version of:getTypedefName
static void
nclang_getTypedefName(long CT, long __functionAddress, long __result)
Unsafe version of:getTypedefName
static void
nclang_getTypeKindSpelling(int K, long __result)
Unsafe version of:getTypeKindSpelling
static void
nclang_getTypeKindSpelling(int K, long __functionAddress, long __result)
Unsafe version of:getTypeKindSpelling
static void
nclang_getTypeSpelling(long CT, long __result)
Unsafe version of:getTypeSpelling
static void
nclang_getTypeSpelling(long CT, long __functionAddress, long __result)
Unsafe version of:getTypeSpelling
static int
nclang_hashCursor(long cursor)
Unsafe version of:hashCursor
static int
nclang_hashCursor(long cursor, long __functionAddress)
Unsafe version of:hashCursor
static long
nclang_index_getClientContainer(long info)
Unsafe version of:index_getClientContainer
static long
nclang_index_getClientEntity(long info)
Unsafe version of:index_getClientEntity
static long
nclang_index_getCXXClassDeclInfo(long info)
static long
nclang_index_getIBOutletCollectionAttrInfo(long info)
static long
nclang_index_getObjCCategoryDeclInfo(long info)
static long
nclang_index_getObjCContainerDeclInfo(long info)
static long
nclang_index_getObjCInterfaceDeclInfo(long info)
static long
nclang_index_getObjCPropertyDeclInfo(long info)
static long
nclang_index_getObjCProtocolRefListInfo(long info)
static void
nclang_index_setClientContainer(long info, long container)
Unsafe version of:index_setClientContainer
static void
nclang_index_setClientEntity(long info, long entity)
Unsafe version of:index_setClientEntity
static void
nclang_indexLoc_getCXSourceLocation(long loc, long __result)
Unsafe version of:indexLoc_getCXSourceLocation
static void
nclang_indexLoc_getCXSourceLocation(long loc, long __functionAddress, long __result)
Unsafe version of:indexLoc_getCXSourceLocation
static void
nclang_indexLoc_getFileLocation(long loc, long indexFile, long file, long line, long column, long offset)
Unsafe version of:indexLoc_getFileLocation
static void
nclang_indexLoc_getFileLocation(long loc, long indexFile, long file, long line, long column, long offset, long __functionAddress)
Unsafe version of:indexLoc_getFileLocation
static int
nclang_indexSourceFile(long action, long client_data, long index_callbacks, int index_callbacks_size, int index_options, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, long out_TU, int TU_options)
Unsafe version of:indexSourceFile
static int
nclang_indexSourceFileFullArgv(long action, long client_data, long index_callbacks, int index_callbacks_size, int index_options, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, long out_TU, int TU_options)
Unsafe version of:indexSourceFileFullArgv
static int
nclang_indexTranslationUnit(long action, long client_data, long index_callbacks, int index_callbacks_size, int index_options, long TU)
Unsafe version of:indexTranslationUnit
static int
nclang_isConstQualifiedType(long T)
Unsafe version of:isConstQualifiedType
static int
nclang_isConstQualifiedType(long T, long __functionAddress)
Unsafe version of:isConstQualifiedType
static int
nclang_isCursorDefinition(long cursor)
Unsafe version of:isCursorDefinition
static int
nclang_isCursorDefinition(long cursor, long __functionAddress)
Unsafe version of:isCursorDefinition
static int
nclang_isFunctionTypeVariadic(long T)
Unsafe version of:isFunctionTypeVariadic
static int
nclang_isFunctionTypeVariadic(long T, long __functionAddress)
Unsafe version of:isFunctionTypeVariadic
static int
nclang_isInvalidDeclaration(long cursor)
Unsafe version of:isInvalidDeclaration
static int
nclang_isInvalidDeclaration(long cursor, long __functionAddress)
Unsafe version of:isInvalidDeclaration
static int
nclang_isPODType(long T)
Unsafe version of:isPODType
static int
nclang_isPODType(long T, long __functionAddress)
Unsafe version of:isPODType
static int
nclang_isRestrictQualifiedType(long T)
Unsafe version of:isRestrictQualifiedType
static int
nclang_isRestrictQualifiedType(long T, long __functionAddress)
Unsafe version of:isRestrictQualifiedType
static int
nclang_isVirtualBase(long cursor)
Unsafe version of:isVirtualBase
static int
nclang_isVirtualBase(long cursor, long __functionAddress)
Unsafe version of:isVirtualBase
static int
nclang_isVolatileQualifiedType(long T)
Unsafe version of:isVolatileQualifiedType
static int
nclang_isVolatileQualifiedType(long T, long __functionAddress)
Unsafe version of:isVolatileQualifiedType
static long
nclang_loadDiagnostics(long file, long error, long errorString)
Unsafe version of:loadDiagnostics
static int
nclang_Location_isFromMainFile(long location)
Unsafe version of:Location_isFromMainFile
static int
nclang_Location_isFromMainFile(long location, long __functionAddress)
Unsafe version of:Location_isFromMainFile
static int
nclang_Location_isInSystemHeader(long location)
Unsafe version of:Location_isInSystemHeader
static int
nclang_Location_isInSystemHeader(long location, long __functionAddress)
Unsafe version of:Location_isInSystemHeader
static void
nclang_Module_getFullName(long Module, long __result)
Unsafe version of:Module_getFullName
static void
nclang_Module_getFullName(long Module, long __functionAddress, long __result)
Unsafe version of:Module_getFullName
static void
nclang_Module_getName(long Module, long __result)
Unsafe version of:Module_getName
static void
nclang_Module_getName(long Module, long __functionAddress, long __result)
Unsafe version of:Module_getName
static long
nclang_parseTranslationUnit(long CIdx, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, int options)
Unsafe version of:parseTranslationUnit
static int
nclang_parseTranslationUnit2(long CIdx, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, int options, long out_TU)
Unsafe version of:parseTranslationUnit2
static int
nclang_parseTranslationUnit2FullArgv(long CIdx, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, int options, long out_TU)
Unsafe version of:parseTranslationUnit2FullArgv
static int
nclang_Range_isNull(long range)
Unsafe version of:Range_isNull
static int
nclang_Range_isNull(long range, long __functionAddress)
Unsafe version of:Range_isNull
static void
nclang_remap_getFilenames(long Remapping, int index, long original, long transformed)
Unsafe version of:remap_getFilenames
static int
nclang_reparseTranslationUnit(long TU, int num_unsaved_files, long unsaved_files, int options)
Unsafe version of:reparseTranslationUnit
static int
nclang_saveTranslationUnit(long TU, long FileName, int options)
Unsafe version of:saveTranslationUnit
static void
nclang_sortCodeCompletionResults(long Results, int NumResults)
Unsafe version of:sortCodeCompletionResults
static void
nclang_TargetInfo_getTriple(long Info, long __result)
Unsafe version of:TargetInfo_getTriple
static void
nclang_TargetInfo_getTriple(long Info, long __functionAddress, long __result)
Unsafe version of:TargetInfo_getTriple
static void
nclang_tokenize(long TU, long Range, long Tokens, long NumTokens)
Unsafe version of:tokenize
static void
nclang_tokenize(long TU, long Range, long Tokens, long NumTokens, long __functionAddress)
Unsafe version of:tokenize
static long
nclang_Type_getAlignOf(long T)
Unsafe version of:Type_getAlignOf
static long
nclang_Type_getAlignOf(long T, long __functionAddress)
Unsafe version of:Type_getAlignOf
static void
nclang_Type_getClassType(long T, long __result)
Unsafe version of:Type_getClassType
static void
nclang_Type_getClassType(long T, long __functionAddress, long __result)
Unsafe version of:Type_getClassType
static int
nclang_Type_getCXXRefQualifier(long T)
Unsafe version of:Type_getCXXRefQualifier
static int
nclang_Type_getCXXRefQualifier(long T, long __functionAddress)
Unsafe version of:Type_getCXXRefQualifier
static void
nclang_Type_getModifiedType(long T, long __result)
Unsafe version of:Type_getModifiedType
static void
nclang_Type_getModifiedType(long T, long __functionAddress, long __result)
Unsafe version of:Type_getModifiedType
static void
nclang_Type_getNamedType(long T, long __result)
Unsafe version of:Type_getNamedType
static void
nclang_Type_getNamedType(long T, long __functionAddress, long __result)
Unsafe version of:Type_getNamedType
static int
nclang_Type_getNullability(long T)
Unsafe version of:Type_getNullability
static int
nclang_Type_getNullability(long T, long __functionAddress)
Unsafe version of:Type_getNullability
static int
nclang_Type_getNumObjCProtocolRefs(long T)
Unsafe version of:Type_getNumObjCProtocolRefs
static int
nclang_Type_getNumObjCProtocolRefs(long T, long __functionAddress)
Unsafe version of:Type_getNumObjCProtocolRefs
static int
nclang_Type_getNumObjCTypeArgs(long T)
Unsafe version of:Type_getNumObjCTypeArgs
static int
nclang_Type_getNumObjCTypeArgs(long T, long __functionAddress)
Unsafe version of:Type_getNumObjCTypeArgs
static int
nclang_Type_getNumTemplateArguments(long T)
Unsafe version of:Type_getNumTemplateArguments
static int
nclang_Type_getNumTemplateArguments(long T, long __functionAddress)
Unsafe version of:Type_getNumTemplateArguments
static void
nclang_Type_getObjCEncoding(long type, long __result)
Unsafe version of:Type_getObjCEncoding
static void
nclang_Type_getObjCEncoding(long type, long __functionAddress, long __result)
Unsafe version of:Type_getObjCEncoding
static void
nclang_Type_getObjCObjectBaseType(long T, long __result)
Unsafe version of:Type_getObjCObjectBaseType
static void
nclang_Type_getObjCObjectBaseType(long T, long __functionAddress, long __result)
Unsafe version of:Type_getObjCObjectBaseType
static void
nclang_Type_getObjCProtocolDecl(long T, int i, long __result)
Unsafe version of:Type_getObjCProtocolDecl
static void
nclang_Type_getObjCProtocolDecl(long T, int i, long __functionAddress, long __result)
Unsafe version of:Type_getObjCProtocolDecl
static void
nclang_Type_getObjCTypeArg(long T, int i, long __result)
Unsafe version of:Type_getObjCTypeArg
static void
nclang_Type_getObjCTypeArg(long T, int i, long __functionAddress, long __result)
Unsafe version of:Type_getObjCTypeArg
static long
nclang_Type_getOffsetOf(long T, long S)
Unsafe version of:Type_getOffsetOf
static long
nclang_Type_getOffsetOf(long T, long S, long __functionAddress)
Unsafe version of:Type_getOffsetOf
static long
nclang_Type_getSizeOf(long T)
Unsafe version of:Type_getSizeOf
static long
nclang_Type_getSizeOf(long T, long __functionAddress)
Unsafe version of:Type_getSizeOf
static void
nclang_Type_getTemplateArgumentAsType(long T, int i, long __result)
Unsafe version of:Type_getTemplateArgumentAsType
static void
nclang_Type_getTemplateArgumentAsType(long T, int i, long __functionAddress, long __result)
Unsafe version of:Type_getTemplateArgumentAsType
static int
nclang_Type_isTransparentTagTypedef(long T)
Unsafe version of:Type_isTransparentTagTypedef
static int
nclang_Type_isTransparentTagTypedef(long T, long __functionAddress)
Unsafe version of:Type_isTransparentTagTypedef
static int
nclang_Type_visitFields(long T, long visitor, long client_data)
Unsafe version of:Type_visitFields
static int
nclang_Type_visitFields(long T, long visitor, long client_data, long __functionAddress)
Unsafe version of:Type_visitFields
static int
nclang_visitChildren(long parent, long visitor, long client_data)
Unsafe version of:visitChildren
static int
nclang_visitChildren(long parent, long visitor, long client_data, long __functionAddress)
Unsafe version of:visitChildren
-
-
-
Field Detail
-
CINDEX_VERSION_MAJOR
- See Also:
- Constant Field Values
-
CINDEX_VERSION_MINOR
- See Also:
- Constant Field Values
-
CXError_Success, CXError_Failure, CXError_Crashed, CXError_InvalidArguments, CXError_ASTReadError
Error codes returned by libclang routines. (enum CXErrorCode
)Zero (
CXError_Success
) is the only error code indicating success. Other error codes, including not yet assigned non-zero values, indicate errors.Enum values:
Error_Success
- No error.Error_Failure
- A generic error code, no further details are available.Errors of this kind can get their own specific error codes in future libclang versions.
Error_Crashed
- libclang crashed while performing the requested operation.Error_InvalidArguments
- The function detected that the arguments violate the function contract.Error_ASTReadError
- An AST deserialization error has occurred.
-
CXAvailability_Available, CXAvailability_Deprecated, CXAvailability_NotAvailable, CXAvailability_NotAccessible
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.(
enum CXAvailabilityKind
)Enum values:
Availability_Available
- The entity is available.Availability_Deprecated
- The entity is available, but has been deprecated (and its use is not recommended).Availability_NotAvailable
- The entity is not available; any use of it will be an error.Availability_NotAccessible
- The entity is available, but not accessible; any use of it will be an error.
-
CXCursor_ExceptionSpecificationKind_None, CXCursor_ExceptionSpecificationKind_DynamicNone, CXCursor_ExceptionSpecificationKind_Dynamic, CXCursor_ExceptionSpecificationKind_MSAny, CXCursor_ExceptionSpecificationKind_BasicNoexcept, CXCursor_ExceptionSpecificationKind_ComputedNoexcept, CXCursor_ExceptionSpecificationKind_Unevaluated, CXCursor_ExceptionSpecificationKind_Uninstantiated, CXCursor_ExceptionSpecificationKind_Unparsed
Describes the exception specification of a cursor. (enum CXCursor_ExceptionSpecificationKind
)A negative value indicates that the cursor is not a function declaration.
Enum values:
Cursor_ExceptionSpecificationKind_None
- The cursor has no exception specification.Cursor_ExceptionSpecificationKind_DynamicNone
- The cursor has exception specification throw()Cursor_ExceptionSpecificationKind_Dynamic
- The cursor has exception specification throw(T1, T2)Cursor_ExceptionSpecificationKind_MSAny
- The cursor has exception specification throw(...).Cursor_ExceptionSpecificationKind_BasicNoexcept
- The cursor has exception specification basic noexcept.Cursor_ExceptionSpecificationKind_ComputedNoexcept
- The cursor has exception specification computed noexcept.Cursor_ExceptionSpecificationKind_Unevaluated
- The exception specification has not yet been evaluated.Cursor_ExceptionSpecificationKind_Uninstantiated
- The exception specification has not yet been instantiated.Cursor_ExceptionSpecificationKind_Unparsed
- The exception specification has not been parsed yet.
-
CXGlobalOpt_None, CXGlobalOpt_ThreadBackgroundPriorityForIndexing, CXGlobalOpt_ThreadBackgroundPriorityForEditing, CXGlobalOpt_ThreadBackgroundPriorityForAll
CXGlobalOptFlags
Enum values:
GlobalOpt_None
- Used to indicate that no special CXIndex options are needed.GlobalOpt_ThreadBackgroundPriorityForIndexing
- Used to indicate that threads that libclang creates for indexing purposes should use background priority.Affects
indexSourceFile
,indexTranslationUnit
,parseTranslationUnit
,saveTranslationUnit
.GlobalOpt_ThreadBackgroundPriorityForEditing
- Used to indicate that threads that libclang creates for editing purposes should use background priority.Affects
reparseTranslationUnit
,codeCompleteAt
,annotateTokens
GlobalOpt_ThreadBackgroundPriorityForAll
- Used to indicate that all threads that libclang creates should use background priority.
-
CXDiagnostic_Ignored, CXDiagnostic_Note, CXDiagnostic_Warning, CXDiagnostic_Error, CXDiagnostic_Fatal
Describes the severity of a particular diagnostic.(
enum CXDiagnosticSeverity
)Enum values:
Diagnostic_Ignored
- A diagnostic that has been suppressed, e.g., by a command-line option.Diagnostic_Note
- This diagnostic is a note that should be attached to the previous (non-note) diagnostic.Diagnostic_Warning
- This diagnostic indicates suspicious code that may not be wrong.Diagnostic_Error
- This diagnostic indicates that the code is ill-formed.Diagnostic_Fatal
- This diagnostic indicates that the code is ill-formed such that future parser recovery is unlikely to produce useful results.
-
CXLoadDiag_None, CXLoadDiag_Unknown, CXLoadDiag_CannotLoad, CXLoadDiag_InvalidFile
Describes the kind of error that occurred (if any) in a call toclang_loadDiagnostics
.(
enum CXLoadDiag_Error
)Enum values:
LoadDiag_None
- Indicates that no error occurred.LoadDiag_Unknown
- Indicates that an unknown error occurred while attempting to deserialize diagnostics.LoadDiag_CannotLoad
- Indicates that the file containing the serialized diagnostics could not be opened.LoadDiag_InvalidFile
- Indicates that the serialized diagnostics file is invalid or corrupt.
-
CXDiagnostic_DisplaySourceLocation, CXDiagnostic_DisplayColumn, CXDiagnostic_DisplaySourceRanges, CXDiagnostic_DisplayOption, CXDiagnostic_DisplayCategoryId, CXDiagnostic_DisplayCategoryName
Options to control the display of diagnostics. (enum CXDiagnosticDisplayOptions
)The values in this enum are meant to be combined to customize the behavior of
clang_formatDiagnostic()
.Enum values:
Diagnostic_DisplaySourceLocation
- 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,
test.c:28: warning: extra tokens at end of #endif directive
This option corresponds to the clang flag
-fshow-source-location
.Diagnostic_DisplayColumn
- If displaying the source-location information of the diagnostic, also include the column number.This option corresponds to the clang flag
-fshow-column
.Diagnostic_DisplaySourceRanges
- 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
-fdiagnostics-print-source-range-info
.Diagnostic_DisplayOption
- 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
-fdiagnostics-show-option
.Diagnostic_DisplayCategoryId
- 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
-fdiagnostics-show-category=id
.Diagnostic_DisplayCategoryName
- 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
-fdiagnostics-show-category=name
.
-
CXTranslationUnit_None, CXTranslationUnit_DetailedPreprocessingRecord, CXTranslationUnit_Incomplete, CXTranslationUnit_PrecompiledPreamble, CXTranslationUnit_CacheCompletionResults, CXTranslationUnit_ForSerialization, CXTranslationUnit_CXXChainedPCH, CXTranslationUnit_SkipFunctionBodies, CXTranslationUnit_IncludeBriefCommentsInCodeCompletion, CXTranslationUnit_CreatePreambleOnFirstParse, CXTranslationUnit_KeepGoing, CXTranslationUnit_SingleFileParse, CXTranslationUnit_LimitSkipFunctionBodiesToPreamble, CXTranslationUnit_IncludeAttributedTypes, CXTranslationUnit_VisitImplicitAttributes
Flags that control the creation of translation units. (enum CXTranslationUnit_Flags
)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.
Enum values:
TranslationUnit_None
- Used to indicate that no special translation-unit options are needed.TranslationUnit_DetailedPreprocessingRecord
- 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.
TranslationUnit_Incomplete
- 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.
TranslationUnit_PrecompiledPreamble
- 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,
clang_reparseTranslationUnit()
will re-use the implicit precompiled header to improve parsing performance.TranslationUnit_CacheCompletionResults
- 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.
TranslationUnit_ForSerialization
- Used to indicate that the translation unit will be serialized withclang_saveTranslationUnit
.This option is typically used when parsing a header with the intent of producing a precompiled header.
TranslationUnit_CXXChainedPCH
- 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.
TranslationUnit_SkipFunctionBodies
- 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.
TranslationUnit_IncludeBriefCommentsInCodeCompletion
- Used to indicate that brief documentation comments should be included into the set of code completions returned from this translation unit.TranslationUnit_CreatePreambleOnFirstParse
- 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).TranslationUnit_KeepGoing
- 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.
TranslationUnit_SingleFileParse
- Sets the preprocessor in a mode for parsing a single file only.TranslationUnit_LimitSkipFunctionBodiesToPreamble
- 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.
TranslationUnit_IncludeAttributedTypes
- Used to indicate that attributed types should be included in CXType.TranslationUnit_VisitImplicitAttributes
- Used to indicate that implicit attributes should be visited.
-
CXSaveTranslationUnit_None
Flags that control how translation units are saved. (enum CXSaveTranslationUnit_Flags
)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.
Enum values:
SaveTranslationUnit_None
- Used to indicate that no special saving options are needed.
-
CXSaveError_None, CXSaveError_Unknown, CXSaveError_TranslationErrors, CXSaveError_InvalidTU
Describes the kind of error that occurred (if any) in a call toclang_saveTranslationUnit()
.(
enum CXSaveError
)Enum values:
SaveError_None
- Indicates that no error occurred while saving a translation unit.SaveError_Unknown
- 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.
SaveError_TranslationErrors
- 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
clang_getNumDiagnostics()
andclang_getDiagnostic()
.SaveError_InvalidTU
- Indicates that the translation unit to be saved was somehow invalid (e.g.,NULL
).
-
CXReparse_None
Flags that control the reparsing of translation units. (enum CXReparse_Flags
)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.
Enum values:
Reparse_None
- Used to indicate that no special reparsing options are needed.
-
CXTUResourceUsage_AST, CXTUResourceUsage_Identifiers, CXTUResourceUsage_Selectors, CXTUResourceUsage_GlobalCompletionResults, CXTUResourceUsage_SourceManagerContentCache, CXTUResourceUsage_AST_SideTables, CXTUResourceUsage_SourceManager_Membuffer_Malloc, CXTUResourceUsage_SourceManager_Membuffer_MMap, CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc, CXTUResourceUsage_ExternalASTSource_Membuffer_MMap, CXTUResourceUsage_Preprocessor, CXTUResourceUsage_PreprocessingRecord, CXTUResourceUsage_SourceManager_DataStructures, CXTUResourceUsage_Preprocessor_HeaderSearch, CXTUResourceUsage_MEMORY_IN_BYTES_BEGIN, CXTUResourceUsage_MEMORY_IN_BYTES_END, CXTUResourceUsage_First, CXTUResourceUsage_Last
Categorizes how memory is being used by a translation unit.(
enum CXTUResourceUsageKind
)Enum values:
TUResourceUsage_AST
TUResourceUsage_Identifiers
TUResourceUsage_Selectors
TUResourceUsage_GlobalCompletionResults
TUResourceUsage_SourceManagerContentCache
TUResourceUsage_AST_SideTables
TUResourceUsage_SourceManager_Membuffer_Malloc
TUResourceUsage_SourceManager_Membuffer_MMap
TUResourceUsage_ExternalASTSource_Membuffer_Malloc
TUResourceUsage_ExternalASTSource_Membuffer_MMap
TUResourceUsage_Preprocessor
TUResourceUsage_PreprocessingRecord
TUResourceUsage_SourceManager_DataStructures
TUResourceUsage_Preprocessor_HeaderSearch
TUResourceUsage_MEMORY_IN_BYTES_BEGIN
TUResourceUsage_MEMORY_IN_BYTES_END
TUResourceUsage_First
TUResourceUsage_Last
-
CXCursor_UnexposedDecl, CXCursor_StructDecl, CXCursor_UnionDecl, CXCursor_ClassDecl, CXCursor_EnumDecl, CXCursor_FieldDecl, CXCursor_EnumConstantDecl, CXCursor_FunctionDecl, CXCursor_VarDecl, CXCursor_ParmDecl, CXCursor_ObjCInterfaceDecl, CXCursor_ObjCCategoryDecl, CXCursor_ObjCProtocolDecl, CXCursor_ObjCPropertyDecl, CXCursor_ObjCIvarDecl, CXCursor_ObjCInstanceMethodDecl, CXCursor_ObjCClassMethodDecl, CXCursor_ObjCImplementationDecl, CXCursor_ObjCCategoryImplDecl, CXCursor_TypedefDecl, CXCursor_CXXMethod, CXCursor_Namespace, CXCursor_LinkageSpec, CXCursor_Constructor, CXCursor_Destructor, CXCursor_ConversionFunction, CXCursor_TemplateTypeParameter, CXCursor_NonTypeTemplateParameter, CXCursor_TemplateTemplateParameter, CXCursor_FunctionTemplate, CXCursor_ClassTemplate, CXCursor_ClassTemplatePartialSpecialization, CXCursor_NamespaceAlias, CXCursor_UsingDirective, CXCursor_UsingDeclaration, CXCursor_TypeAliasDecl, CXCursor_ObjCSynthesizeDecl, CXCursor_ObjCDynamicDecl, CXCursor_CXXAccessSpecifier, CXCursor_FirstDecl, CXCursor_LastDecl, CXCursor_FirstRef, CXCursor_ObjCSuperClassRef, CXCursor_ObjCProtocolRef, CXCursor_ObjCClassRef, CXCursor_TypeRef, CXCursor_CXXBaseSpecifier, CXCursor_TemplateRef, CXCursor_NamespaceRef, CXCursor_MemberRef, CXCursor_LabelRef, CXCursor_OverloadedDeclRef, CXCursor_VariableRef, CXCursor_LastRef, CXCursor_FirstInvalid, CXCursor_InvalidFile, CXCursor_NoDeclFound, CXCursor_NotImplemented, CXCursor_InvalidCode, CXCursor_LastInvalid, CXCursor_FirstExpr, CXCursor_UnexposedExpr, CXCursor_DeclRefExpr, CXCursor_MemberRefExpr, CXCursor_CallExpr, CXCursor_ObjCMessageExpr, CXCursor_BlockExpr, CXCursor_IntegerLiteral, CXCursor_FloatingLiteral, CXCursor_ImaginaryLiteral, CXCursor_StringLiteral, CXCursor_CharacterLiteral, CXCursor_ParenExpr, CXCursor_UnaryOperator, CXCursor_ArraySubscriptExpr, CXCursor_BinaryOperator, CXCursor_CompoundAssignOperator, CXCursor_ConditionalOperator, CXCursor_CStyleCastExpr, CXCursor_CompoundLiteralExpr, CXCursor_InitListExpr, CXCursor_AddrLabelExpr, CXCursor_StmtExpr, CXCursor_GenericSelectionExpr, CXCursor_GNUNullExpr, CXCursor_CXXStaticCastExpr, CXCursor_CXXDynamicCastExpr, CXCursor_CXXReinterpretCastExpr, CXCursor_CXXConstCastExpr, CXCursor_CXXFunctionalCastExpr, CXCursor_CXXTypeidExpr, CXCursor_CXXBoolLiteralExpr, CXCursor_CXXNullPtrLiteralExpr, CXCursor_CXXThisExpr, CXCursor_CXXThrowExpr, CXCursor_CXXNewExpr, CXCursor_CXXDeleteExpr, CXCursor_UnaryExpr, CXCursor_ObjCStringLiteral, CXCursor_ObjCEncodeExpr, CXCursor_ObjCSelectorExpr, CXCursor_ObjCProtocolExpr, CXCursor_ObjCBridgedCastExpr, CXCursor_PackExpansionExpr, CXCursor_SizeOfPackExpr, CXCursor_LambdaExpr, CXCursor_ObjCBoolLiteralExpr, CXCursor_ObjCSelfExpr, CXCursor_OMPArraySectionExpr, CXCursor_ObjCAvailabilityCheckExpr, CXCursor_FixedPointLiteral, CXCursor_LastExpr, CXCursor_FirstStmt, CXCursor_UnexposedStmt, CXCursor_LabelStmt, CXCursor_CompoundStmt, CXCursor_CaseStmt, CXCursor_DefaultStmt, CXCursor_IfStmt, CXCursor_SwitchStmt, CXCursor_WhileStmt, CXCursor_DoStmt, CXCursor_ForStmt, CXCursor_GotoStmt, CXCursor_IndirectGotoStmt, CXCursor_ContinueStmt, CXCursor_BreakStmt, CXCursor_ReturnStmt, CXCursor_GCCAsmStmt, CXCursor_AsmStmt, CXCursor_ObjCAtTryStmt, CXCursor_ObjCAtCatchStmt, CXCursor_ObjCAtFinallyStmt, CXCursor_ObjCAtThrowStmt, CXCursor_ObjCAtSynchronizedStmt, CXCursor_ObjCAutoreleasePoolStmt, CXCursor_ObjCForCollectionStmt, CXCursor_CXXCatchStmt, CXCursor_CXXTryStmt, CXCursor_CXXForRangeStmt, CXCursor_SEHTryStmt, CXCursor_SEHExceptStmt, CXCursor_SEHFinallyStmt, CXCursor_MSAsmStmt, CXCursor_NullStmt, CXCursor_DeclStmt, CXCursor_OMPParallelDirective, CXCursor_OMPSimdDirective, CXCursor_OMPForDirective, CXCursor_OMPSectionsDirective, CXCursor_OMPSectionDirective, CXCursor_OMPSingleDirective, CXCursor_OMPParallelForDirective, CXCursor_OMPParallelSectionsDirective, CXCursor_OMPTaskDirective, CXCursor_OMPMasterDirective, CXCursor_OMPCriticalDirective, CXCursor_OMPTaskyieldDirective, CXCursor_OMPBarrierDirective, CXCursor_OMPTaskwaitDirective, CXCursor_OMPFlushDirective, CXCursor_SEHLeaveStmt, CXCursor_OMPOrderedDirective, CXCursor_OMPAtomicDirective, CXCursor_OMPForSimdDirective, CXCursor_OMPParallelForSimdDirective, CXCursor_OMPTargetDirective, CXCursor_OMPTeamsDirective, CXCursor_OMPTaskgroupDirective, CXCursor_OMPCancellationPointDirective, CXCursor_OMPCancelDirective, CXCursor_OMPTargetDataDirective, CXCursor_OMPTaskLoopDirective, CXCursor_OMPTaskLoopSimdDirective, CXCursor_OMPDistributeDirective, CXCursor_OMPTargetEnterDataDirective, CXCursor_OMPTargetExitDataDirective, CXCursor_OMPTargetParallelDirective, CXCursor_OMPTargetParallelForDirective, CXCursor_OMPTargetUpdateDirective, CXCursor_OMPDistributeParallelForDirective, CXCursor_OMPDistributeParallelForSimdDirective, CXCursor_OMPDistributeSimdDirective, CXCursor_OMPTargetParallelForSimdDirective, CXCursor_OMPTargetSimdDirective, CXCursor_OMPTeamsDistributeDirective, CXCursor_OMPTeamsDistributeSimdDirective, CXCursor_OMPTeamsDistributeParallelForSimdDirective, CXCursor_OMPTeamsDistributeParallelForDirective, CXCursor_OMPTargetTeamsDirective, CXCursor_OMPTargetTeamsDistributeDirective, CXCursor_OMPTargetTeamsDistributeParallelForDirective, CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective, CXCursor_OMPTargetTeamsDistributeSimdDirective, CXCursor_LastStmt, CXCursor_TranslationUnit, CXCursor_FirstAttr, CXCursor_UnexposedAttr, CXCursor_IBActionAttr, CXCursor_IBOutletAttr, CXCursor_IBOutletCollectionAttr, CXCursor_CXXFinalAttr, CXCursor_CXXOverrideAttr, CXCursor_AnnotateAttr, CXCursor_AsmLabelAttr, CXCursor_PackedAttr, CXCursor_PureAttr, CXCursor_ConstAttr, CXCursor_NoDuplicateAttr, CXCursor_CUDAConstantAttr, CXCursor_CUDADeviceAttr, CXCursor_CUDAGlobalAttr, CXCursor_CUDAHostAttr, CXCursor_CUDASharedAttr, CXCursor_VisibilityAttr, CXCursor_DLLExport, CXCursor_DLLImport, CXCursor_NSReturnsRetained, CXCursor_NSReturnsNotRetained, CXCursor_NSReturnsAutoreleased, CXCursor_NSConsumesSelf, CXCursor_NSConsumed, CXCursor_ObjCException, CXCursor_ObjCNSObject, CXCursor_ObjCIndependentClass, CXCursor_ObjCPreciseLifetime, CXCursor_ObjCReturnsInnerPointer, CXCursor_ObjCRequiresSuper, CXCursor_ObjCRootClass, CXCursor_ObjCSubclassingRestricted, CXCursor_ObjCExplicitProtocolImpl, CXCursor_ObjCDesignatedInitializer, CXCursor_ObjCRuntimeVisible, CXCursor_ObjCBoxable, CXCursor_FlagEnum, CXCursor_LastAttr, CXCursor_PreprocessingDirective, CXCursor_MacroDefinition, CXCursor_MacroExpansion, CXCursor_MacroInstantiation, CXCursor_InclusionDirective, CXCursor_FirstPreprocessing, CXCursor_LastPreprocessing, CXCursor_ModuleImportDecl, CXCursor_TypeAliasTemplateDecl, CXCursor_StaticAssert, CXCursor_FriendDecl, CXCursor_FirstExtraDecl, CXCursor_LastExtraDecl, CXCursor_OverloadCandidate
Describes the kind of entity that a cursor refers to.(
enum CXCursorKind
)Enum values:
Cursor_UnexposedDecl
- DeclarationsA 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.
Cursor_StructDecl
- A C or C++ struct.Cursor_UnionDecl
- A C or C++ union.Cursor_ClassDecl
- A C++ class.Cursor_EnumDecl
- An enumeration.Cursor_FieldDecl
- A field (in C) or non-static data member (in C++) in a struct, union, or C++ class.Cursor_EnumConstantDecl
- An enumerator constant.Cursor_FunctionDecl
- A function.Cursor_VarDecl
- A variable.Cursor_ParmDecl
- A function or method parameter.Cursor_ObjCInterfaceDecl
- An Objective-C @ interface.Cursor_ObjCCategoryDecl
- An Objective-C @ interface for a category.Cursor_ObjCProtocolDecl
- An Objective-C @ protocol declaration.Cursor_ObjCPropertyDecl
- An Objective-C @ property declaration.Cursor_ObjCIvarDecl
- An Objective-C instance variable.Cursor_ObjCInstanceMethodDecl
- An Objective-C instance method.Cursor_ObjCClassMethodDecl
- An Objective-C class method.Cursor_ObjCImplementationDecl
- An Objective-C @ implementation.Cursor_ObjCCategoryImplDecl
- An Objective-C @ implementation for a category.Cursor_TypedefDecl
- A typedef.Cursor_CXXMethod
- A C++ class method.Cursor_Namespace
- A C++ namespace.Cursor_LinkageSpec
- A linkage specification, e.g. 'extern "C"'.Cursor_Constructor
- A C++ constructor.Cursor_Destructor
- A C++ destructor.Cursor_ConversionFunction
- A C++ conversion function.Cursor_TemplateTypeParameter
- A C++ template type parameter.Cursor_NonTypeTemplateParameter
- A C++ non-type template parameter.Cursor_TemplateTemplateParameter
- A C++ template template parameter.Cursor_FunctionTemplate
- A C++ function template.Cursor_ClassTemplate
- A C++ class template.Cursor_ClassTemplatePartialSpecialization
- A C++ class template partial specialization.Cursor_NamespaceAlias
- A C++ namespace alias declaration.Cursor_UsingDirective
- A C++ using directive.Cursor_UsingDeclaration
- A C++ using declaration.Cursor_TypeAliasDecl
- A C++ alias declarationCursor_ObjCSynthesizeDecl
- An Objective-C @ synthesize definition.Cursor_ObjCDynamicDecl
- An Objective-C @ dynamic definition.Cursor_CXXAccessSpecifier
- An access specifier.Cursor_FirstDecl
- An access specifier.Cursor_LastDecl
- An access specifier.Cursor_FirstRef
- Decl referencesCursor_ObjCSuperClassRef
Cursor_ObjCProtocolRef
Cursor_ObjCClassRef
Cursor_TypeRef
- A reference to a type declaration.A type reference occurs anywhere where a type is named but not declared. For example, given:
typedef unsigned size_type; size_type size;
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.
Cursor_CXXBaseSpecifier
- A reference to a type declaration.A type reference occurs anywhere where a type is named but not declared. For example, given:
typedef unsigned size_type; size_type size;
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.
Cursor_TemplateRef
- A reference to a class template, function template, template template parameter, or class template partial specialization.Cursor_NamespaceRef
- A reference to a namespace or namespace alias.Cursor_MemberRef
- A reference to a member of a struct, union, or class that occurs in some non-expression context, e.g., a designated initializer.Cursor_LabelRef
- 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:
start_over: ++counter; goto start_over;
A label reference cursor refers to a label statement.
Cursor_OverloadedDeclRef
- 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:
template<typename T> void swap(T&, T&); struct X { ... }; void swap(X&, X&); template<typename T> void reverse(T* first, T* last) { while (first < last - 1) { swap(*first, *--last); ++first; } } struct Y { }; void swap(Y&, Y&);
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
clang_getNumOverloadedDecls()
andclang_getOverloadedDecl()
can be used to retrieve the definitions referenced by this cursor.Cursor_VariableRef
- A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_LastRef
- A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_FirstInvalid
- Error conditionsCursor_InvalidFile
- Error conditionsCursor_NoDeclFound
- Error conditionsCursor_NotImplemented
- Error conditionsCursor_InvalidCode
- Error conditionsCursor_LastInvalid
- Error conditionsCursor_FirstExpr
- ExpressionsCursor_UnexposedExpr
- 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.
Cursor_DeclRefExpr
- An expression that refers to some value declaration, such as a function, variable, or enumerator.Cursor_MemberRefExpr
- An expression that refers to a member of a struct, union, class, Objective-C class, etc.Cursor_CallExpr
- An expression that calls a function.Cursor_ObjCMessageExpr
- An expression that sends a message to an Objective-C object or class.Cursor_BlockExpr
- An expression that represents a block literal.Cursor_IntegerLiteral
- An integer literal.Cursor_FloatingLiteral
- A floating point number literal.Cursor_ImaginaryLiteral
- An imaginary number literal.Cursor_StringLiteral
- A string literal.Cursor_CharacterLiteral
- A character literal.Cursor_ParenExpr
- A parenthesized expression, e.g. "(1)".This AST node is only formed if full location information is requested.
Cursor_UnaryOperator
- This represents the unary-expression's (except sizeof and alignof).Cursor_ArraySubscriptExpr
- [C99 6.5.2.1] Array Subscripting.Cursor_BinaryOperator
- A builtin binary operation expression such as "x + y" or "x <= y".Cursor_CompoundAssignOperator
- Compound assignment such as "+=".Cursor_ConditionalOperator
- The ?: ternary operator.Cursor_CStyleCastExpr
- 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.
Cursor_CompoundLiteralExpr
- [C99 6.5.2.5]Cursor_InitListExpr
- Describes an C or C++ initializer list.Cursor_AddrLabelExpr
- The GNU address of label extension, representing&&label
.Cursor_StmtExpr
- This is the GNU Statement Expression extension: ({int X=4; X;})Cursor_GenericSelectionExpr
- Represents a C11 generic selection.Cursor_GNUNullExpr
- 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).Cursor_CXXStaticCastExpr
- C++'s static_cast <> expression.Cursor_CXXDynamicCastExpr
- C++'s dynamic_cast <> expression.Cursor_CXXReinterpretCastExpr
- C++'s reinterpret_cast <> expression.Cursor_CXXConstCastExpr
- C++'s const_cast <> expression.Cursor_CXXFunctionalCastExpr
- Represents an explicit C++ type conversion that uses "functional" notion (C++ [expr.type.conv]).Example:
x = int(0.5);
Cursor_CXXTypeidExpr
- A C++ typeid expression (C++ [expr.typeid]).Cursor_CXXBoolLiteralExpr
- [C++ 2.13.5] C++ Boolean Literal.Cursor_CXXNullPtrLiteralExpr
- [C++0x 2.14.7] C++ Pointer Literal.Cursor_CXXThisExpr
- Represents the "this" expression in C++Cursor_CXXThrowExpr
- [C++ 15] C++ Throw Expression.This handles 'throw' and 'throw' assignment-expression. When assignment-expression isn't present, Op will be null.
Cursor_CXXNewExpr
- A new expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".Cursor_CXXDeleteExpr
- A delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray".Cursor_UnaryExpr
- A unary expression. (noexcept, sizeof, or other traits)Cursor_ObjCStringLiteral
- An Objective-C string literal i.e. " foo".Cursor_ObjCEncodeExpr
- An Objective-C @ encode expression.Cursor_ObjCSelectorExpr
- An Objective-C @ selector expression.Cursor_ObjCProtocolExpr
- An Objective-C @ protocol expression.Cursor_ObjCBridgedCastExpr
- An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers, transferring ownership in the process.NSString *str = (__bridge_transfer NSString *)CFCreateString();
Cursor_PackExpansionExpr
- 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:
template<typename F, typename ...Types> void forward(F f, Types &&...args) { f(static_cast<Types&&>(args)...); }
Cursor_SizeOfPackExpr
- Represents an expression that computes the length of a parameter pack.template<typename ...Types> struct count { static const unsigned value = sizeof...(Types); };
Cursor_LambdaExpr
- Represents a C++ lambda expression that produces a local function object.void abssort(float *x, unsigned N) { std::sort(x, x + N, [](float a, float b) { return std::abs(a) < std::abs(b); }); }
Cursor_ObjCBoolLiteralExpr
- Objective-c Boolean Literal.Cursor_ObjCSelfExpr
- Represents the "self" expression in an Objective-C method.Cursor_OMPArraySectionExpr
- OpenMP 4.0 [2.4, Array Section].Cursor_ObjCAvailabilityCheckExpr
- Represents an@available (...)
check.Cursor_FixedPointLiteral
- Fixed point literalCursor_LastExpr
- Fixed point literalCursor_FirstStmt
- StatementsCursor_UnexposedStmt
- 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.
Cursor_LabelStmt
- A labelled statement in a function.This cursor kind is used to describe the "start_over:" label statement in the following example:
start_over: ++counter;
Cursor_CompoundStmt
- A group of statements like { stmt stmt }.This cursor kind is used to describe compound statements, e.g. function bodies.
Cursor_CaseStmt
- A case statement.Cursor_DefaultStmt
- A default statement.Cursor_IfStmt
- An if statementCursor_SwitchStmt
- A switch statement.Cursor_WhileStmt
- A while statement.Cursor_DoStmt
- A do statement.Cursor_ForStmt
- A for statement.Cursor_GotoStmt
- A goto statement.Cursor_IndirectGotoStmt
- An indirect goto statement.Cursor_ContinueStmt
- A continue statement.Cursor_BreakStmt
- A break statement.Cursor_ReturnStmt
- A return statement.Cursor_GCCAsmStmt
- A GCC inline assembly statement extension.Cursor_AsmStmt
- A GCC inline assembly statement extension.Cursor_ObjCAtTryStmt
- Objective-C's overall @ try- @ catch- @ finally statement.Cursor_ObjCAtCatchStmt
- Objective-C's @ catch statement.Cursor_ObjCAtFinallyStmt
- Objective-C's @ finally statement.Cursor_ObjCAtThrowStmt
- Objective-C's @ throw statement.Cursor_ObjCAtSynchronizedStmt
- Objective-C's @ synchronized statement.Cursor_ObjCAutoreleasePoolStmt
- Objective-C's autorelease pool statement.Cursor_ObjCForCollectionStmt
- Objective-C's collection statement.Cursor_CXXCatchStmt
- C++'s catch statement.Cursor_CXXTryStmt
- C++'s try statement.Cursor_CXXForRangeStmt
- C++'s for (* : *) statement.Cursor_SEHTryStmt
- Windows Structured Exception Handling's try statement.Cursor_SEHExceptStmt
- Windows Structured Exception Handling's except statement.Cursor_SEHFinallyStmt
- Windows Structured Exception Handling's finally statement.Cursor_MSAsmStmt
- A MS inline assembly statement extension.Cursor_NullStmt
- The null statement ";": C99 6.8.3p3.This cursor kind is used to describe the null statement.
Cursor_DeclStmt
- Adaptor class for mixing declarations with statements and expressions.Cursor_OMPParallelDirective
- OpenMP parallel directive.Cursor_OMPSimdDirective
- OpenMP SIMD directive.Cursor_OMPForDirective
- OpenMP for directive.Cursor_OMPSectionsDirective
- OpenMP sections directive.Cursor_OMPSectionDirective
- OpenMP section directive.Cursor_OMPSingleDirective
- OpenMP single directive.Cursor_OMPParallelForDirective
- OpenMP parallel for directive.Cursor_OMPParallelSectionsDirective
- OpenMP parallel sections directive.Cursor_OMPTaskDirective
- OpenMP task directive.Cursor_OMPMasterDirective
- OpenMP master directive.Cursor_OMPCriticalDirective
- OpenMP critical directive.Cursor_OMPTaskyieldDirective
- OpenMP taskyield directive.Cursor_OMPBarrierDirective
- OpenMP barrier directive.Cursor_OMPTaskwaitDirective
- OpenMP taskwait directive.Cursor_OMPFlushDirective
- OpenMP flush directive.Cursor_SEHLeaveStmt
- Windows Structured Exception Handling's leave statement.Cursor_OMPOrderedDirective
- OpenMP ordered directive.Cursor_OMPAtomicDirective
- OpenMP atomic directive.Cursor_OMPForSimdDirective
- OpenMP for SIMD directive.Cursor_OMPParallelForSimdDirective
- OpenMP parallel for SIMD directive.Cursor_OMPTargetDirective
- OpenMP target directive.Cursor_OMPTeamsDirective
- OpenMP teams directive.Cursor_OMPTaskgroupDirective
- OpenMP taskgroup directive.Cursor_OMPCancellationPointDirective
- OpenMP cancellation point directive.Cursor_OMPCancelDirective
- OpenMP cancel directive.Cursor_OMPTargetDataDirective
- OpenMP target data directive.Cursor_OMPTaskLoopDirective
- OpenMP taskloop directive.Cursor_OMPTaskLoopSimdDirective
- OpenMP taskloop simd directive.Cursor_OMPDistributeDirective
- OpenMP distribute directive.Cursor_OMPTargetEnterDataDirective
- OpenMP target enter data directive.Cursor_OMPTargetExitDataDirective
- OpenMP target exit data directive.Cursor_OMPTargetParallelDirective
- OpenMP target parallel directive.Cursor_OMPTargetParallelForDirective
- OpenMP target parallel for directive.Cursor_OMPTargetUpdateDirective
- OpenMP target update directive.Cursor_OMPDistributeParallelForDirective
- OpenMP distribute parallel for directive.Cursor_OMPDistributeParallelForSimdDirective
- OpenMP distribute parallel for simd directive.Cursor_OMPDistributeSimdDirective
- OpenMP distribute simd directive.Cursor_OMPTargetParallelForSimdDirective
- OpenMP target parallel for simd directive.Cursor_OMPTargetSimdDirective
- OpenMP target simd directive.Cursor_OMPTeamsDistributeDirective
- OpenMP teams distribute directive.Cursor_OMPTeamsDistributeSimdDirective
- OpenMP teams distribute simd directive.Cursor_OMPTeamsDistributeParallelForSimdDirective
- OpenMP teams distribute parallel for simd directive.Cursor_OMPTeamsDistributeParallelForDirective
- OpenMP teams distribute parallel for directive.Cursor_OMPTargetTeamsDirective
- OpenMP target teams directive.Cursor_OMPTargetTeamsDistributeDirective
- OpenMP target teams distribute directive.Cursor_OMPTargetTeamsDistributeParallelForDirective
- OpenMP target teams distribute parallel for directive.Cursor_OMPTargetTeamsDistributeParallelForSimdDirective
- OpenMP target teams distribute parallel for simd directive.Cursor_OMPTargetTeamsDistributeSimdDirective
- OpenMP target teams distribute simd directive.Cursor_LastStmt
- OpenMP target teams distribute simd directive.Cursor_TranslationUnit
- 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.
Cursor_FirstAttr
- AttributesCursor_UnexposedAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_IBActionAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_IBOutletAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_IBOutletCollectionAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CXXFinalAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CXXOverrideAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_AnnotateAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_AsmLabelAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_PackedAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_PureAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_ConstAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_NoDuplicateAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CUDAConstantAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CUDADeviceAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CUDAGlobalAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CUDAHostAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_CUDASharedAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_VisibilityAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_DLLExport
- An attribute whose specific kind is not exposed via this interface.Cursor_DLLImport
- An attribute whose specific kind is not exposed via this interface.Cursor_NSReturnsRetained
- An attribute whose specific kind is not exposed via this interface.Cursor_NSReturnsNotRetained
- An attribute whose specific kind is not exposed via this interface.Cursor_NSReturnsAutoreleased
- An attribute whose specific kind is not exposed via this interface.Cursor_NSConsumesSelf
- An attribute whose specific kind is not exposed via this interface.Cursor_NSConsumed
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCException
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCNSObject
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCIndependentClass
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCPreciseLifetime
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCReturnsInnerPointer
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCRequiresSuper
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCRootClass
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCSubclassingRestricted
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCExplicitProtocolImpl
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCDesignatedInitializer
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCRuntimeVisible
- An attribute whose specific kind is not exposed via this interface.Cursor_ObjCBoxable
- An attribute whose specific kind is not exposed via this interface.Cursor_FlagEnum
- An attribute whose specific kind is not exposed via this interface.Cursor_LastAttr
- An attribute whose specific kind is not exposed via this interface.Cursor_PreprocessingDirective
- PreprocessingCursor_MacroDefinition
- PreprocessingCursor_MacroExpansion
- PreprocessingCursor_MacroInstantiation
- PreprocessingCursor_InclusionDirective
- PreprocessingCursor_FirstPreprocessing
- PreprocessingCursor_LastPreprocessing
- PreprocessingCursor_ModuleImportDecl
- Extra DeclarationsA module import declaration.
Cursor_TypeAliasTemplateDecl
- Extra DeclarationsA module import declaration.
Cursor_StaticAssert
- A static_assert or _Static_assert nodeCursor_FriendDecl
- a friend declaration.Cursor_FirstExtraDecl
- a friend declaration.Cursor_LastExtraDecl
- a friend declaration.Cursor_OverloadCandidate
- A code completion overload candidate.
-
CXLinkage_Invalid, CXLinkage_NoLinkage, CXLinkage_Internal, CXLinkage_UniqueExternal, CXLinkage_External
Describe the linkage of the entity referred to by a cursor.(
enum CXLinkageKind
)Enum values:
Linkage_Invalid
- This value indicates that no linkage information is available for a provided CXCursor.Linkage_NoLinkage
- This is the linkage for variables, parameters, and so on that have automatic storage. This covers normal (non-extern) local variables.Linkage_Internal
- This is the linkage for static variables and static functions.Linkage_UniqueExternal
- This is the linkage for entities with external linkage that live in C++ anonymous namespaces.Linkage_External
- This is the linkage for entities with true, external linkage.
-
CXVisibility_Invalid, CXVisibility_Hidden, CXVisibility_Protected, CXVisibility_Default
enum CXVisibilityKind
Enum values:
Visibility_Invalid
- This value indicates that no visibility information is available for a provided CXCursor.Visibility_Hidden
- Symbol not seen by the linker.Visibility_Protected
- Symbol seen by the linker but resolves to a symbol inside this object.Visibility_Default
- Symbol seen by the linker and acts like a normal symbol.
-
CXLanguage_Invalid, CXLanguage_C, CXLanguage_ObjC, CXLanguage_CPlusPlus
Describe the "language" of the entity referred to by a cursor.(
enum CXLanguageKind
)Enum values:
-
CXTLS_None, CXTLS_Dynamic, CXTLS_Static
Describe the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.(
enum CXTLSKind
)Enum values:
-
CXType_Invalid, CXType_Unexposed, CXType_Void, CXType_Bool, CXType_Char_U, CXType_UChar, CXType_Char16, CXType_Char32, CXType_UShort, CXType_UInt, CXType_ULong, CXType_ULongLong, CXType_UInt128, CXType_Char_S, CXType_SChar, CXType_WChar, CXType_Short, CXType_Int, CXType_Long, CXType_LongLong, CXType_Int128, CXType_Float, CXType_Double, CXType_LongDouble, CXType_NullPtr, CXType_Overload, CXType_Dependent, CXType_ObjCId, CXType_ObjCClass, CXType_ObjCSel, CXType_Float128, CXType_Half, CXType_Float16, CXType_ShortAccum, CXType_Accum, CXType_LongAccum, CXType_UShortAccum, CXType_UAccum, CXType_ULongAccum, CXType_FirstBuiltin, CXType_LastBuiltin, CXType_Complex, CXType_Pointer, CXType_BlockPointer, CXType_LValueReference, CXType_RValueReference, CXType_Record, CXType_Enum, CXType_Typedef, CXType_ObjCInterface, CXType_ObjCObjectPointer, CXType_FunctionNoProto, CXType_FunctionProto, CXType_ConstantArray, CXType_Vector, CXType_IncompleteArray, CXType_VariableArray, CXType_DependentSizedArray, CXType_MemberPointer, CXType_Auto, CXType_Elaborated, CXType_Pipe, CXType_OCLImage1dRO, CXType_OCLImage1dArrayRO, CXType_OCLImage1dBufferRO, CXType_OCLImage2dRO, CXType_OCLImage2dArrayRO, CXType_OCLImage2dDepthRO, CXType_OCLImage2dArrayDepthRO, CXType_OCLImage2dMSAARO, CXType_OCLImage2dArrayMSAARO, CXType_OCLImage2dMSAADepthRO, CXType_OCLImage2dArrayMSAADepthRO, CXType_OCLImage3dRO, CXType_OCLImage1dWO, CXType_OCLImage1dArrayWO, CXType_OCLImage1dBufferWO, CXType_OCLImage2dWO, CXType_OCLImage2dArrayWO, CXType_OCLImage2dDepthWO, CXType_OCLImage2dArrayDepthWO, CXType_OCLImage2dMSAAWO, CXType_OCLImage2dArrayMSAAWO, CXType_OCLImage2dMSAADepthWO, CXType_OCLImage2dArrayMSAADepthWO, CXType_OCLImage3dWO, CXType_OCLImage1dRW, CXType_OCLImage1dArrayRW, CXType_OCLImage1dBufferRW, CXType_OCLImage2dRW, CXType_OCLImage2dArrayRW, CXType_OCLImage2dDepthRW, CXType_OCLImage2dArrayDepthRW, CXType_OCLImage2dMSAARW, CXType_OCLImage2dArrayMSAARW, CXType_OCLImage2dMSAADepthRW, CXType_OCLImage2dArrayMSAADepthRW, CXType_OCLImage3dRW, CXType_OCLSampler, CXType_OCLEvent, CXType_OCLQueue, CXType_OCLReserveID, CXType_ObjCObject, CXType_ObjCTypeParam, CXType_Attributed, CXType_OCLIntelSubgroupAVCMcePayload, CXType_OCLIntelSubgroupAVCImePayload, CXType_OCLIntelSubgroupAVCRefPayload, CXType_OCLIntelSubgroupAVCSicPayload, CXType_OCLIntelSubgroupAVCMceResult, CXType_OCLIntelSubgroupAVCImeResult, CXType_OCLIntelSubgroupAVCRefResult, CXType_OCLIntelSubgroupAVCSicResult, CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout, CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout, CXType_OCLIntelSubgroupAVCImeSingleRefStreamin, CXType_OCLIntelSubgroupAVCImeDualRefStreamin
Describes the kind of type(
enum CXTypeKind
)Enum values:
Type_Invalid
- Represents an invalid type (e.g., where no type is available).Type_Unexposed
- A type whose specific kind is not exposed via this interface.Type_Void
- Builtin typesType_Bool
- Builtin typesType_Char_U
- Builtin typesType_UChar
- Builtin typesType_Char16
- Builtin typesType_Char32
- Builtin typesType_UShort
- Builtin typesType_UInt
- Builtin typesType_ULong
- Builtin typesType_ULongLong
- Builtin typesType_UInt128
- Builtin typesType_Char_S
- Builtin typesType_SChar
- Builtin typesType_WChar
- Builtin typesType_Short
- Builtin typesType_Int
- Builtin typesType_Long
- Builtin typesType_LongLong
- Builtin typesType_Int128
- Builtin typesType_Float
- Builtin typesType_Double
- Builtin typesType_LongDouble
- Builtin typesType_NullPtr
- Builtin typesType_Overload
- Builtin typesType_Dependent
- Builtin typesType_ObjCId
- Builtin typesType_ObjCClass
- Builtin typesType_ObjCSel
- Builtin typesType_Float128
- Builtin typesType_Half
- Builtin typesType_Float16
- Builtin typesType_ShortAccum
- Builtin typesType_Accum
- Builtin typesType_LongAccum
- Builtin typesType_UShortAccum
- Builtin typesType_UAccum
- Builtin typesType_ULongAccum
- Builtin typesType_FirstBuiltin
- Builtin typesType_LastBuiltin
- Builtin typesType_Complex
- Builtin typesType_Pointer
- Builtin typesType_BlockPointer
- Builtin typesType_LValueReference
- Builtin typesType_RValueReference
- Builtin typesType_Record
- Builtin typesType_Enum
- Builtin typesType_Typedef
- Builtin typesType_ObjCInterface
- Builtin typesType_ObjCObjectPointer
- Builtin typesType_FunctionNoProto
- Builtin typesType_FunctionProto
- Builtin typesType_ConstantArray
- Builtin typesType_Vector
- Builtin typesType_IncompleteArray
- Builtin typesType_VariableArray
- Builtin typesType_DependentSizedArray
- Builtin typesType_MemberPointer
- Builtin typesType_Auto
- Builtin typesType_Elaborated
- 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.
Type_Pipe
- OpenCL PipeType.Type_OCLImage1dRO
- OpenCL builtin types.Type_OCLImage1dArrayRO
- OpenCL builtin types.Type_OCLImage1dBufferRO
- OpenCL builtin types.Type_OCLImage2dRO
- OpenCL builtin types.Type_OCLImage2dArrayRO
- OpenCL builtin types.Type_OCLImage2dDepthRO
- OpenCL builtin types.Type_OCLImage2dArrayDepthRO
- OpenCL builtin types.Type_OCLImage2dMSAARO
- OpenCL builtin types.Type_OCLImage2dArrayMSAARO
- OpenCL builtin types.Type_OCLImage2dMSAADepthRO
- OpenCL builtin types.Type_OCLImage2dArrayMSAADepthRO
- OpenCL builtin types.Type_OCLImage3dRO
- OpenCL builtin types.Type_OCLImage1dWO
- OpenCL builtin types.Type_OCLImage1dArrayWO
- OpenCL builtin types.Type_OCLImage1dBufferWO
- OpenCL builtin types.Type_OCLImage2dWO
- OpenCL builtin types.Type_OCLImage2dArrayWO
- OpenCL builtin types.Type_OCLImage2dDepthWO
- OpenCL builtin types.Type_OCLImage2dArrayDepthWO
- OpenCL builtin types.Type_OCLImage2dMSAAWO
- OpenCL builtin types.Type_OCLImage2dArrayMSAAWO
- OpenCL builtin types.Type_OCLImage2dMSAADepthWO
- OpenCL builtin types.Type_OCLImage2dArrayMSAADepthWO
- OpenCL builtin types.Type_OCLImage3dWO
- OpenCL builtin types.Type_OCLImage1dRW
- OpenCL builtin types.Type_OCLImage1dArrayRW
- OpenCL builtin types.Type_OCLImage1dBufferRW
- OpenCL builtin types.Type_OCLImage2dRW
- OpenCL builtin types.Type_OCLImage2dArrayRW
- OpenCL builtin types.Type_OCLImage2dDepthRW
- OpenCL builtin types.Type_OCLImage2dArrayDepthRW
- OpenCL builtin types.Type_OCLImage2dMSAARW
- OpenCL builtin types.Type_OCLImage2dArrayMSAARW
- OpenCL builtin types.Type_OCLImage2dMSAADepthRW
- OpenCL builtin types.Type_OCLImage2dArrayMSAADepthRW
- OpenCL builtin types.Type_OCLImage3dRW
- OpenCL builtin types.Type_OCLSampler
- OpenCL builtin types.Type_OCLEvent
- OpenCL builtin types.Type_OCLQueue
- OpenCL builtin types.Type_OCLReserveID
- OpenCL builtin types.Type_ObjCObject
Type_ObjCTypeParam
Type_Attributed
Type_OCLIntelSubgroupAVCMcePayload
- OpenCL builtin types.Type_OCLIntelSubgroupAVCImePayload
- OpenCL builtin types.Type_OCLIntelSubgroupAVCRefPayload
- OpenCL builtin types.Type_OCLIntelSubgroupAVCSicPayload
- OpenCL builtin types.Type_OCLIntelSubgroupAVCMceResult
- OpenCL builtin types.Type_OCLIntelSubgroupAVCImeResult
- OpenCL builtin types.Type_OCLIntelSubgroupAVCRefResult
- OpenCL builtin types.Type_OCLIntelSubgroupAVCSicResult
- OpenCL builtin types.Type_OCLIntelSubgroupAVCImeResultSingleRefStreamout
- OpenCL builtin types.Type_OCLIntelSubgroupAVCImeResultDualRefStreamout
- OpenCL builtin types.Type_OCLIntelSubgroupAVCImeSingleRefStreamin
- OpenCL builtin types.Type_OCLIntelSubgroupAVCImeDualRefStreamin
- OpenCL builtin types.
-
CXCallingConv_Default, CXCallingConv_C, CXCallingConv_X86StdCall, CXCallingConv_X86FastCall, CXCallingConv_X86ThisCall, CXCallingConv_X86Pascal, CXCallingConv_AAPCS, CXCallingConv_AAPCS_VFP, CXCallingConv_X86RegCall, CXCallingConv_IntelOclBicc, CXCallingConv_Win64, CXCallingConv_X86_64Win64, CXCallingConv_X86_64SysV, CXCallingConv_X86VectorCall, CXCallingConv_Swift, CXCallingConv_PreserveMost, CXCallingConv_PreserveAll, CXCallingConv_Invalid, CXCallingConv_Unexposed
Describes the calling convention of a function type(
enum CXCallingConv
)Enum values:
CallingConv_Default
CallingConv_C
CallingConv_X86StdCall
CallingConv_X86FastCall
CallingConv_X86ThisCall
CallingConv_X86Pascal
CallingConv_AAPCS
CallingConv_AAPCS_VFP
CallingConv_X86RegCall
CallingConv_IntelOclBicc
CallingConv_Win64
CallingConv_X86_64Win64
- Alias for compatibility with older versions of API.CallingConv_X86_64SysV
- Alias for compatibility with older versions of API.CallingConv_X86VectorCall
- Alias for compatibility with older versions of API.CallingConv_Swift
- Alias for compatibility with older versions of API.CallingConv_PreserveMost
- Alias for compatibility with older versions of API.CallingConv_PreserveAll
- Alias for compatibility with older versions of API.CallingConv_Invalid
- Alias for compatibility with older versions of API.CallingConv_Unexposed
- Alias for compatibility with older versions of API.
-
CXTemplateArgumentKind_Null, CXTemplateArgumentKind_Type, CXTemplateArgumentKind_Declaration, CXTemplateArgumentKind_NullPtr, CXTemplateArgumentKind_Integral, CXTemplateArgumentKind_Template, CXTemplateArgumentKind_TemplateExpansion, CXTemplateArgumentKind_Expression, CXTemplateArgumentKind_Pack, CXTemplateArgumentKind_Invalid
Describes the kind of a template argument. (enum CXTemplateArgumentKind
)See the definition of llvm::clang::TemplateArgument::ArgKind for full element descriptions.
Enum values:
TemplateArgumentKind_Null
TemplateArgumentKind_Type
TemplateArgumentKind_Declaration
TemplateArgumentKind_NullPtr
TemplateArgumentKind_Integral
TemplateArgumentKind_Template
TemplateArgumentKind_TemplateExpansion
TemplateArgumentKind_Expression
TemplateArgumentKind_Pack
TemplateArgumentKind_Invalid
- Indicates an error case, preventing the kind from being deduced.
-
CXTypeNullability_NonNull, CXTypeNullability_Nullable, CXTypeNullability_Unspecified, CXTypeNullability_Invalid
enum CXTypeNullabilityKind
Enum values:
TypeNullability_NonNull
- Values of this type can never be null.TypeNullability_Nullable
- Values of this type can be null.TypeNullability_Unspecified
- 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.TypeNullability_Invalid
- Nullability is not applicable to this type.
-
CXTypeLayoutError_Invalid, CXTypeLayoutError_Incomplete, CXTypeLayoutError_Dependent, CXTypeLayoutError_NotConstantSize, CXTypeLayoutError_InvalidFieldName
List the possible error codes forclang_Type_getSizeOf
,clang_Type_getAlignOf
,clang_Type_getOffsetOf
andclang_Cursor_getOffsetOf
. (enum CXTypeLayoutError
)A value of this enumeration type can be returned if the target type is not a valid argument to sizeof, alignof or offsetof.
Enum values:
TypeLayoutError_Invalid
- Type is of kind CXType_Invalid.TypeLayoutError_Incomplete
- The type is an incomplete Type.TypeLayoutError_Dependent
- The type is a dependent Type.TypeLayoutError_NotConstantSize
- The type is not a constant size type.TypeLayoutError_InvalidFieldName
- The Field name is not valid for this record.
-
CXRefQualifier_None, CXRefQualifier_LValue, CXRefQualifier_RValue
enum CXRefQualifierKind
Enum values:
RefQualifier_None
- No ref-qualifier was provided.RefQualifier_LValue
- An lvalue ref-qualifier was provided (&
).RefQualifier_RValue
- An rvalue ref-qualifier was provided (&&
).
-
CX_CXXInvalidAccessSpecifier, CX_CXXPublic, CX_CXXProtected, CX_CXXPrivate
Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier.(
enum CX_CXXAccessSpecifier
)Enum values:
-
CX_SC_Invalid, CX_SC_None, CX_SC_Extern, CX_SC_Static, CX_SC_PrivateExtern, CX_SC_OpenCLWorkGroupLocal, CX_SC_Auto, CX_SC_Register
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.(
enum CX_StorageClass
)Enum values:
-
CXChildVisit_Break, CXChildVisit_Continue, CXChildVisit_Recurse
Describes how the traversal of the children of a particular cursor should proceed after visiting a particular child cursor. (enum CXChildVisitResult
)A value of this enumeration type should be returned by each
CXCursorVisitor
to indicate howvisitChildren
proceed.Enum values:
ChildVisit_Break
- Terminates the cursor traversal.ChildVisit_Continue
- Continues the cursor traversal with the next sibling of the cursor just visited, without visiting its children.ChildVisit_Recurse
- Recursively traverse the children of this cursor, using the same visitor and client data.
-
CXPrintingPolicy_Indentation, CXPrintingPolicy_SuppressSpecifiers, CXPrintingPolicy_SuppressTagKeyword, CXPrintingPolicy_IncludeTagDefinition, CXPrintingPolicy_SuppressScope, CXPrintingPolicy_SuppressUnwrittenScope, CXPrintingPolicy_SuppressInitializers, CXPrintingPolicy_ConstantArraySizeAsWritten, CXPrintingPolicy_AnonymousTagLocations, CXPrintingPolicy_SuppressStrongLifetime, CXPrintingPolicy_SuppressLifetimeQualifiers, CXPrintingPolicy_SuppressTemplateArgsInCXXConstructors, CXPrintingPolicy_Bool, CXPrintingPolicy_Restrict, CXPrintingPolicy_Alignof, CXPrintingPolicy_UnderscoreAlignof, CXPrintingPolicy_UseVoidForZeroParams, CXPrintingPolicy_TerseOutput, CXPrintingPolicy_PolishForDeclaration, CXPrintingPolicy_Half, CXPrintingPolicy_MSWChar, CXPrintingPolicy_IncludeNewlines, CXPrintingPolicy_MSVCFormatting, CXPrintingPolicy_ConstantsAsWritten, CXPrintingPolicy_SuppressImplicitBase, CXPrintingPolicy_FullyQualifiedName, CXPrintingPolicy_LastProperty
Properties for the printing policy. (enum CXPrintingPolicyProperty
)See
clang::PrintingPolicy
for more information.Enum values:
PrintingPolicy_Indentation
PrintingPolicy_SuppressSpecifiers
PrintingPolicy_SuppressTagKeyword
PrintingPolicy_IncludeTagDefinition
PrintingPolicy_SuppressScope
PrintingPolicy_SuppressUnwrittenScope
PrintingPolicy_SuppressInitializers
PrintingPolicy_ConstantArraySizeAsWritten
PrintingPolicy_AnonymousTagLocations
PrintingPolicy_SuppressStrongLifetime
PrintingPolicy_SuppressLifetimeQualifiers
PrintingPolicy_SuppressTemplateArgsInCXXConstructors
PrintingPolicy_Bool
PrintingPolicy_Restrict
PrintingPolicy_Alignof
PrintingPolicy_UnderscoreAlignof
PrintingPolicy_UseVoidForZeroParams
PrintingPolicy_TerseOutput
PrintingPolicy_PolishForDeclaration
PrintingPolicy_Half
PrintingPolicy_MSWChar
PrintingPolicy_IncludeNewlines
PrintingPolicy_MSVCFormatting
PrintingPolicy_ConstantsAsWritten
PrintingPolicy_SuppressImplicitBase
PrintingPolicy_FullyQualifiedName
PrintingPolicy_LastProperty
-
CXObjCPropertyAttr_noattr, CXObjCPropertyAttr_readonly, CXObjCPropertyAttr_getter, CXObjCPropertyAttr_assign, CXObjCPropertyAttr_readwrite, CXObjCPropertyAttr_retain, CXObjCPropertyAttr_copy, CXObjCPropertyAttr_nonatomic, CXObjCPropertyAttr_setter, CXObjCPropertyAttr_atomic, CXObjCPropertyAttr_weak, CXObjCPropertyAttr_strong, CXObjCPropertyAttr_unsafe_unretained, CXObjCPropertyAttr_class
Property attributes for aCXCursor_ObjCPropertyDecl
.(
CXObjCPropertyAttrKind
)Enum values:
ObjCPropertyAttr_noattr
ObjCPropertyAttr_readonly
ObjCPropertyAttr_getter
ObjCPropertyAttr_assign
ObjCPropertyAttr_readwrite
ObjCPropertyAttr_retain
ObjCPropertyAttr_copy
ObjCPropertyAttr_nonatomic
ObjCPropertyAttr_setter
ObjCPropertyAttr_atomic
ObjCPropertyAttr_weak
ObjCPropertyAttr_strong
ObjCPropertyAttr_unsafe_unretained
ObjCPropertyAttr_class
-
CXObjCDeclQualifier_None, CXObjCDeclQualifier_In, CXObjCDeclQualifier_Inout, CXObjCDeclQualifier_Out, CXObjCDeclQualifier_Bycopy, CXObjCDeclQualifier_Byref, CXObjCDeclQualifier_Oneway
'Qualifiers' written next to the return and parameter types in Objective-C method declarations.(
CXObjCDeclQualifierKind
)Enum values:
-
CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, CXNameRange_WantSinglePiece
enum CXNameRefFlags
Enum values:
NameRange_WantQualifier
- Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the range.NameRange_WantTemplateArgs
- Include the explicit template arguments, e.g. <int> in x.f<int>, in the range.NameRange_WantSinglePiece
- 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:
[object doSomething:here withValue:there]; // Objective-C return some_vector[1]; // C++
-
CXToken_Punctuation, CXToken_Keyword, CXToken_Identifier, CXToken_Literal, CXToken_Comment
Describes a kind of token.(
CXTokenKind
)Enum values:
Token_Punctuation
- A token that contains some kind of punctuation.Token_Keyword
- A language keyword.Token_Identifier
- An identifier (that is not a keyword).Token_Literal
- A numeric, string, or character literal.Token_Comment
- A comment.
-
CXCompletionChunk_Optional, CXCompletionChunk_TypedText, CXCompletionChunk_Text, CXCompletionChunk_Placeholder, CXCompletionChunk_Informative, CXCompletionChunk_CurrentParameter, CXCompletionChunk_LeftParen, CXCompletionChunk_RightParen, CXCompletionChunk_LeftBracket, CXCompletionChunk_RightBracket, CXCompletionChunk_LeftBrace, CXCompletionChunk_RightBrace, CXCompletionChunk_LeftAngle, CXCompletionChunk_RightAngle, CXCompletionChunk_Comma, CXCompletionChunk_ResultType, CXCompletionChunk_Colon, CXCompletionChunk_SemiColon, CXCompletionChunk_Equal, CXCompletionChunk_HorizontalSpace, CXCompletionChunk_VerticalSpace
Describes a single piece of text within a code-completion string. (enum CXCompletionChunkKind
)Each "chunk" within a code-completion string (
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.Enum values:
CompletionChunk_Optional
- 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
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:void f(int x, float y = 3.14, double z = 2.71828);
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.
CompletionChunk_TypedText
- 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.
CompletionChunk_Text
- 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.
CompletionChunk_Placeholder
- 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.
CompletionChunk_Informative
- 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.
CompletionChunk_CurrentParameter
- 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
int add(int x, int y);
and the source code
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, toadd(17
, (where the code-completion point is after the ","), the code-completion string will contain a "current parameter" chunk to "int y".CompletionChunk_LeftParen
- A left parenthesis ('('), used to initiate a function call or signal the beginning of a function parameter list.CompletionChunk_RightParen
- A right parenthesis (')'), used to finish a function call or signal the end of a function parameter list.CompletionChunk_LeftBracket
- A left bracket ('[').CompletionChunk_RightBracket
- A right bracket (']').CompletionChunk_LeftBrace
- A left brace ('{').CompletionChunk_RightBrace
- A right brace ('}').CompletionChunk_LeftAngle
- A left angle bracket (' <').CompletionChunk_RightAngle
- A right angle bracket ('>').CompletionChunk_Comma
- A comma separator (',').CompletionChunk_ResultType
- 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.
CompletionChunk_Colon
- A colon (':').CompletionChunk_SemiColon
- A semicolon (';').CompletionChunk_Equal
- An '=' sign.CompletionChunk_HorizontalSpace
- Horizontal space (' ').CompletionChunk_VerticalSpace
- Vertical space ('\n'), after which it is generally a good idea to perform indentation.
-
CXCodeComplete_IncludeMacros, CXCodeComplete_IncludeCodePatterns, CXCodeComplete_IncludeBriefComments, CXCodeComplete_SkipPreamble, CXCodeComplete_IncludeCompletionsWithFixIts
Flags that can be passed toclang_codeCompleteAt()
to modify its behavior. (enum CXCodeComplete_Flags
)The enumerators in this enumeration can be bitwise-OR'd together to provide multiple options to
clang_codeCompleteAt()
.Enum values:
CodeComplete_IncludeMacros
- Whether to include macros within the set of code completions returned.CodeComplete_IncludeCodePatterns
- Whether to include code patterns for language constructs within the set of code completions, e.g., for loops.CodeComplete_IncludeBriefComments
- Whether to include brief documentation within the set of code completions returned.CodeComplete_SkipPreamble
- 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.CodeComplete_IncludeCompletionsWithFixIts
- Whether to include completions with small fix-its, e.g. change '.' to '->' on member access, etc.
-
CXCompletionContext_Unexposed, CXCompletionContext_AnyType, CXCompletionContext_AnyValue, CXCompletionContext_ObjCObjectValue, CXCompletionContext_ObjCSelectorValue, CXCompletionContext_CXXClassTypeValue, CXCompletionContext_DotMemberAccess, CXCompletionContext_ArrowMemberAccess, CXCompletionContext_ObjCPropertyAccess, CXCompletionContext_EnumTag, CXCompletionContext_UnionTag, CXCompletionContext_StructTag, CXCompletionContext_ClassTag, CXCompletionContext_Namespace, CXCompletionContext_NestedNameSpecifier, CXCompletionContext_ObjCInterface, CXCompletionContext_ObjCProtocol, CXCompletionContext_ObjCCategory, CXCompletionContext_ObjCInstanceMessage, CXCompletionContext_ObjCClassMessage, CXCompletionContext_ObjCSelectorName, CXCompletionContext_MacroName, CXCompletionContext_NaturalLanguage, CXCompletionContext_IncludedFile, CXCompletionContext_Unknown
Bits that represent the context under which completion is occurring. (enum CXCompletionContext
)The enumerators in this enumeration may be bitwise-OR'd together if multiple contexts are occurring simultaneously.
Enum values:
CompletionContext_Unexposed
- The context for completions is unexposed, as only Clang results should be included. (This is equivalent to having no context bits set.)CompletionContext_AnyType
- Completions for any possible type should be included in the results.CompletionContext_AnyValue
- Completions for any possible value (variables, function calls, etc.) should be included in the results.CompletionContext_ObjCObjectValue
- Completions for values that resolve to an Objective-C object should be included in the results.CompletionContext_ObjCSelectorValue
- Completions for values that resolve to an Objective-C selector should be included in the results.CompletionContext_CXXClassTypeValue
- Completions for values that resolve to a C++ class type should be included in the results.CompletionContext_DotMemberAccess
- Completions for fields of the member being accessed using the dot operator should be included in the results.CompletionContext_ArrowMemberAccess
- Completions for fields of the member being accessed using the arrow operator should be included in the results.CompletionContext_ObjCPropertyAccess
- Completions for properties of the Objective-C object being accessed using the dot operator should be included in the results.CompletionContext_EnumTag
- Completions for enum tags should be included in the results.CompletionContext_UnionTag
- Completions for union tags should be included in the results.CompletionContext_StructTag
- Completions for struct tags should be included in the results.CompletionContext_ClassTag
- Completions for C++ class names should be included in the results.CompletionContext_Namespace
- Completions for C++ namespaces and namespace aliases should be included in the results.CompletionContext_NestedNameSpecifier
- Completions for C++ nested name specifiers should be included in the results.CompletionContext_ObjCInterface
- Completions for Objective-C interfaces (classes) should be included in the results.CompletionContext_ObjCProtocol
- Completions for Objective-C protocols should be included in the results.CompletionContext_ObjCCategory
- Completions for Objective-C categories should be included in the results.CompletionContext_ObjCInstanceMessage
- Completions for Objective-C instance messages should be included in the results.CompletionContext_ObjCClassMessage
- Completions for Objective-C class messages should be included in the results.CompletionContext_ObjCSelectorName
- Completions for Objective-C selector names should be included in the results.CompletionContext_MacroName
- Completions for preprocessor macro names should be included in the results.CompletionContext_NaturalLanguage
- Natural language completions should be included in the results.CompletionContext_IncludedFile
-#include
file completions should be included in the results.CompletionContext_Unknown
- The current context is unknown, so set all contexts.
-
CXEval_Int, CXEval_Float, CXEval_ObjCStrLiteral, CXEval_StrLiteral, CXEval_CFStr, CXEval_Other, CXEval_UnExposed
CXEvalResultKind
Enum values:
-
CXResult_Success, CXResult_Invalid, CXResult_VisitBreak
CXResult
Enum values:
Result_Success
- Function returned successfully.Result_Invalid
- One of the parameters was invalid for the function.Result_VisitBreak
- The function was terminated by a callback (e.g. it returned CXVisit_Break)
-
CXIdxEntity_Unexposed, CXIdxEntity_Typedef, CXIdxEntity_Function, CXIdxEntity_Variable, CXIdxEntity_Field, CXIdxEntity_EnumConstant, CXIdxEntity_ObjCClass, CXIdxEntity_ObjCProtocol, CXIdxEntity_ObjCCategory, CXIdxEntity_ObjCInstanceMethod, CXIdxEntity_ObjCClassMethod, CXIdxEntity_ObjCProperty, CXIdxEntity_ObjCIvar, CXIdxEntity_Enum, CXIdxEntity_Struct, CXIdxEntity_Union, CXIdxEntity_CXXClass, CXIdxEntity_CXXNamespace, CXIdxEntity_CXXNamespaceAlias, CXIdxEntity_CXXStaticVariable, CXIdxEntity_CXXStaticMethod, CXIdxEntity_CXXInstanceMethod, CXIdxEntity_CXXConstructor, CXIdxEntity_CXXDestructor, CXIdxEntity_CXXConversionFunction, CXIdxEntity_CXXTypeAlias, CXIdxEntity_CXXInterface
CXIdxEntityKind
Enum values:
IdxEntity_Unexposed
IdxEntity_Typedef
IdxEntity_Function
IdxEntity_Variable
IdxEntity_Field
IdxEntity_EnumConstant
IdxEntity_ObjCClass
IdxEntity_ObjCProtocol
IdxEntity_ObjCCategory
IdxEntity_ObjCInstanceMethod
IdxEntity_ObjCClassMethod
IdxEntity_ObjCProperty
IdxEntity_ObjCIvar
IdxEntity_Enum
IdxEntity_Struct
IdxEntity_Union
IdxEntity_CXXClass
IdxEntity_CXXNamespace
IdxEntity_CXXNamespaceAlias
IdxEntity_CXXStaticVariable
IdxEntity_CXXStaticMethod
IdxEntity_CXXInstanceMethod
IdxEntity_CXXConstructor
IdxEntity_CXXDestructor
IdxEntity_CXXConversionFunction
IdxEntity_CXXTypeAlias
IdxEntity_CXXInterface
-
CXIdxEntityLang_None, CXIdxEntityLang_C, CXIdxEntityLang_ObjC, CXIdxEntityLang_CXX, CXIdxEntityLang_Swift
CXIdxEntityLanguage
Enum values:
-
CXIdxEntity_NonTemplate, CXIdxEntity_Template, CXIdxEntity_TemplatePartialSpecialization, CXIdxEntity_TemplateSpecialization
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(
CXIdxEntityCXXTemplateKind
)Enum values:
-
CXIdxAttr_Unexposed, CXIdxAttr_IBAction, CXIdxAttr_IBOutlet, CXIdxAttr_IBOutletCollection
CXIdxAttrKind
Enum values:
-
CXIdxDeclFlag_Skipped
CXIdxDeclInfoFlags
-
CXIdxObjCContainer_ForwardRef, CXIdxObjCContainer_Interface, CXIdxObjCContainer_Implementation
CXIdxObjCContainerKind
Enum values:
-
CXIdxEntityRef_Direct, CXIdxEntityRef_Implicit
Data forIndexerCallbacks.indexEntityReference()
. (CXIdxEntityRefKind
)This may be deprecated in a future version as this duplicates the
CXSymbolRole_Implicit
bit inCXSymbolRole
.Enum values:
IdxEntityRef_Direct
- The entity is referenced directly in user's code.IdxEntityRef_Implicit
- An implicit reference, e.g. a reference of an Objective-C method via the dot syntax.
-
CXSymbolRole_None, CXSymbolRole_Declaration, CXSymbolRole_Definition, CXSymbolRole_Reference, CXSymbolRole_Read, CXSymbolRole_Write, CXSymbolRole_Call, CXSymbolRole_Dynamic, CXSymbolRole_AddressOf, CXSymbolRole_Implicit
Roles that are attributed to symbol occurrences. (CXSymbolRole
)Internal: this currently mirrors low 9 bits of clang::index::SymbolRole with higher bits zeroed. These high bits may be exposed in the future.
Enum values:
-
CXIndexOpt_None, CXIndexOpt_SuppressRedundantRefs, CXIndexOpt_IndexFunctionLocalSymbols, CXIndexOpt_IndexImplicitTemplateInstantiations, CXIndexOpt_SuppressWarnings, CXIndexOpt_SkipParsedBodiesInSession
CXIndexOptFlags
Enum values:
IndexOpt_None
- Used to indicate that no special indexing options are needed.IndexOpt_SuppressRedundantRefs
- Used to indicate thatIndexerCallbacks.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.IndexOpt_IndexFunctionLocalSymbols
- Function-local symbols should be indexed. If this is not set function-local symbols will be ignored.IndexOpt_IndexImplicitTemplateInstantiations
- Implicit function/class template instantiations should be indexed. If this is not set, implicit instantiations will be ignored.IndexOpt_SuppressWarnings
- Suppress all compiler warnings when parsing for indexing.IndexOpt_SkipParsedBodiesInSession
- Skip a function/method body that was already parsed during an indexing session associated with aCXIndexAction
object. Bodies in system headers are always skipped.
-
-
Method Detail
-
getLibrary
public static org.lwjgl.system.SharedLibrary getLibrary()
Returns the CLANGSharedLibrary
.
-
nclang_getCString
public static long nclang_getCString(long string, long __functionAddress) public static long nclang_getCString(long string)
Unsafe version of:getCString
-
clang_getCString
@Nullable public static java.lang.String clang_getCString(CXString string)
Retrieve the character data associated with the given string.
-
nclang_disposeString
public static void nclang_disposeString(long string, long __functionAddress) public static void nclang_disposeString(long string)
Unsafe version of:disposeString
-
clang_disposeString
public static void clang_disposeString(CXString string)
Free the given string.
-
nclang_disposeStringSet
public static void nclang_disposeStringSet(long set)
Unsafe version of:disposeStringSet
-
clang_disposeStringSet
public static void clang_disposeStringSet(CXStringSet set)
Free the given string set.
-
clang_createIndex
public static long clang_createIndex(boolean excludeDeclarationsFromPCH, boolean displayDiagnostics)
Provides a shared context for creating translation units.It provides two options:
excludeDeclarationsFromPCH
: When non-zero, allows enumeration of "local" declarations (when loading any new translation units). A "local" declaration is one that belongs in the translation unit itself and not in a precompiled header that was used by the translation unit. If zero, all declarations will be enumerated.
Here is an example:
// excludeDeclsFromPCH = 1, displayDiagnostics=1 Idx = clang_createIndex(1, 1); // IndexTest.pch was produced with the following command: // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch" TU = clang_createTranslationUnit(Idx, "IndexTest.pch"); // This will load all the symbols from 'IndexTest.pch' clang_visitChildren(clang_getTranslationUnitCursor(TU), TranslationUnitVisitor, 0); clang_disposeTranslationUnit(TU); // This will load all the symbols from 'IndexTest.c', excluding symbols // from 'IndexTest.pch'. char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" }; TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args, 0, 0); clang_visitChildren(clang_getTranslationUnitCursor(TU), TranslationUnitVisitor, 0); clang_disposeTranslationUnit(TU);
This process of creating the
pch
, loading it separately, and using it (via-include-pch
) allowsexcludeDeclsFromPCH
to remove redundant callbacks (which gives the indexer the same performance benefit as the compiler).
-
clang_disposeIndex
public static void clang_disposeIndex(long index)
Destroy the given index.The index must not be destroyed until all of the translation units created within that index have been destroyed.
-
clang_CXIndex_setGlobalOptions
public static void clang_CXIndex_setGlobalOptions(long index, int options)
Sets general options associated with aCXIndex
.For example:
CXIndex idx = ...; clang_CXIndex_setGlobalOptions(idx, clang_CXIndex_getGlobalOptions(idx) | CXGlobalOpt_ThreadBackgroundPriorityForIndexing);
- Parameters:
options
- a bitmask of options, a bitwise OR ofCXGlobalOpt_XXX
flags
-
clang_CXIndex_getGlobalOptions
public static int clang_CXIndex_getGlobalOptions(long index)
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 givenCXIndex
object
-
nclang_CXIndex_setInvocationEmissionPathOption
public static void nclang_CXIndex_setInvocationEmissionPathOption(long index, long Path)
Unsafe version of:CXIndex_setInvocationEmissionPathOption
-
clang_CXIndex_setInvocationEmissionPathOption
public static void clang_CXIndex_setInvocationEmissionPathOption(long index, @Nullable java.nio.ByteBuffer Path) public static void clang_CXIndex_setInvocationEmissionPathOption(long index, @Nullable java.lang.CharSequence Path)
Sets the invocation emission path option in aCXIndex
.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.
-
nclang_getFileName
public static void nclang_getFileName(long SFile, long __functionAddress, long __result) public static void nclang_getFileName(long SFile, long __result)
Unsafe version of:getFileName
-
clang_getFileName
public static CXString clang_getFileName(long SFile, CXString __result)
Retrieve the complete file and path name of the given file.
-
clang_getFileTime
public static long clang_getFileTime(long SFile)
Retrieve the last modification time of the given file.
-
nclang_getFileUniqueID
public static int nclang_getFileUniqueID(long file, long outID)
Unsafe version of:getFileUniqueID
-
clang_getFileUniqueID
public static int clang_getFileUniqueID(long file, CXFileUniqueID outID)
Retrieve the unique ID for the givenfile
.- Parameters:
file
- the file to get the ID foroutID
- stores the returned CXFileUniqueID- Returns:
- if there was a failure getting the unique ID, returns non-zero, otherwise returns 0
-
clang_isFileMultipleIncludeGuarded
public static boolean clang_isFileMultipleIncludeGuarded(long tu, long file)
Determine whether the given header is guarded against multiple inclusions, either with the conventional #ifndef/#define/#endif macro guards or with #pragma once.
-
nclang_getFile
public static long nclang_getFile(long tu, long file_name)
Unsafe version of:getFile
-
clang_getFile
public static long clang_getFile(long tu, java.nio.ByteBuffer file_name) public static long clang_getFile(long tu, java.lang.CharSequence file_name)
Retrieve a file handle within the given translation unit.- Parameters:
tu
- the translation unitfile_name
- the name of the file- Returns:
- the file handle for the named file in the translation unit
tu
, or aNULL
file handle if the file was not a part of this translation unit
-
nclang_getFileContents
public static long nclang_getFileContents(long tu, long file, long size)
Unsafe version of:getFileContents
- Parameters:
size
- [out] if non-NULL
, will be set to the size of the buffer
-
clang_getFileContents
@Nullable public static java.nio.ByteBuffer clang_getFileContents(long tu, long file)
Retrieve the buffer associated with the given file.- Parameters:
tu
- the translation unitfile
- the file for which to retrieve the buffer- Returns:
- a pointer to the buffer in memory that holds the contents of
file
, or aNULL
pointer when the file is not loaded
-
clang_File_isEqual
public static boolean clang_File_isEqual(long file1, long file2)
Returns non-zero if thefile1
andfile2
point to the same file, or they are bothNULL
.
-
nclang_File_tryGetRealPathName
public static void nclang_File_tryGetRealPathName(long file, long __functionAddress, long __result) public static void nclang_File_tryGetRealPathName(long file, long __result)
Unsafe version of:File_tryGetRealPathName
-
clang_File_tryGetRealPathName
public static CXString clang_File_tryGetRealPathName(long file, CXString __result)
Returns the real path name offile
.An empty string may be returned. Use
getFileName
in that case.
-
nclang_getNullLocation
public static void nclang_getNullLocation(long __functionAddress, long __result) public static void nclang_getNullLocation(long __result)
Unsafe version of:getNullLocation
-
clang_getNullLocation
public static CXSourceLocation clang_getNullLocation(CXSourceLocation __result)
Retrieve aNULL
(invalid) source location.
-
nclang_equalLocations
public static int nclang_equalLocations(long loc1, long loc2, long __functionAddress) public static int nclang_equalLocations(long loc1, long loc2)
Unsafe version of:equalLocations
-
clang_equalLocations
public static boolean clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2)
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
-
nclang_getLocation
public static void nclang_getLocation(long tu, long file, int line, int column, long __functionAddress, long __result) public static void nclang_getLocation(long tu, long file, int line, int column, long __result)
Unsafe version of:getLocation
-
clang_getLocation
public static CXSourceLocation clang_getLocation(long tu, long file, int line, int column, CXSourceLocation __result)
Retrieves the source location associated with a given file/line/column in a particular translation unit.
-
nclang_getLocationForOffset
public static void nclang_getLocationForOffset(long tu, long file, int offset, long __functionAddress, long __result) public static void nclang_getLocationForOffset(long tu, long file, int offset, long __result)
Unsafe version of:getLocationForOffset
-
clang_getLocationForOffset
public static CXSourceLocation clang_getLocationForOffset(long tu, long file, int offset, CXSourceLocation __result)
Retrieves the source location associated with a given character offset in a particular translation unit.
-
nclang_Location_isInSystemHeader
public static int nclang_Location_isInSystemHeader(long location, long __functionAddress) public static int nclang_Location_isInSystemHeader(long location)
Unsafe version of:Location_isInSystemHeader
-
clang_Location_isInSystemHeader
public static boolean clang_Location_isInSystemHeader(CXSourceLocation location)
Returns non-zero if the given source location is in a system header.
-
nclang_Location_isFromMainFile
public static int nclang_Location_isFromMainFile(long location, long __functionAddress) public static int nclang_Location_isFromMainFile(long location)
Unsafe version of:Location_isFromMainFile
-
clang_Location_isFromMainFile
public static boolean clang_Location_isFromMainFile(CXSourceLocation location)
Returns non-zero if the given source location is in the main file of the corresponding translation unit.
-
nclang_getNullRange
public static void nclang_getNullRange(long __functionAddress, long __result) public static void nclang_getNullRange(long __result)
Unsafe version of:getNullRange
-
clang_getNullRange
public static CXSourceRange clang_getNullRange(CXSourceRange __result)
Retrieve aNULL
(invalid) source range.
-
nclang_getRange
public static void nclang_getRange(long begin, long end, long __functionAddress, long __result) public static void nclang_getRange(long begin, long end, long __result)
Unsafe version of:getRange
-
clang_getRange
public static CXSourceRange clang_getRange(CXSourceLocation begin, CXSourceLocation end, CXSourceRange __result)
Retrieve a source range given the beginning and ending source locations.
-
nclang_equalRanges
public static int nclang_equalRanges(long range1, long range2, long __functionAddress) public static int nclang_equalRanges(long range1, long range2)
Unsafe version of:equalRanges
-
clang_equalRanges
public static boolean clang_equalRanges(CXSourceRange range1, CXSourceRange range2)
Determine whether two ranges are equivalent.- Returns:
- non-zero if the ranges are the same, zero if they differ
-
nclang_Range_isNull
public static int nclang_Range_isNull(long range, long __functionAddress) public static int nclang_Range_isNull(long range)
Unsafe version of:Range_isNull
-
clang_Range_isNull
public static boolean clang_Range_isNull(CXSourceRange range)
Returns non-zero ifrange
is null.
-
nclang_getExpansionLocation
public static void nclang_getExpansionLocation(long location, long file, long line, long column, long offset, long __functionAddress) public static void nclang_getExpansionLocation(long location, long file, long line, long column, long offset)
Unsafe version of:getExpansionLocation
-
clang_getExpansionLocation
public static void clang_getExpansionLocation(CXSourceLocation location, @Nullable org.lwjgl.PointerBuffer file, @Nullable java.nio.IntBuffer line, @Nullable java.nio.IntBuffer column, @Nullable java.nio.IntBuffer offset)
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.
- Parameters:
location
- the location within a source file that will be decomposed into its partsfile
- [out] if non-NULL
, will be set to the file to which the given source location pointsline
- [out] if non-NULL
, will be set to the line to which the given source location pointscolumn
- [out] if non-NULL
, will be set to the column to which the given source location pointsoffset
- [out] if non-NULL
, will be set to the offset into the buffer to which the given source location points
-
nclang_getPresumedLocation
public static void nclang_getPresumedLocation(long location, long filename, long line, long column, long __functionAddress) public static void nclang_getPresumedLocation(long location, long filename, long line, long column)
Unsafe version of:getPresumedLocation
-
clang_getPresumedLocation
public static void clang_getPresumedLocation(CXSourceLocation location, @Nullable CXString.Buffer filename, @Nullable java.nio.IntBuffer line, @Nullable java.nio.IntBuffer column)
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
#123 "dummy.c" 1 static int func(void) { return 0; }
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
- Parameters:
location
- the location within a source file that will be decomposed into its partsfilename
- [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 usingclang_disposeString()
once you've finished with it. For an invalid source location, an empty string is returned.line
- [out] if non-NULL
, will be set to the line number of the source location. For an invalid source location, zero is returned.column
- [out] if non-NULL
, will be set to the column number of the source location. For an invalid source location, zero is returned.
-
nclang_getSpellingLocation
public static void nclang_getSpellingLocation(long location, long file, long line, long column, long offset, long __functionAddress) public static void nclang_getSpellingLocation(long location, long file, long line, long column, long offset)
Unsafe version of:getSpellingLocation
-
clang_getSpellingLocation
public static void clang_getSpellingLocation(CXSourceLocation location, @Nullable org.lwjgl.PointerBuffer file, @Nullable java.nio.IntBuffer line, @Nullable java.nio.IntBuffer column, @Nullable java.nio.IntBuffer 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.
- Parameters:
location
- the location within a source file that will be decomposed into its partsfile
- [out] if non-NULL
, will be set to the file to which the given source location pointsline
- [out] if non-NULL
, will be set to the line to which the given source location pointscolumn
- [out] if non-NULL
, will be set to the column to which the given source location pointsoffset
- [out] if non-NULL
, will be set to the offset into the buffer to which the given source location points
-
nclang_getFileLocation
public static void nclang_getFileLocation(long location, long file, long line, long column, long offset, long __functionAddress) public static void nclang_getFileLocation(long location, long file, long line, long column, long offset)
Unsafe version of:getFileLocation
-
clang_getFileLocation
public static void clang_getFileLocation(CXSourceLocation location, @Nullable org.lwjgl.PointerBuffer file, @Nullable java.nio.IntBuffer line, @Nullable java.nio.IntBuffer column, @Nullable java.nio.IntBuffer 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.
- Parameters:
location
- the location within a source file that will be decomposed into its partsfile
- [out] if non-NULL
, will be set to the file to which the given source location pointsline
- [out] if non-NULL
, will be set to the line to which the given source location pointscolumn
- [out] if non-NULL
, will be set to the column to which the given source location pointsoffset
- [out] if non-NULL
, will be set to the offset into the buffer to which the given source location points
-
nclang_getRangeStart
public static void nclang_getRangeStart(long range, long __functionAddress, long __result) public static void nclang_getRangeStart(long range, long __result)
Unsafe version of:getRangeStart
-
clang_getRangeStart
public static CXSourceLocation clang_getRangeStart(CXSourceRange range, CXSourceLocation __result)
Retrieve a source location representing the first character within a source range.
-
nclang_getRangeEnd
public static void nclang_getRangeEnd(long range, long __functionAddress, long __result) public static void nclang_getRangeEnd(long range, long __result)
Unsafe version of:getRangeEnd
-
clang_getRangeEnd
public static CXSourceLocation clang_getRangeEnd(CXSourceRange range, CXSourceLocation __result)
Retrieve a source location representing the last character within a source range.
-
nclang_getSkippedRanges
public static long nclang_getSkippedRanges(long tu, long file)
Unsafe version of:getSkippedRanges
-
clang_getSkippedRanges
@Nullable public static CXSourceRangeList clang_getSkippedRanges(long tu, long file)
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.
-
nclang_getAllSkippedRanges
public static long nclang_getAllSkippedRanges(long tu)
Unsafe version of:getAllSkippedRanges
-
clang_getAllSkippedRanges
@Nullable public static CXSourceRangeList clang_getAllSkippedRanges(long tu)
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.
-
nclang_disposeSourceRangeList
public static void nclang_disposeSourceRangeList(long ranges)
Unsafe version of:disposeSourceRangeList
-
clang_disposeSourceRangeList
public static void clang_disposeSourceRangeList(CXSourceRangeList ranges)
Destroy the givenCXSourceRangeList
.
-
clang_getNumDiagnosticsInSet
public static int clang_getNumDiagnosticsInSet(long Diags)
Determine the number of diagnostics in aCXDiagnosticSet
.
-
clang_getDiagnosticInSet
public static long clang_getDiagnosticInSet(long Diags, int Index)
Retrieve a diagnostic associated with the givenCXDiagnosticSet
.- Parameters:
Diags
- theCXDiagnosticSet
to queryIndex
- the zero-based diagnostic number to retrieve- Returns:
- the requested diagnostic. This diagnostic must be freed via a call to
disposeDiagnostic
.
-
nclang_loadDiagnostics
public static long nclang_loadDiagnostics(long file, long error, long errorString)
Unsafe version of:loadDiagnostics
-
clang_loadDiagnostics
public static long clang_loadDiagnostics(java.nio.ByteBuffer file, java.nio.IntBuffer error, CXString errorString) public static long clang_loadDiagnostics(java.lang.CharSequence file, java.nio.IntBuffer error, CXString errorString)
Deserialize a set of diagnostics from a Clang diagnostics bitcode file.- Parameters:
file
- the name of the file to deserializeerror
- a pointer to a enum value recording if there was a problem deserializing the diagnosticserrorString
- a pointer to aCXString
for recording the error string if the file was not successfully loaded- Returns:
- a loaded
CXDiagnosticSet
if successful, andNULL
otherwise. These diagnostics should be released usingdisposeDiagnosticSet
.
-
clang_disposeDiagnosticSet
public static void clang_disposeDiagnosticSet(long Diags)
Release aCXDiagnosticSet
and all of its contained diagnostics.
-
clang_getChildDiagnostics
public static long clang_getChildDiagnostics(long D)
Retrieve the child diagnostics of aCXDiagnostic
.This
CXDiagnosticSet
does not need to be released bydisposeDiagnosticSet
.
-
clang_getNumDiagnostics
public static int clang_getNumDiagnostics(long Unit)
Determine the number of diagnostics produced for the given translation unit.
-
clang_getDiagnostic
public static long clang_getDiagnostic(long Unit, int Index)
Retrieve a diagnostic associated with the given translation unit.- Parameters:
Unit
- the translation unit to queryIndex
- the zero-based diagnostic number to retrieve- Returns:
- the requested diagnostic. This diagnostic must be freed via a call to
disposeDiagnostic
.
-
clang_getDiagnosticSetFromTU
public static long clang_getDiagnosticSetFromTU(long Unit)
Retrieve the complete set of diagnostics associated with a translation unit.- Parameters:
Unit
- the translation unit to query
-
clang_disposeDiagnostic
public static void clang_disposeDiagnostic(long Diagnostic)
Destroy a diagnostic.
-
nclang_formatDiagnostic
public static void nclang_formatDiagnostic(long Diagnostic, int Options, long __functionAddress, long __result) public static void nclang_formatDiagnostic(long Diagnostic, int Options, long __result)
Unsafe version of:formatDiagnostic
-
clang_formatDiagnostic
public static CXString clang_formatDiagnostic(long Diagnostic, int Options, CXString __result)
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
defaultDiagnosticDisplayOptions
function returns the set of options that most closely mimics the behavior of the clang compiler.- Parameters:
Diagnostic
- the diagnostic to printOptions
- a set of options that control the diagnostic display, created by combiningCXDiagnosticDisplayOptions
values__result
- a new string containing for formatted diagnostic
-
clang_defaultDiagnosticDisplayOptions
public static int clang_defaultDiagnosticDisplayOptions()
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
formatDiagnostic
-
clang_getDiagnosticSeverity
public static int clang_getDiagnosticSeverity(long Diagnostic)
Determine the severity of the given diagnostic.
-
nclang_getDiagnosticLocation
public static void nclang_getDiagnosticLocation(long Diagnostic, long __functionAddress, long __result) public static void nclang_getDiagnosticLocation(long Diagnostic, long __result)
Unsafe version of:getDiagnosticLocation
-
clang_getDiagnosticLocation
public static CXSourceLocation clang_getDiagnosticLocation(long Diagnostic, CXSourceLocation __result)
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.
-
nclang_getDiagnosticSpelling
public static void nclang_getDiagnosticSpelling(long Diagnostic, long __functionAddress, long __result) public static void nclang_getDiagnosticSpelling(long Diagnostic, long __result)
Unsafe version of:getDiagnosticSpelling
-
clang_getDiagnosticSpelling
public static CXString clang_getDiagnosticSpelling(long Diagnostic, CXString __result)
Retrieve the text of the given diagnostic.
-
nclang_getDiagnosticOption
public static void nclang_getDiagnosticOption(long Diag, long Disable, long __functionAddress, long __result) public static void nclang_getDiagnosticOption(long Diag, long Disable, long __result)
Unsafe version of:getDiagnosticOption
-
clang_getDiagnosticOption
public static CXString clang_getDiagnosticOption(long Diag, @Nullable CXString Disable, CXString __result)
Retrieve the name of the command-line option that enabled this diagnostic.- Parameters:
Diag
- the diagnostic to be queriedDisable
- if non-NULL
, will be set to the option that disables this diagnostic (if any)__result
- a string that contains the command-line option used to enable this warning, such as "-Wconversion" or "-pedantic"
-
clang_getDiagnosticCategory
public static int clang_getDiagnosticCategory(long Diagnostic)
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
-
nclang_getDiagnosticCategoryText
public static void nclang_getDiagnosticCategoryText(long Diagnostic, long __functionAddress, long __result) public static void nclang_getDiagnosticCategoryText(long Diagnostic, long __result)
Unsafe version of:getDiagnosticCategoryText
-
clang_getDiagnosticCategoryText
public static CXString clang_getDiagnosticCategoryText(long Diagnostic, CXString __result)
Retrieve the diagnostic category text for a given diagnostic.- Parameters:
__result
- the text of the given diagnostic category
-
clang_getDiagnosticNumRanges
public static int clang_getDiagnosticNumRanges(long Diagnostic)
Determine the number of source ranges associated with the given diagnostic.
-
nclang_getDiagnosticRange
public static void nclang_getDiagnosticRange(long Diagnostic, int Range, long __functionAddress, long __result) public static void nclang_getDiagnosticRange(long Diagnostic, int Range, long __result)
Unsafe version of:getDiagnosticRange
-
clang_getDiagnosticRange
public static CXSourceRange clang_getDiagnosticRange(long Diagnostic, int Range, CXSourceRange __result)
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.
- Parameters:
Diagnostic
- the diagnostic whose range is being extractedRange
- the zero-based index specifying which range to__result
- the requested source range
-
clang_getDiagnosticNumFixIts
public static int clang_getDiagnosticNumFixIts(long Diagnostic)
Determine the number of fix-it hints associated with the given diagnostic.
-
nclang_getDiagnosticFixIt
public static void nclang_getDiagnosticFixIt(long Diagnostic, int FixIt, long ReplacementRange, long __functionAddress, long __result) public static void nclang_getDiagnosticFixIt(long Diagnostic, int FixIt, long ReplacementRange, long __result)
Unsafe version of:getDiagnosticFixIt
-
clang_getDiagnosticFixIt
public static CXString clang_getDiagnosticFixIt(long Diagnostic, int FixIt, CXSourceRange ReplacementRange, CXString __result)
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).
- Parameters:
Diagnostic
- the diagnostic whose fix-its are being queriedFixIt
- the zero-based index of the fix-itReplacementRange
- 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.__result
- a string containing text that should be replace the source code indicated by theReplacementRange
-
nclang_getTranslationUnitSpelling
public static void nclang_getTranslationUnitSpelling(long CTUnit, long __functionAddress, long __result) public static void nclang_getTranslationUnitSpelling(long CTUnit, long __result)
Unsafe version of:getTranslationUnitSpelling
-
clang_getTranslationUnitSpelling
public static CXString clang_getTranslationUnitSpelling(long CTUnit, CXString __result)
Get the original translation unit source file name.
-
nclang_createTranslationUnitFromSourceFile
public static long nclang_createTranslationUnitFromSourceFile(long CIdx, long source_filename, int num_clang_command_line_args, long clang_command_line_args, int num_unsaved_files, long unsaved_files)
Unsafe version of:createTranslationUnitFromSourceFile
- Parameters:
num_clang_command_line_args
- the number of command-line arguments inclang_command_line_args
num_unsaved_files
- the number of unsaved file entries inunsaved_files
-
clang_createTranslationUnitFromSourceFile
public static long clang_createTranslationUnitFromSourceFile(long CIdx, @Nullable java.nio.ByteBuffer source_filename, @Nullable org.lwjgl.PointerBuffer clang_command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files) public static long clang_createTranslationUnitFromSourceFile(long CIdx, @Nullable java.lang.CharSequence source_filename, @Nullable org.lwjgl.PointerBuffer clang_command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files)
Return theCXTranslationUnit
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 aNULL
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 <output file>' (both '-o' and ' <output file>' are ignored)
- Parameters:
CIdx
- the index object with which the translation unit will be associatedsource_filename
- the name of the source file to load, orNULL
if the source file is included inclang_command_line_args
clang_command_line_args
- the command-line arguments that would be passed to theclang
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 <output file>'.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 byCXUnsavedFile
) are copied when necessary, so the client only needs to guarantee their validity until the call to this function returns.
-
nclang_createTranslationUnit
public static long nclang_createTranslationUnit(long CIdx, long ast_filename)
Unsafe version of:createTranslationUnit
-
clang_createTranslationUnit
public static long clang_createTranslationUnit(long CIdx, java.nio.ByteBuffer ast_filename) public static long clang_createTranslationUnit(long CIdx, java.lang.CharSequence ast_filename)
Same ascreateTranslationUnit2
, but returns theCXTranslationUnit
instead of an error code. In case of an error this routine returns aNULL
CXTranslationUnit
, without further detailed error codes.
-
nclang_createTranslationUnit2
public static int nclang_createTranslationUnit2(long CIdx, long ast_filename, long out_TU)
Unsafe version of:createTranslationUnit2
-
clang_createTranslationUnit2
public static int clang_createTranslationUnit2(long CIdx, java.nio.ByteBuffer ast_filename, org.lwjgl.PointerBuffer out_TU) public static int clang_createTranslationUnit2(long CIdx, java.lang.CharSequence ast_filename, org.lwjgl.PointerBuffer out_TU)
Create a translation unit from an AST file (-emit-ast
).- Parameters:
out_TU
- a non-NULL
pointer to store the createdCXTranslationUnit
- Returns:
- zero on success, otherwise returns an error code
-
clang_defaultEditingTranslationUnitOptions
public static int clang_defaultEditingTranslationUnitOptions()
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
parseTranslationUnit
to indicate that the translation unit is likely to be reparsed many times, either explicitly (viareparseTranslationUnit
) or implicitly (e.g., by code completion (codeCompleteAt
). 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.
-
nclang_parseTranslationUnit
public static long nclang_parseTranslationUnit(long CIdx, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, int options)
Unsafe version of:parseTranslationUnit
-
clang_parseTranslationUnit
public static long clang_parseTranslationUnit(long CIdx, @Nullable java.nio.ByteBuffer source_filename, @Nullable org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, int options) public static long clang_parseTranslationUnit(long CIdx, @Nullable java.lang.CharSequence source_filename, @Nullable org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, int options)
Same asparseTranslationUnit2
, but returns theCXTranslationUnit
instead of an error code. In case of an error this routine returns aNULL
CXTranslationUnit
, without further detailed error codes.
-
nclang_parseTranslationUnit2
public static int nclang_parseTranslationUnit2(long CIdx, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, int options, long out_TU)
Unsafe version of:parseTranslationUnit2
- Parameters:
num_command_line_args
- the number of command-line arguments incommand_line_args
num_unsaved_files
- the number of unsaved file entries inunsaved_files
-
clang_parseTranslationUnit2
public static int clang_parseTranslationUnit2(long CIdx, @Nullable java.nio.ByteBuffer source_filename, @Nullable org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU) public static int clang_parseTranslationUnit2(long CIdx, @Nullable java.lang.CharSequence source_filename, @Nullable org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer 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.
- Parameters:
CIdx
- the index object with which the translation unit will be associatedsource_filename
- the name of the source file to load, orNULL
if the source file is included incommand_line_args
command_line_args
- the command-line arguments that would be passed to theclang
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 <output file>'.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.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.out_TU
- a non-NULL
pointer to store the createdCXTranslationUnit
, describing the parsed code and containing any diagnostics produced by the compiler- Returns:
- zero on success, otherwise returns an error code
-
nclang_parseTranslationUnit2FullArgv
public static int nclang_parseTranslationUnit2FullArgv(long CIdx, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, int options, long out_TU)
Unsafe version of:parseTranslationUnit2FullArgv
-
clang_parseTranslationUnit2FullArgv
public static int clang_parseTranslationUnit2FullArgv(long CIdx, @Nullable java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU) public static int clang_parseTranslationUnit2FullArgv(long CIdx, @Nullable java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, int options, org.lwjgl.PointerBuffer out_TU)
Same asparseTranslationUnit2
but requires a full command line forcommand_line_args
includingargv[0]
. This is useful if the standard library paths are relative to the binary.
-
clang_defaultSaveOptions
public static int clang_defaultSaveOptions(long TU)
Returns the set of flags that is suitable for saving a translation unit.The set of flags returned provide options for
saveTranslationUnit
by default. The returned flag set contains an unspecified set of options that save translation units with the most commonly-requested data.
-
nclang_saveTranslationUnit
public static int nclang_saveTranslationUnit(long TU, long FileName, int options)
Unsafe version of:saveTranslationUnit
-
clang_saveTranslationUnit
public static int clang_saveTranslationUnit(long TU, java.nio.ByteBuffer FileName, int options) public static int clang_saveTranslationUnit(long TU, java.lang.CharSequence FileName, int options)
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
CXTranslationUnit
withcreateTranslationUnit
or, if it is an incomplete translation unit that corresponds to a header, used as a precompiled header when parsing other translation units.- Parameters:
TU
- the translation unit to saveFileName
- the file to which the translation unit will be savedoptions
- a bitmask of options that affects how the translation unit is saved. This should be a bitwise OR of theCXSaveTranslationUnit_XXX
flags.- Returns:
- a value that will match one of the enumerators of the
CXSaveError
enumeration. Zero (SaveError_None
) indicates that the translation unit was saved successfully, while a non-zero value indicates that a problem occurred.
-
clang_suspendTranslationUnit
public static boolean clang_suspendTranslationUnit(long 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
reparseTranslationUnit
to resume it ordisposeTranslationUnit
to dispose it completely.
-
clang_disposeTranslationUnit
public static void clang_disposeTranslationUnit(long TU)
Destroy the specified CXTranslationUnit object.
-
clang_defaultReparseOptions
public static int clang_defaultReparseOptions(long TU)
Returns the set of flags that is suitable for reparsing a translation unit.The set of flags returned provide options for
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.
-
nclang_reparseTranslationUnit
public static int nclang_reparseTranslationUnit(long TU, int num_unsaved_files, long unsaved_files, int options)
Unsafe version of:reparseTranslationUnit
- Parameters:
num_unsaved_files
- the number of unsaved file entries inunsaved_files
-
clang_reparseTranslationUnit
public static int clang_reparseTranslationUnit(long TU, @Nullable CXUnsavedFile.Buffer unsaved_files, int options)
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
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.
- Parameters:
TU
- the translation unit whose contents will be re-parsed. The translation unit must originally have been built withclang_createTranslationUnitFromSourceFile()
.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 byCXUnsavedFile
) are copied when necessary, so the client only needs to guarantee their validity until the call to this function returns.options
- a bitset of options composed of the flags inCXReparse_Flags
. The functiondefaultReparseOptions
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
TU
isdisposeTranslationUnit
. The error codes returned by this routine are described by theCXErrorCode
enum.
-
nclang_getTUResourceUsageName
public static long nclang_getTUResourceUsageName(int kind)
Unsafe version of:getTUResourceUsageName
-
clang_getTUResourceUsageName
@Nullable public static java.lang.String clang_getTUResourceUsageName(int kind)
Returns the human-readable null-terminated C string that represents the name of the memory category. This string should never be freed.
-
nclang_getCXTUResourceUsage
public static void nclang_getCXTUResourceUsage(long TU, long __functionAddress, long __result) public static void nclang_getCXTUResourceUsage(long TU, long __result)
Unsafe version of:getCXTUResourceUsage
-
clang_getCXTUResourceUsage
public static CXTUResourceUsage clang_getCXTUResourceUsage(long TU, CXTUResourceUsage __result)
Return the memory usage of a translation unit. This object should be released withdisposeCXTUResourceUsage
.
-
nclang_disposeCXTUResourceUsage
public static void nclang_disposeCXTUResourceUsage(long usage, long __functionAddress)
-
nclang_disposeCXTUResourceUsage
public static void nclang_disposeCXTUResourceUsage(long usage)
-
clang_disposeCXTUResourceUsage
public static void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage)
-
clang_getTranslationUnitTargetInfo
public static long clang_getTranslationUnitTargetInfo(long CTUnit)
Get target information for this translation unit.The
CXTargetInfo
object cannot outlive theCXTranslationUnit
object.
-
clang_TargetInfo_dispose
public static void clang_TargetInfo_dispose(long Info)
Destroy theCXTargetInfo
object.
-
nclang_TargetInfo_getTriple
public static void nclang_TargetInfo_getTriple(long Info, long __functionAddress, long __result) public static void nclang_TargetInfo_getTriple(long Info, long __result)
Unsafe version of:TargetInfo_getTriple
-
clang_TargetInfo_getTriple
public static CXString clang_TargetInfo_getTriple(long Info, CXString __result)
Get the normalized target triple as a string.Returns the empty string in case of any error.
-
clang_TargetInfo_getPointerWidth
public static int clang_TargetInfo_getPointerWidth(long Info)
Get the pointer width of the target in bits.Returns -1 in case of error.
-
nclang_getNullCursor
public static void nclang_getNullCursor(long __functionAddress, long __result) public static void nclang_getNullCursor(long __result)
Unsafe version of:getNullCursor
-
clang_getNullCursor
public static CXCursor clang_getNullCursor(CXCursor __result)
Retrieve theNULL
cursor, which represents no entity.
-
nclang_getTranslationUnitCursor
public static void nclang_getTranslationUnitCursor(long TU, long __functionAddress, long __result) public static void nclang_getTranslationUnitCursor(long TU, long __result)
Unsafe version of:getTranslationUnitCursor
-
clang_getTranslationUnitCursor
public static CXCursor clang_getTranslationUnitCursor(long TU, CXCursor __result)
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.
-
nclang_equalCursors
public static int nclang_equalCursors(long A, long B, long __functionAddress) public static int nclang_equalCursors(long A, long B)
Unsafe version of:equalCursors
-
clang_equalCursors
public static boolean clang_equalCursors(CXCursor A, CXCursor B)
Determine whether two cursors are equivalent.
-
nclang_Cursor_isNull
public static int nclang_Cursor_isNull(long cursor, long __functionAddress) public static int nclang_Cursor_isNull(long cursor)
Unsafe version of:Cursor_isNull
-
clang_Cursor_isNull
public static boolean clang_Cursor_isNull(CXCursor cursor)
Returns non-zero ifcursor
is null.
-
nclang_hashCursor
public static int nclang_hashCursor(long cursor, long __functionAddress) public static int nclang_hashCursor(long cursor)
Unsafe version of:hashCursor
-
clang_hashCursor
public static int clang_hashCursor(CXCursor cursor)
Compute a hash value for the given cursor.
-
nclang_getCursorKind
public static int nclang_getCursorKind(long cursor, long __functionAddress) public static int nclang_getCursorKind(long cursor)
Unsafe version of:getCursorKind
-
clang_getCursorKind
public static int clang_getCursorKind(CXCursor cursor)
Retrieve the kind of the given cursor.
-
clang_isDeclaration
public static boolean clang_isDeclaration(int kind)
Determine whether the given cursor kind represents a declaration.
-
nclang_isInvalidDeclaration
public static int nclang_isInvalidDeclaration(long cursor, long __functionAddress) public static int nclang_isInvalidDeclaration(long cursor)
Unsafe version of:isInvalidDeclaration
-
clang_isInvalidDeclaration
public static boolean clang_isInvalidDeclaration(CXCursor cursor)
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
-
clang_isReference
public static boolean clang_isReference(int kind)
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
getCursorReferenced
to determine whether a particular cursor refers to another entity.
-
clang_isExpression
public static boolean clang_isExpression(int kind)
Determine whether the given cursor kind represents an expression.
-
clang_isStatement
public static boolean clang_isStatement(int kind)
Determine whether the given cursor kind represents a statement.
-
clang_isAttribute
public static boolean clang_isAttribute(int kind)
Determine whether the given cursor kind represents an attribute.
-
nclang_Cursor_hasAttrs
public static int nclang_Cursor_hasAttrs(long C, long __functionAddress) public static int nclang_Cursor_hasAttrs(long C)
Unsafe version of:Cursor_hasAttrs
-
clang_Cursor_hasAttrs
public static boolean clang_Cursor_hasAttrs(CXCursor C)
Determine whether the given cursor has any attributes.
-
clang_isInvalid
public static boolean clang_isInvalid(int kind)
Determine whether the given cursor kind represents an invalid cursor.
-
clang_isTranslationUnit
public static boolean clang_isTranslationUnit(int kind)
Determine whether the given cursor kind represents a translation unit.
-
clang_isPreprocessing
public static boolean clang_isPreprocessing(int kind)
Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.
-
clang_isUnexposed
public static boolean clang_isUnexposed(int kind)
Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
-
nclang_getCursorLinkage
public static int nclang_getCursorLinkage(long cursor, long __functionAddress) public static int nclang_getCursorLinkage(long cursor)
Unsafe version of:getCursorLinkage
-
clang_getCursorLinkage
public static int clang_getCursorLinkage(CXCursor cursor)
Determine the linkage of the entity referred to by a given cursor.
-
nclang_getCursorVisibility
public static int nclang_getCursorVisibility(long cursor, long __functionAddress) public static int nclang_getCursorVisibility(long cursor)
Unsafe version of:getCursorVisibility
-
clang_getCursorVisibility
public static int clang_getCursorVisibility(CXCursor cursor)
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.
- Parameters:
cursor
- the cursor to query- Returns:
- the visibility of the cursor
-
nclang_getCursorAvailability
public static int nclang_getCursorAvailability(long cursor, long __functionAddress) public static int nclang_getCursorAvailability(long cursor)
Unsafe version of:getCursorAvailability
-
clang_getCursorAvailability
public static int clang_getCursorAvailability(CXCursor cursor)
Determine the availability of the entity that this cursor refers to, taking the current target platform into account.- Parameters:
cursor
- the cursor to query- Returns:
- the availability of the cursor
-
nclang_getCursorPlatformAvailability
public static int nclang_getCursorPlatformAvailability(long cursor, long always_deprecated, long deprecated_message, long always_unavailable, long unavailable_message, long availability, int availability_size, long __functionAddress) public static int nclang_getCursorPlatformAvailability(long cursor, long always_deprecated, long deprecated_message, long always_unavailable, long unavailable_message, long availability, int availability_size)
Unsafe version of:getCursorPlatformAvailability
- Parameters:
availability_size
- the number of elements available in theavailability
array
-
clang_getCursorPlatformAvailability
public static int clang_getCursorPlatformAvailability(CXCursor cursor, @Nullable java.nio.IntBuffer always_deprecated, @Nullable CXString deprecated_message, @Nullable java.nio.IntBuffer always_unavailable, @Nullable CXString unavailable_message, @Nullable CXPlatformAvailability.Buffer availability)
Determine the availability of the entity that this cursor refers to on any platforms for which availability information is known.Note that the client is responsible for calling
disposeCXPlatformAvailability
to free each of the platform-availability structures returned. There aremin(N, availability_size)
such structures.- Parameters:
cursor
- the cursor to queryalways_deprecated
- if non-NULL
, will be set to indicate whether the entity is deprecated on all platformsdeprecated_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.always_unavailable
- if non-NULL
, will be set to indicate whether the entity is unavailable on all platformsunavailable_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.availability
- if non-NULL
, an array ofCXPlatformAvailability
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) oravailability_size
, whichever is smaller- Returns:
- the number of platforms (N) for which availability information is available (which is unrelated to
availability_size
)
-
nclang_disposeCXPlatformAvailability
public static void nclang_disposeCXPlatformAvailability(long availability)
Unsafe version of:disposeCXPlatformAvailability
-
clang_disposeCXPlatformAvailability
public static void clang_disposeCXPlatformAvailability(CXPlatformAvailability availability)
Free the memory associated with aCXPlatformAvailability
structure.
-
nclang_getCursorLanguage
public static int nclang_getCursorLanguage(long cursor, long __functionAddress) public static int nclang_getCursorLanguage(long cursor)
Unsafe version of:getCursorLanguage
-
clang_getCursorLanguage
public static int clang_getCursorLanguage(CXCursor cursor)
Determine the "language" of the entity referred to by a given cursor.
-
nclang_getCursorTLSKind
public static int nclang_getCursorTLSKind(long cursor, long __functionAddress) public static int nclang_getCursorTLSKind(long cursor)
Unsafe version of:getCursorTLSKind
-
clang_getCursorTLSKind
public static int clang_getCursorTLSKind(CXCursor cursor)
Determine the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.
-
nclang_Cursor_getTranslationUnit
public static long nclang_Cursor_getTranslationUnit(long cursor, long __functionAddress) public static long nclang_Cursor_getTranslationUnit(long cursor)
Unsafe version of:Cursor_getTranslationUnit
-
clang_Cursor_getTranslationUnit
public static long clang_Cursor_getTranslationUnit(CXCursor cursor)
Returns the translation unit that a cursor originated from.
-
clang_createCXCursorSet
public static long clang_createCXCursorSet()
Creates an empty CXCursorSet.
-
clang_disposeCXCursorSet
public static void clang_disposeCXCursorSet(long cset)
Disposes a CXCursorSet and releases its associated memory.
-
nclang_CXCursorSet_contains
public static int nclang_CXCursorSet_contains(long cset, long cursor, long __functionAddress) public static int nclang_CXCursorSet_contains(long cset, long cursor)
Unsafe version of:CXCursorSet_contains
-
clang_CXCursorSet_contains
public static boolean clang_CXCursorSet_contains(long cset, CXCursor cursor)
Queries a CXCursorSet to see if it contains a specific CXCursor.- Returns:
- non-zero if the set contains the specified cursor
-
nclang_CXCursorSet_insert
public static int nclang_CXCursorSet_insert(long cset, long cursor, long __functionAddress) public static int nclang_CXCursorSet_insert(long cset, long cursor)
Unsafe version of:CXCursorSet_insert
-
clang_CXCursorSet_insert
public static boolean clang_CXCursorSet_insert(long cset, CXCursor cursor)
Inserts a CXCursor into a CXCursorSet.- Returns:
- zero if the CXCursor was already in the set, and non-zero otherwise
-
nclang_getCursorSemanticParent
public static void nclang_getCursorSemanticParent(long cursor, long __functionAddress, long __result) public static void nclang_getCursorSemanticParent(long cursor, long __result)
Unsafe version of:getCursorSemanticParent
-
clang_getCursorSemanticParent
public static CXCursor clang_getCursorSemanticParent(CXCursor cursor, CXCursor __result)
Determine the semantic parent of the given cursor.The semantic parent of a cursor is the cursor that semantically contains the given
cursor
. For many declarations, the lexical and semantic parents are equivalent (the lexical parent is returned bygetCursorLexicalParent
). They diverge when declarations or definitions are provided out-of-line. For example:class C { void f(); }; void C::f() { }
In the out-of-line definition of
C::f
, the semantic parent is the classC
, 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::f
haveC
as their semantic context, while the lexical context of the firstC::f
isC
and the lexical context of the secondC::f
is the translation unit.For global declarations, the semantic parent is the translation unit.
-
nclang_getCursorLexicalParent
public static void nclang_getCursorLexicalParent(long cursor, long __functionAddress, long __result) public static void nclang_getCursorLexicalParent(long cursor, long __result)
Unsafe version of:getCursorLexicalParent
-
clang_getCursorLexicalParent
public static CXCursor clang_getCursorLexicalParent(CXCursor cursor, CXCursor __result)
Determine the lexical parent of the given cursor.The lexical parent of a cursor is the cursor in which the given
cursor
was actually written. For many declarations, the lexical and semantic parents are equivalent (the semantic parent is returned bygetCursorSemanticParent
). They diverge when declarations or definitions are provided out-of-line. For example:class C { void f(); }; void C::f() { }
In the out-of-line definition of
C::f
, the semantic parent is the classC
, 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::f
haveC
as their semantic context, while the lexical context of the firstC::f
isC
and the lexical context of the secondC::f
is the translation unit.For declarations written in the global scope, the lexical parent is the translation unit.
-
nclang_getOverriddenCursors
public static void nclang_getOverriddenCursors(long cursor, long overridden, long num_overridden, long __functionAddress) public static void nclang_getOverriddenCursors(long cursor, long overridden, long num_overridden)
Unsafe version of:getOverriddenCursors
-
clang_getOverriddenCursors
public static void clang_getOverriddenCursors(CXCursor cursor, org.lwjgl.PointerBuffer overridden, java.nio.IntBuffer num_overridden)
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.
- Parameters:
cursor
- a cursor representing an Objective-C or C++ method. This routine will compute the set of methods that this method overrides.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 toNULL
. The pointee must be freed via a call todisposeOverriddenCursors
.num_overridden
- a pointer to the number of overridden functions, will be set to the number of overridden functions in the array pointed to byoverridden
-
nclang_disposeOverriddenCursors
public static void nclang_disposeOverriddenCursors(long overridden)
Unsafe version of:disposeOverriddenCursors
-
clang_disposeOverriddenCursors
public static void clang_disposeOverriddenCursors(CXCursor.Buffer overridden)
Free the set of overridden cursors returned byclang_getOverriddenCursors()
.
-
nclang_getIncludedFile
public static long nclang_getIncludedFile(long cursor, long __functionAddress) public static long nclang_getIncludedFile(long cursor)
Unsafe version of:getIncludedFile
-
clang_getIncludedFile
public static long clang_getIncludedFile(CXCursor cursor)
Retrieve the file that is included by the given inclusion directive cursor.
-
nclang_getCursor
public static void nclang_getCursor(long TU, long location, long __functionAddress, long __result) public static void nclang_getCursor(long TU, long location, long __result)
Unsafe version of:getCursor
-
clang_getCursor
public static CXCursor clang_getCursor(long TU, CXSourceLocation location, CXCursor __result)
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 expressionx + y
, invokingclang_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.- Parameters:
__result
- a cursor representing the entity at the given source location, or aNULL
cursor if no such entity can be found
-
nclang_getCursorLocation
public static void nclang_getCursorLocation(long cursor, long __functionAddress, long __result) public static void nclang_getCursorLocation(long cursor, long __result)
Unsafe version of:getCursorLocation
-
clang_getCursorLocation
public static CXSourceLocation clang_getCursorLocation(CXCursor cursor, CXSourceLocation __result)
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.
-
nclang_getCursorExtent
public static void nclang_getCursorExtent(long cursor, long __functionAddress, long __result) public static void nclang_getCursorExtent(long cursor, long __result)
Unsafe version of:getCursorExtent
-
clang_getCursorExtent
public static CXSourceRange clang_getCursorExtent(CXCursor cursor, CXSourceRange __result)
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).
-
nclang_getCursorType
public static void nclang_getCursorType(long C, long __functionAddress, long __result) public static void nclang_getCursorType(long C, long __result)
Unsafe version of:getCursorType
-
clang_getCursorType
public static CXType clang_getCursorType(CXCursor C, CXType __result)
Retrieve the type of aCXCursor
(if any).
-
nclang_getTypeSpelling
public static void nclang_getTypeSpelling(long CT, long __functionAddress, long __result) public static void nclang_getTypeSpelling(long CT, long __result)
Unsafe version of:getTypeSpelling
-
clang_getTypeSpelling
public static CXString clang_getTypeSpelling(CXType CT, CXString __result)
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.
-
nclang_getTypedefDeclUnderlyingType
public static void nclang_getTypedefDeclUnderlyingType(long C, long __functionAddress, long __result) public static void nclang_getTypedefDeclUnderlyingType(long C, long __result)
Unsafe version of:getTypedefDeclUnderlyingType
-
clang_getTypedefDeclUnderlyingType
public static CXType clang_getTypedefDeclUnderlyingType(CXCursor C, CXType __result)
Retrieve the underlying type of a typedef declaration.If the cursor does not reference a typedef declaration, an invalid type is returned.
-
nclang_getEnumDeclIntegerType
public static void nclang_getEnumDeclIntegerType(long C, long __functionAddress, long __result) public static void nclang_getEnumDeclIntegerType(long C, long __result)
Unsafe version of:getEnumDeclIntegerType
-
clang_getEnumDeclIntegerType
public static CXType clang_getEnumDeclIntegerType(CXCursor C, CXType __result)
Retrieve the integer type of an enum declaration.If the cursor does not reference an enum declaration, an invalid type is returned.
-
nclang_getEnumConstantDeclValue
public static long nclang_getEnumConstantDeclValue(long C, long __functionAddress) public static long nclang_getEnumConstantDeclValue(long C)
Unsafe version of:getEnumConstantDeclValue
-
clang_getEnumConstantDeclValue
public static long clang_getEnumConstantDeclValue(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.
-
nclang_getEnumConstantDeclUnsignedValue
public static long nclang_getEnumConstantDeclUnsignedValue(long C, long __functionAddress) public static long nclang_getEnumConstantDeclUnsignedValue(long C)
Unsafe version of:getEnumConstantDeclUnsignedValue
-
clang_getEnumConstantDeclUnsignedValue
public static long clang_getEnumConstantDeclUnsignedValue(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.
-
nclang_getFieldDeclBitWidth
public static int nclang_getFieldDeclBitWidth(long C, long __functionAddress) public static int nclang_getFieldDeclBitWidth(long C)
Unsafe version of:getFieldDeclBitWidth
-
clang_getFieldDeclBitWidth
public static int clang_getFieldDeclBitWidth(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.
-
nclang_Cursor_getNumArguments
public static int nclang_Cursor_getNumArguments(long C, long __functionAddress) public static int nclang_Cursor_getNumArguments(long C)
Unsafe version of:Cursor_getNumArguments
-
clang_Cursor_getNumArguments
public static int clang_Cursor_getNumArguments(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.
-
nclang_Cursor_getArgument
public static void nclang_Cursor_getArgument(long C, int i, long __functionAddress, long __result) public static void nclang_Cursor_getArgument(long C, int i, long __result)
Unsafe version of:Cursor_getArgument
-
clang_Cursor_getArgument
public static CXCursor clang_Cursor_getArgument(CXCursor C, int i, CXCursor __result)
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.
-
nclang_Cursor_getNumTemplateArguments
public static int nclang_Cursor_getNumTemplateArguments(long C, long __functionAddress) public static int nclang_Cursor_getNumTemplateArguments(long C)
Unsafe version of:Cursor_getNumTemplateArguments
-
clang_Cursor_getNumTemplateArguments
public static int clang_Cursor_getNumTemplateArguments(CXCursor C)
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 <typename T, int kInt, bool kBool> void foo() { ... } template <> void foo <float , -7, true>();
The value 3 would be returned from this call.
-
nclang_Cursor_getTemplateArgumentKind
public static int nclang_Cursor_getTemplateArgumentKind(long C, int I, long __functionAddress) public static int nclang_Cursor_getTemplateArgumentKind(long C, int I)
Unsafe version of:Cursor_getTemplateArgumentKind
-
clang_Cursor_getTemplateArgumentKind
public static int clang_Cursor_getTemplateArgumentKind(CXCursor C, int I)
Retrieve the kind of the I'th template argument of theCXCursor
C
.If the argument
CXCursor
does not represent aFunctionDecl
, an invalid template argument kind is returned.For example, for the following declaration and specialization:
template <typename T, int kInt, bool kBool> void foo() { ... } template <> void foo <float , -7, true>();
For I = 0, 1, and 2,
Type
,Integral
, andIntegral
will be returned, respectively.
-
nclang_Cursor_getTemplateArgumentType
public static void nclang_Cursor_getTemplateArgumentType(long C, int I, long __functionAddress, long __result) public static void nclang_Cursor_getTemplateArgumentType(long C, int I, long __result)
Unsafe version of:Cursor_getTemplateArgumentType
-
clang_Cursor_getTemplateArgumentType
public static CXType clang_Cursor_getTemplateArgumentType(CXCursor C, int I, CXType __result)
Retrieve aCXType
representing the type of aTemplateArgument
of a function decl representing a template specialization.If the argument
CXCursor does
not represent aFunctionDecl
whoseI
'th template argument has a kind ofCXTemplateArgKind_Integral
, an invalid type is returned.For example, for the following declaration and specialization:
template <typename T, int kInt, bool kBool> void foo() { ... } template <> void foo <float , -7, true>();
If called with I = 0, "float", will be returned. Invalid types will be returned for I == 1 or 2.
-
nclang_Cursor_getTemplateArgumentValue
public static long nclang_Cursor_getTemplateArgumentValue(long C, int I, long __functionAddress) public static long nclang_Cursor_getTemplateArgumentValue(long C, int I)
Unsafe version of:Cursor_getTemplateArgumentValue
-
clang_Cursor_getTemplateArgumentValue
public static long clang_Cursor_getTemplateArgumentValue(CXCursor C, int I)
Retrieve the value of anIntegral
TemplateArgument
(of a function decl representing a template specialization) as asigned long long
.It is undefined to call this function on a
CXCursor
that does not represent aFunctionDecl
or whoseI
'th template argument is not an integral value.For example, for the following declaration and specialization:
template <typename T, int kInt, bool kBool> void foo() { ... } template <> void foo <float , -7, true>();
If called with I = 1 or 2, -7 or true will be returned, respectively. For I == 0, this function's behavior is undefined.
-
nclang_Cursor_getTemplateArgumentUnsignedValue
public static long nclang_Cursor_getTemplateArgumentUnsignedValue(long C, int I, long __functionAddress) public static long nclang_Cursor_getTemplateArgumentUnsignedValue(long C, int I)
Unsafe version of:Cursor_getTemplateArgumentUnsignedValue
-
clang_Cursor_getTemplateArgumentUnsignedValue
public static long clang_Cursor_getTemplateArgumentUnsignedValue(CXCursor C, int I)
Retrieve the value of anIntegral
TemplateArgument
(of a function decl representing a template specialization) as anunsigned long long
.It is undefined to call this function on a
CXCursor
that does not represent aFunctionDecl
or whoseI
'th template argument is not an integral value.For example, for the following declaration and specialization:
template <typename T, int kInt, bool kBool> void foo() { ... } template <> void foo <float , 2147483649, true>();
If called with I = 1 or 2, 2147483649 or true will be returned, respectively. For I == 0, this function's behavior is undefined.
-
nclang_equalTypes
public static int nclang_equalTypes(long A, long B, long __functionAddress) public static int nclang_equalTypes(long A, long B)
Unsafe version of:equalTypes
-
clang_equalTypes
public static boolean clang_equalTypes(CXType A, CXType B)
Determine whether twoCXTypes
represent the same type.- Returns:
- non-zero if the
CXTypes
represent the same type and zero otherwise
-
nclang_getCanonicalType
public static void nclang_getCanonicalType(long T, long __functionAddress, long __result) public static void nclang_getCanonicalType(long T, long __result)
Unsafe version of:getCanonicalType
-
clang_getCanonicalType
public static CXType clang_getCanonicalType(CXType T, CXType __result)
Return the canonical type for aCXType
.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'.
-
nclang_isConstQualifiedType
public static int nclang_isConstQualifiedType(long T, long __functionAddress) public static int nclang_isConstQualifiedType(long T)
Unsafe version of:isConstQualifiedType
-
clang_isConstQualifiedType
public static boolean clang_isConstQualifiedType(CXType T)
Determine whether aCXType
has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.
-
nclang_Cursor_isMacroFunctionLike
public static int nclang_Cursor_isMacroFunctionLike(long C, long __functionAddress) public static int nclang_Cursor_isMacroFunctionLike(long C)
Unsafe version of:Cursor_isMacroFunctionLike
-
clang_Cursor_isMacroFunctionLike
public static boolean clang_Cursor_isMacroFunctionLike(CXCursor C)
Determine whether aCXCursor
that is a macro, is function like.
-
nclang_Cursor_isMacroBuiltin
public static int nclang_Cursor_isMacroBuiltin(long C, long __functionAddress) public static int nclang_Cursor_isMacroBuiltin(long C)
Unsafe version of:Cursor_isMacroBuiltin
-
clang_Cursor_isMacroBuiltin
public static boolean clang_Cursor_isMacroBuiltin(CXCursor C)
Determine whether aCXCursor
that is a macro, is a builtin one.
-
nclang_Cursor_isFunctionInlined
public static int nclang_Cursor_isFunctionInlined(long C, long __functionAddress) public static int nclang_Cursor_isFunctionInlined(long C)
Unsafe version of:Cursor_isFunctionInlined
-
clang_Cursor_isFunctionInlined
public static boolean clang_Cursor_isFunctionInlined(CXCursor C)
Determine whether aCXCursor
that is a function declaration, is an inline declaration.
-
nclang_isVolatileQualifiedType
public static int nclang_isVolatileQualifiedType(long T, long __functionAddress) public static int nclang_isVolatileQualifiedType(long T)
Unsafe version of:isVolatileQualifiedType
-
clang_isVolatileQualifiedType
public static boolean clang_isVolatileQualifiedType(CXType T)
Determine whether aCXType
has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.
-
nclang_isRestrictQualifiedType
public static int nclang_isRestrictQualifiedType(long T, long __functionAddress) public static int nclang_isRestrictQualifiedType(long T)
Unsafe version of:isRestrictQualifiedType
-
clang_isRestrictQualifiedType
public static boolean clang_isRestrictQualifiedType(CXType T)
Determine whether aCXType
has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.
-
nclang_getAddressSpace
public static int nclang_getAddressSpace(long T, long __functionAddress) public static int nclang_getAddressSpace(long T)
Unsafe version of:getAddressSpace
-
clang_getAddressSpace
public static int clang_getAddressSpace(CXType T)
Returns the address space of the given type.
-
nclang_getTypedefName
public static void nclang_getTypedefName(long CT, long __functionAddress, long __result) public static void nclang_getTypedefName(long CT, long __result)
Unsafe version of:getTypedefName
-
clang_getTypedefName
public static CXString clang_getTypedefName(CXType CT, CXString __result)
Returns the typedef name of the given type.
-
nclang_getPointeeType
public static void nclang_getPointeeType(long T, long __functionAddress, long __result) public static void nclang_getPointeeType(long T, long __result)
Unsafe version of:getPointeeType
-
clang_getPointeeType
public static CXType clang_getPointeeType(CXType T, CXType __result)
For pointer types, returns the type of the pointee.
-
nclang_getTypeDeclaration
public static void nclang_getTypeDeclaration(long T, long __functionAddress, long __result) public static void nclang_getTypeDeclaration(long T, long __result)
Unsafe version of:getTypeDeclaration
-
clang_getTypeDeclaration
public static CXCursor clang_getTypeDeclaration(CXType T, CXCursor __result)
Return the cursor for the declaration of the given type.
-
nclang_getDeclObjCTypeEncoding
public static void nclang_getDeclObjCTypeEncoding(long C, long __functionAddress, long __result) public static void nclang_getDeclObjCTypeEncoding(long C, long __result)
Unsafe version of:getDeclObjCTypeEncoding
-
clang_getDeclObjCTypeEncoding
public static CXString clang_getDeclObjCTypeEncoding(CXCursor C, CXString __result)
Returns the Objective-C type encoding for the specified declaration.
-
nclang_Type_getObjCEncoding
public static void nclang_Type_getObjCEncoding(long type, long __functionAddress, long __result) public static void nclang_Type_getObjCEncoding(long type, long __result)
Unsafe version of:Type_getObjCEncoding
-
clang_Type_getObjCEncoding
public static CXString clang_Type_getObjCEncoding(CXType type, CXString __result)
Returns the Objective-C type encoding for the specifiedCXType
.
-
nclang_getTypeKindSpelling
public static void nclang_getTypeKindSpelling(int K, long __functionAddress, long __result) public static void nclang_getTypeKindSpelling(int K, long __result)
Unsafe version of:getTypeKindSpelling
-
clang_getTypeKindSpelling
public static CXString clang_getTypeKindSpelling(int K, CXString __result)
Retrieve the spelling of a givenCXTypeKind
.
-
nclang_getFunctionTypeCallingConv
public static int nclang_getFunctionTypeCallingConv(long T, long __functionAddress) public static int nclang_getFunctionTypeCallingConv(long T)
Unsafe version of:getFunctionTypeCallingConv
-
clang_getFunctionTypeCallingConv
public static int clang_getFunctionTypeCallingConv(CXType T)
Retrieve the calling convention associated with a function type.If a non-function type is passed in,
CallingConv_Invalid
is returned.
-
nclang_getResultType
public static void nclang_getResultType(long T, long __functionAddress, long __result) public static void nclang_getResultType(long T, long __result)
Unsafe version of:getResultType
-
clang_getResultType
public static CXType clang_getResultType(CXType T, CXType __result)
Retrieve the return type associated with a function type.If a non-function type is passed in, an invalid type is returned.
-
nclang_getExceptionSpecificationType
public static int nclang_getExceptionSpecificationType(long T, long __functionAddress) public static int nclang_getExceptionSpecificationType(long T)
Unsafe version of:getExceptionSpecificationType
-
clang_getExceptionSpecificationType
public static int clang_getExceptionSpecificationType(CXType T)
Retrieve the exception specification type associated with a function type. This is a value of typeCXCursor_ExceptionSpecificationKind
.If a non-function type is passed in, an error code of -1 is returned.
-
nclang_getNumArgTypes
public static int nclang_getNumArgTypes(long T, long __functionAddress) public static int nclang_getNumArgTypes(long T)
Unsafe version of:getNumArgTypes
-
clang_getNumArgTypes
public static int clang_getNumArgTypes(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.
-
nclang_getArgType
public static void nclang_getArgType(long T, int i, long __functionAddress, long __result) public static void nclang_getArgType(long T, int i, long __result)
Unsafe version of:getArgType
-
clang_getArgType
public static CXType clang_getArgType(CXType T, int i, CXType __result)
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.
-
nclang_Type_getObjCObjectBaseType
public static void nclang_Type_getObjCObjectBaseType(long T, long __functionAddress, long __result) public static void nclang_Type_getObjCObjectBaseType(long T, long __result)
Unsafe version of:Type_getObjCObjectBaseType
-
clang_Type_getObjCObjectBaseType
public static CXType clang_Type_getObjCObjectBaseType(CXType T, CXType __result)
Retrieves the base type of theObjCObjectType
.If the type is not an ObjC object, an invalid type is returned.
-
nclang_Type_getNumObjCProtocolRefs
public static int nclang_Type_getNumObjCProtocolRefs(long T, long __functionAddress) public static int nclang_Type_getNumObjCProtocolRefs(long T)
Unsafe version of:Type_getNumObjCProtocolRefs
-
clang_Type_getNumObjCProtocolRefs
public static int clang_Type_getNumObjCProtocolRefs(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.
-
nclang_Type_getObjCProtocolDecl
public static void nclang_Type_getObjCProtocolDecl(long T, int i, long __functionAddress, long __result) public static void nclang_Type_getObjCProtocolDecl(long T, int i, long __result)
Unsafe version of:Type_getObjCProtocolDecl
-
clang_Type_getObjCProtocolDecl
public static CXCursor clang_Type_getObjCProtocolDecl(CXType T, int i, CXCursor __result)
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.
-
nclang_Type_getNumObjCTypeArgs
public static int nclang_Type_getNumObjCTypeArgs(long T, long __functionAddress) public static int nclang_Type_getNumObjCTypeArgs(long T)
Unsafe version of:Type_getNumObjCTypeArgs
-
clang_Type_getNumObjCTypeArgs
public static int clang_Type_getNumObjCTypeArgs(CXType T)
Retreive the number of type arguments associated with an ObjC object.If the type is not an ObjC object, 0 is returned.
-
nclang_Type_getObjCTypeArg
public static void nclang_Type_getObjCTypeArg(long T, int i, long __functionAddress, long __result) public static void nclang_Type_getObjCTypeArg(long T, int i, long __result)
Unsafe version of:Type_getObjCTypeArg
-
clang_Type_getObjCTypeArg
public static CXType clang_Type_getObjCTypeArg(CXType T, int i, CXType __result)
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.
-
nclang_isFunctionTypeVariadic
public static int nclang_isFunctionTypeVariadic(long T, long __functionAddress) public static int nclang_isFunctionTypeVariadic(long T)
Unsafe version of:isFunctionTypeVariadic
-
clang_isFunctionTypeVariadic
public static boolean clang_isFunctionTypeVariadic(CXType T)
Return 1 if theCXType
is a variadic function type, and 0 otherwise.
-
nclang_getCursorResultType
public static void nclang_getCursorResultType(long C, long __functionAddress, long __result) public static void nclang_getCursorResultType(long C, long __result)
Unsafe version of:getCursorResultType
-
clang_getCursorResultType
public static CXType clang_getCursorResultType(CXCursor C, CXType __result)
Retrieve the return type associated with a given cursor.This only returns a valid type if the cursor refers to a function or method.
-
nclang_getCursorExceptionSpecificationType
public static int nclang_getCursorExceptionSpecificationType(long C, long __functionAddress) public static int nclang_getCursorExceptionSpecificationType(long C)
Unsafe version of:getCursorExceptionSpecificationType
-
clang_getCursorExceptionSpecificationType
public static int clang_getCursorExceptionSpecificationType(CXCursor C)
Retrieve the exception specification type associated with a given cursor. This is a value of typeCXCursor_ExceptionSpecificationKind
.This only returns a valid result if the cursor refers to a function or method.
-
nclang_isPODType
public static int nclang_isPODType(long T, long __functionAddress) public static int nclang_isPODType(long T)
Unsafe version of:isPODType
-
clang_isPODType
public static boolean clang_isPODType(CXType T)
Return 1 if theCXType
is a POD (plain old data) type, and 0 otherwise.
-
nclang_getElementType
public static void nclang_getElementType(long T, long __functionAddress, long __result) public static void nclang_getElementType(long T, long __result)
Unsafe version of:getElementType
-
clang_getElementType
public static CXType clang_getElementType(CXType T, CXType __result)
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.
-
nclang_getNumElements
public static long nclang_getNumElements(long T, long __functionAddress) public static long nclang_getNumElements(long T)
Unsafe version of:getNumElements
-
clang_getNumElements
public static long clang_getNumElements(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.
-
nclang_getArrayElementType
public static void nclang_getArrayElementType(long T, long __functionAddress, long __result) public static void nclang_getArrayElementType(long T, long __result)
Unsafe version of:getArrayElementType
-
clang_getArrayElementType
public static CXType clang_getArrayElementType(CXType T, CXType __result)
Return the element type of an array type.If a non-array type is passed in, an invalid type is returned.
-
nclang_getArraySize
public static long nclang_getArraySize(long T, long __functionAddress) public static long nclang_getArraySize(long T)
Unsafe version of:getArraySize
-
clang_getArraySize
public static long clang_getArraySize(CXType T)
Return the array size of a constant array.If a non-array type is passed in, -1 is returned.
-
nclang_Type_getNamedType
public static void nclang_Type_getNamedType(long T, long __functionAddress, long __result) public static void nclang_Type_getNamedType(long T, long __result)
Unsafe version of:Type_getNamedType
-
clang_Type_getNamedType
public static CXType clang_Type_getNamedType(CXType T, CXType __result)
Retrieve the type named by the qualified-id.If a non-elaborated type is passed in, an invalid type is returned.
-
nclang_Type_isTransparentTagTypedef
public static int nclang_Type_isTransparentTagTypedef(long T, long __functionAddress) public static int nclang_Type_isTransparentTagTypedef(long T)
Unsafe version of:Type_isTransparentTagTypedef
-
clang_Type_isTransparentTagTypedef
public static boolean clang_Type_isTransparentTagTypedef(CXType T)
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
-
nclang_Type_getNullability
public static int nclang_Type_getNullability(long T, long __functionAddress) public static int nclang_Type_getNullability(long T)
Unsafe version of:Type_getNullability
-
clang_Type_getNullability
public static int clang_Type_getNullability(CXType T)
Retrieve the nullability kind of a pointer type.
-
nclang_Type_getAlignOf
public static long nclang_Type_getAlignOf(long T, long __functionAddress) public static long nclang_Type_getAlignOf(long T)
Unsafe version of:Type_getAlignOf
-
clang_Type_getAlignOf
public static long clang_Type_getAlignOf(CXType T)
Return the alignment of a type in bytes as perC++[expr.alignof]
standard.If the type declaration is invalid,
TypeLayoutError_Invalid
is returned. If the type declaration is an incomplete type,TypeLayoutError_Incomplete
is returned. If the type declaration is a dependent type,TypeLayoutError_Dependent
is returned. If the type declaration is not a constant size type,TypeLayoutError_NotConstantSize
is returned.
-
nclang_Type_getClassType
public static void nclang_Type_getClassType(long T, long __functionAddress, long __result) public static void nclang_Type_getClassType(long T, long __result)
Unsafe version of:Type_getClassType
-
clang_Type_getClassType
public static CXType clang_Type_getClassType(CXType T, CXType __result)
Return the class type of an member pointer type.If a non-member-pointer type is passed in, an invalid type is returned.
-
nclang_Type_getSizeOf
public static long nclang_Type_getSizeOf(long T, long __functionAddress) public static long nclang_Type_getSizeOf(long T)
Unsafe version of:Type_getSizeOf
-
clang_Type_getSizeOf
public static long clang_Type_getSizeOf(CXType T)
Return the size of a type in bytes as perC++[expr.sizeof]
standard.If the type declaration is invalid,
TypeLayoutError_Invalid
is returned. If the type declaration is an incomplete type,TypeLayoutError_Incomplete
is returned. If the type declaration is a dependent type,TypeLayoutError_Dependent
is returned.
-
nclang_Type_getOffsetOf
public static long nclang_Type_getOffsetOf(long T, long S, long __functionAddress) public static long nclang_Type_getOffsetOf(long T, long S)
Unsafe version of:Type_getOffsetOf
-
clang_Type_getOffsetOf
public static long clang_Type_getOffsetOf(CXType T, java.nio.ByteBuffer S) public static long clang_Type_getOffsetOf(CXType T, java.lang.CharSequence S)
Return the offset of a field namedS
in a record of typeT
in bits as it would be returned by__offsetof__
as perC++11[18.2p4]
If the cursor is not a record field declaration,
TypeLayoutError_Invalid
is returned. If the field's type declaration is an incomplete type,TypeLayoutError_Incomplete
is returned. If the field's type declaration is a dependent type,TypeLayoutError_Dependent
is returned. If the field's nameS
is not found,TypeLayoutError_InvalidFieldName
is returned.
-
nclang_Type_getModifiedType
public static void nclang_Type_getModifiedType(long T, long __functionAddress, long __result) public static void nclang_Type_getModifiedType(long T, long __result)
Unsafe version of:Type_getModifiedType
-
clang_Type_getModifiedType
public static CXType clang_Type_getModifiedType(CXType T, CXType __result)
Return the type that was modified by this attributed type.If the type is not an attributed type, an invalid type is returned.
-
nclang_Cursor_getOffsetOfField
public static long nclang_Cursor_getOffsetOfField(long C, long __functionAddress) public static long nclang_Cursor_getOffsetOfField(long C)
Unsafe version of:Cursor_getOffsetOfField
-
clang_Cursor_getOffsetOfField
public static long clang_Cursor_getOffsetOfField(CXCursor C)
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,
TypeLayoutError_Invalid
is returned. If the field's type declaration is an incomplete type,TypeLayoutError_Incomplete
is returned. If the field's type declaration is a dependent type,TypeLayoutError_Dependent
is returned. If the field's name S is not found,TypeLayoutError_InvalidFieldName
is returned.
-
nclang_Cursor_isAnonymous
public static int nclang_Cursor_isAnonymous(long C, long __functionAddress) public static int nclang_Cursor_isAnonymous(long C)
Unsafe version of:Cursor_isAnonymous
-
clang_Cursor_isAnonymous
public static boolean clang_Cursor_isAnonymous(CXCursor C)
Determine whether the given cursor represents an anonymous record declaration.
-
nclang_Type_getNumTemplateArguments
public static int nclang_Type_getNumTemplateArguments(long T, long __functionAddress) public static int nclang_Type_getNumTemplateArguments(long T)
Unsafe version of:Type_getNumTemplateArguments
-
clang_Type_getNumTemplateArguments
public static int clang_Type_getNumTemplateArguments(CXType T)
Returns the number of template arguments for given template specialization, or -1 if typeT
is not a template specialization.
-
nclang_Type_getTemplateArgumentAsType
public static void nclang_Type_getTemplateArgumentAsType(long T, int i, long __functionAddress, long __result) public static void nclang_Type_getTemplateArgumentAsType(long T, int i, long __result)
Unsafe version of:Type_getTemplateArgumentAsType
-
clang_Type_getTemplateArgumentAsType
public static CXType clang_Type_getTemplateArgumentAsType(CXType T, int i, CXType __result)
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.
-
nclang_Type_getCXXRefQualifier
public static int nclang_Type_getCXXRefQualifier(long T, long __functionAddress) public static int nclang_Type_getCXXRefQualifier(long T)
Unsafe version of:Type_getCXXRefQualifier
-
clang_Type_getCXXRefQualifier
public static int clang_Type_getCXXRefQualifier(CXType T)
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,
RefQualifier_None
is returned.
-
nclang_Cursor_isBitField
public static int nclang_Cursor_isBitField(long C, long __functionAddress) public static int nclang_Cursor_isBitField(long C)
Unsafe version of:Cursor_isBitField
-
clang_Cursor_isBitField
public static boolean clang_Cursor_isBitField(CXCursor C)
Returns non-zero if the cursor specifies a Record member that is a bitfield.
-
nclang_isVirtualBase
public static int nclang_isVirtualBase(long cursor, long __functionAddress) public static int nclang_isVirtualBase(long cursor)
Unsafe version of:isVirtualBase
-
clang_isVirtualBase
public static boolean clang_isVirtualBase(CXCursor cursor)
Returns 1 if the base class specified by the cursor with kindCursor_CXXBaseSpecifier
is virtual.
-
nclang_getCXXAccessSpecifier
public static int nclang_getCXXAccessSpecifier(long cursor, long __functionAddress) public static int nclang_getCXXAccessSpecifier(long cursor)
Unsafe version of:getCXXAccessSpecifier
-
clang_getCXXAccessSpecifier
public static int clang_getCXXAccessSpecifier(CXCursor cursor)
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.
-
nclang_Cursor_getStorageClass
public static int nclang_Cursor_getStorageClass(long cursor, long __functionAddress) public static int nclang_Cursor_getStorageClass(long cursor)
Unsafe version of:Cursor_getStorageClass
-
clang_Cursor_getStorageClass
public static int clang_Cursor_getStorageClass(CXCursor cursor)
Returns the storage class for a function or variable declaration.If the passed in Cursor is not a function or variable declaration,
_SC_Invalid
is returned else the storage class.
-
nclang_getNumOverloadedDecls
public static int nclang_getNumOverloadedDecls(long cursor, long __functionAddress) public static int nclang_getNumOverloadedDecls(long cursor)
Unsafe version of:getNumOverloadedDecls
-
clang_getNumOverloadedDecls
public static int clang_getNumOverloadedDecls(CXCursor cursor)
Determine the number of overloaded declarations referenced by aCursor_OverloadedDeclRef
cursor.- Parameters:
cursor
- the cursor whose overloaded declarations are being queried- Returns:
- the number of overloaded declarations referenced by
cursor
. If it is not aCXCursor_OverloadedDeclRef
cursor, returns 0.
-
nclang_getOverloadedDecl
public static void nclang_getOverloadedDecl(long cursor, int index, long __functionAddress, long __result) public static void nclang_getOverloadedDecl(long cursor, int index, long __result)
Unsafe version of:getOverloadedDecl
-
clang_getOverloadedDecl
public static CXCursor clang_getOverloadedDecl(CXCursor cursor, int index, CXCursor __result)
Retrieve a cursor for one of the overloaded declarations referenced by aCursor_OverloadedDeclRef
cursor.- Parameters:
cursor
- the cursor whose overloaded declarations are being queriedindex
- the zero-based index into the set of overloaded declarations in the cursor__result
- a cursor representing the declaration referenced by the givencursor
at the specifiedindex
. If the cursor does not have an associated set of overloaded declarations, or if the index is out of bounds, returnsgetNullCursor
;
-
nclang_getIBOutletCollectionType
public static void nclang_getIBOutletCollectionType(long cursor, long __functionAddress, long __result) public static void nclang_getIBOutletCollectionType(long cursor, long __result)
Unsafe version of:getIBOutletCollectionType
-
clang_getIBOutletCollectionType
public static CXType clang_getIBOutletCollectionType(CXCursor cursor, CXType __result)
For cursors representing aniboutletcollection
attribute, this function returns the collection element type.
-
nclang_visitChildren
public static int nclang_visitChildren(long parent, long visitor, long client_data, long __functionAddress) public static int nclang_visitChildren(long parent, long visitor, long client_data)
Unsafe version of:visitChildren
-
clang_visitChildren
public static boolean clang_visitChildren(CXCursor parent, CXCursorVisitorI visitor)
Visit the children of a particular cursor.This function visits all the direct children of the given cursor, invoking the given
visitor
function with the cursors of each visited child. The traversal may be recursive, if the visitor returnsChildVisit_Recurse
. The traversal may also be ended prematurely, if the visitor returnsChildVisit_Break
.- Parameters:
parent
- the cursor whose child may be visited. All kinds of cursors can be visited, including invalid cursors (which, by definition, have no children).visitor
- the visitor function that will be invoked for each child ofparent
- Returns:
- a non-zero value if the traversal was terminated prematurely by the visitor returning
ChildVisit_Break
-
nclang_getCursorUSR
public static void nclang_getCursorUSR(long cursor, long __functionAddress, long __result) public static void nclang_getCursorUSR(long cursor, long __result)
Unsafe version of:getCursorUSR
-
clang_getCursorUSR
public static CXString clang_getCursorUSR(CXCursor cursor, CXString __result)
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.
-
nclang_constructUSR_ObjCClass
public static void nclang_constructUSR_ObjCClass(long class_name, long __functionAddress, long __result) public static void nclang_constructUSR_ObjCClass(long class_name, long __result)
Unsafe version of:constructUSR_ObjCClass
-
clang_constructUSR_ObjCClass
public static CXString clang_constructUSR_ObjCClass(java.nio.ByteBuffer class_name, CXString __result) public static CXString clang_constructUSR_ObjCClass(java.lang.CharSequence class_name, CXString __result)
Construct a USR for a specified Objective-C class.
-
nclang_constructUSR_ObjCCategory
public static void nclang_constructUSR_ObjCCategory(long class_name, long category_name, long __functionAddress, long __result) public static void nclang_constructUSR_ObjCCategory(long class_name, long category_name, long __result)
Unsafe version of:constructUSR_ObjCCategory
-
clang_constructUSR_ObjCCategory
public static CXString clang_constructUSR_ObjCCategory(java.nio.ByteBuffer class_name, java.nio.ByteBuffer category_name, CXString __result) public static CXString clang_constructUSR_ObjCCategory(java.lang.CharSequence class_name, java.lang.CharSequence category_name, CXString __result)
Construct a USR for a specified Objective-C category.
-
nclang_constructUSR_ObjCProtocol
public static void nclang_constructUSR_ObjCProtocol(long protocol_name, long __functionAddress, long __result) public static void nclang_constructUSR_ObjCProtocol(long protocol_name, long __result)
Unsafe version of:constructUSR_ObjCProtocol
-
clang_constructUSR_ObjCProtocol
public static CXString clang_constructUSR_ObjCProtocol(java.nio.ByteBuffer protocol_name, CXString __result) public static CXString clang_constructUSR_ObjCProtocol(java.lang.CharSequence protocol_name, CXString __result)
Construct a USR for a specified Objective-C protocol.
-
nclang_constructUSR_ObjCIvar
public static void nclang_constructUSR_ObjCIvar(long name, long classUSR, long __functionAddress, long __result) public static void nclang_constructUSR_ObjCIvar(long name, long classUSR, long __result)
Unsafe version of:constructUSR_ObjCIvar
-
clang_constructUSR_ObjCIvar
public static CXString clang_constructUSR_ObjCIvar(java.nio.ByteBuffer name, CXString classUSR, CXString __result) public static CXString clang_constructUSR_ObjCIvar(java.lang.CharSequence name, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C instance variable and the USR for its containing class.
-
nclang_constructUSR_ObjCMethod
public static void nclang_constructUSR_ObjCMethod(long name, int isInstanceMethod, long classUSR, long __functionAddress, long __result) public static void nclang_constructUSR_ObjCMethod(long name, int isInstanceMethod, long classUSR, long __result)
Unsafe version of:constructUSR_ObjCMethod
-
clang_constructUSR_ObjCMethod
public static CXString clang_constructUSR_ObjCMethod(java.nio.ByteBuffer name, boolean isInstanceMethod, CXString classUSR, CXString __result) public static CXString clang_constructUSR_ObjCMethod(java.lang.CharSequence name, boolean isInstanceMethod, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C method and the USR for its containing class.
-
nclang_constructUSR_ObjCProperty
public static void nclang_constructUSR_ObjCProperty(long property, long classUSR, long __functionAddress, long __result) public static void nclang_constructUSR_ObjCProperty(long property, long classUSR, long __result)
Unsafe version of:constructUSR_ObjCProperty
-
clang_constructUSR_ObjCProperty
public static CXString clang_constructUSR_ObjCProperty(java.nio.ByteBuffer property, CXString classUSR, CXString __result) public static CXString clang_constructUSR_ObjCProperty(java.lang.CharSequence property, CXString classUSR, CXString __result)
Construct a USR for a specified Objective-C property and the USR for its containing class.
-
nclang_getCursorSpelling
public static void nclang_getCursorSpelling(long cursor, long __functionAddress, long __result) public static void nclang_getCursorSpelling(long cursor, long __result)
Unsafe version of:getCursorSpelling
-
clang_getCursorSpelling
public static CXString clang_getCursorSpelling(CXCursor cursor, CXString __result)
Retrieve a name for the entity referenced by this cursor.
-
nclang_Cursor_getSpellingNameRange
public static void nclang_Cursor_getSpellingNameRange(long cursor, int pieceIndex, int options, long __functionAddress, long __result) public static void nclang_Cursor_getSpellingNameRange(long cursor, int pieceIndex, int options, long __result)
Unsafe version of:Cursor_getSpellingNameRange
-
clang_Cursor_getSpellingNameRange
public static CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor cursor, int pieceIndex, int options, CXSourceRange __result)
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.- Parameters:
pieceIndex
- the index of the spelling name piece. If this is greater than the actual number of pieces, it will return aNULL
(invalid) range.options
- reserved
-
clang_PrintingPolicy_getProperty
public static int clang_PrintingPolicy_getProperty(long Policy, int Property)
Get a property value for the given printing policy.
-
clang_PrintingPolicy_setProperty
public static void clang_PrintingPolicy_setProperty(long Policy, int Property, int Value)
Set a property value for the given printing policy.
-
nclang_getCursorPrintingPolicy
public static long nclang_getCursorPrintingPolicy(long cursor, long __functionAddress) public static long nclang_getCursorPrintingPolicy(long cursor)
Unsafe version of:getCursorPrintingPolicy
-
clang_getCursorPrintingPolicy
public static long clang_getCursorPrintingPolicy(CXCursor cursor)
Retrieve the default policy for the cursor.The policy should be released after use with
clang_PrintingPolicy_dispose
.
-
clang_PrintingPolicy_dispose
public static void clang_PrintingPolicy_dispose(long Policy)
Release a printing policy.
-
nclang_getCursorPrettyPrinted
public static void nclang_getCursorPrettyPrinted(long Cursor, long Policy, long __functionAddress, long __result) public static void nclang_getCursorPrettyPrinted(long Cursor, long Policy, long __result)
Unsafe version of:getCursorPrettyPrinted
-
clang_getCursorPrettyPrinted
public static CXString clang_getCursorPrettyPrinted(CXCursor Cursor, long Policy, CXString __result)
Pretty print declarations.- Parameters:
Cursor
- the cursor representing a declarationPolicy
- the policy to control the entities being printed. IfNULL
, a default policy is used.__result
- the pretty printed declaration or the empty string for other cursors
-
nclang_getCursorDisplayName
public static void nclang_getCursorDisplayName(long cursor, long __functionAddress, long __result) public static void nclang_getCursorDisplayName(long cursor, long __result)
Unsafe version of:getCursorDisplayName
-
clang_getCursorDisplayName
public static CXString clang_getCursorDisplayName(CXCursor cursor, CXString __result)
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.
-
nclang_getCursorReferenced
public static void nclang_getCursorReferenced(long cursor, long __functionAddress, long __result) public static void nclang_getCursorReferenced(long cursor, long __result)
Unsafe version of:getCursorReferenced
-
clang_getCursorReferenced
public static CXCursor clang_getCursorReferenced(CXCursor cursor, CXCursor __result)
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.
-
nclang_getCursorDefinition
public static void nclang_getCursorDefinition(long cursor, long __functionAddress, long __result) public static void nclang_getCursorDefinition(long cursor, long __result)
Unsafe version of:getCursorDefinition
-
clang_getCursorDefinition
public static CXCursor clang_getCursorDefinition(CXCursor cursor, CXCursor __result)
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:
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);
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.
-
nclang_isCursorDefinition
public static int nclang_isCursorDefinition(long cursor, long __functionAddress) public static int nclang_isCursorDefinition(long cursor)
Unsafe version of:isCursorDefinition
-
clang_isCursorDefinition
public static boolean clang_isCursorDefinition(CXCursor cursor)
Determine whether the declaration pointed to by this cursor is also a definition of that entity.
-
nclang_getCanonicalCursor
public static void nclang_getCanonicalCursor(long cursor, long __functionAddress, long __result) public static void nclang_getCanonicalCursor(long cursor, long __result)
Unsafe version of:getCanonicalCursor
-
clang_getCanonicalCursor
public static CXCursor clang_getCanonicalCursor(CXCursor cursor, CXCursor __result)
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:
struct X; struct X; struct X { int member; };
The declarations and the definition of
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.- Parameters:
__result
- the canonical cursor for the entity referred to by the given cursor
-
nclang_Cursor_getObjCSelectorIndex
public static int nclang_Cursor_getObjCSelectorIndex(long cursor, long __functionAddress) public static int nclang_Cursor_getObjCSelectorIndex(long cursor)
Unsafe version of:Cursor_getObjCSelectorIndex
-
clang_Cursor_getObjCSelectorIndex
public static int clang_Cursor_getObjCSelectorIndex(CXCursor cursor)
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
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
-
nclang_Cursor_isDynamicCall
public static int nclang_Cursor_isDynamicCall(long C, long __functionAddress) public static int nclang_Cursor_isDynamicCall(long C)
Unsafe version of:Cursor_isDynamicCall
-
clang_Cursor_isDynamicCall
public static boolean clang_Cursor_isDynamicCall(CXCursor C)
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.
-
nclang_Cursor_getReceiverType
public static void nclang_Cursor_getReceiverType(long C, long __functionAddress, long __result) public static void nclang_Cursor_getReceiverType(long C, long __result)
Unsafe version of:Cursor_getReceiverType
-
clang_Cursor_getReceiverType
public static CXType clang_Cursor_getReceiverType(CXCursor C, CXType __result)
Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns theCXType
of the receiver.
-
nclang_Cursor_getObjCPropertyAttributes
public static int nclang_Cursor_getObjCPropertyAttributes(long C, int reserved, long __functionAddress) public static int nclang_Cursor_getObjCPropertyAttributes(long C, int reserved)
Unsafe version of:Cursor_getObjCPropertyAttributes
-
clang_Cursor_getObjCPropertyAttributes
public static int clang_Cursor_getObjCPropertyAttributes(CXCursor C, int reserved)
Given a cursor that represents a property declaration, return the associated property attributes. The bits are formed fromCXObjCPropertyAttrKind
.- Parameters:
reserved
- reserved for future use, pass 0
-
nclang_Cursor_getObjCPropertyGetterName
public static void nclang_Cursor_getObjCPropertyGetterName(long C, long __functionAddress, long __result) public static void nclang_Cursor_getObjCPropertyGetterName(long C, long __result)
Unsafe version of:Cursor_getObjCPropertyGetterName
-
clang_Cursor_getObjCPropertyGetterName
public static CXString clang_Cursor_getObjCPropertyGetterName(CXCursor C, CXString __result)
Given a cursor that represents a property declaration, return the name of the method that implements the getter.
-
nclang_Cursor_getObjCPropertySetterName
public static void nclang_Cursor_getObjCPropertySetterName(long C, long __functionAddress, long __result) public static void nclang_Cursor_getObjCPropertySetterName(long C, long __result)
Unsafe version of:Cursor_getObjCPropertySetterName
-
clang_Cursor_getObjCPropertySetterName
public static CXString clang_Cursor_getObjCPropertySetterName(CXCursor C, CXString __result)
Given a cursor that represents a property declaration, return the name of the method that implements the setter, if any.
-
nclang_Cursor_getObjCDeclQualifiers
public static int nclang_Cursor_getObjCDeclQualifiers(long C, long __functionAddress) public static int nclang_Cursor_getObjCDeclQualifiers(long C)
Unsafe version of:Cursor_getObjCDeclQualifiers
-
clang_Cursor_getObjCDeclQualifiers
public static int clang_Cursor_getObjCDeclQualifiers(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.
-
nclang_Cursor_isObjCOptional
public static int nclang_Cursor_isObjCOptional(long C, long __functionAddress) public static int nclang_Cursor_isObjCOptional(long C)
Unsafe version of:Cursor_isObjCOptional
-
clang_Cursor_isObjCOptional
public static boolean clang_Cursor_isObjCOptional(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".
-
nclang_Cursor_isVariadic
public static int nclang_Cursor_isVariadic(long C, long __functionAddress) public static int nclang_Cursor_isVariadic(long C)
Unsafe version of:Cursor_isVariadic
-
clang_Cursor_isVariadic
public static boolean clang_Cursor_isVariadic(CXCursor C)
Returns non-zero if the given cursor is a variadic function or method.
-
nclang_Cursor_isExternalSymbol
public static int nclang_Cursor_isExternalSymbol(long C, long language, long definedIn, long isGenerated, long __functionAddress) public static int nclang_Cursor_isExternalSymbol(long C, long language, long definedIn, long isGenerated)
Unsafe version of:Cursor_isExternalSymbol
-
clang_Cursor_isExternalSymbol
public static boolean clang_Cursor_isExternalSymbol(CXCursor C, @Nullable CXString.Buffer language, @Nullable CXString.Buffer definedIn, @Nullable java.nio.IntBuffer isGenerated)
Returns non-zero if the given cursor points to a symbol marked with external_source_symbol attribute.- Parameters:
language
- if non-NULL
, and the attribute is present, will be set to the 'language' string from the attributedefinedIn
- if non-NULL
, and the attribute is present, will be set to the 'definedIn' string from the attributeisGenerated
- if non-NULL
, and the attribute is present, will be set to non-zero if the 'generated_declaration' is set in the attribute
-
nclang_Cursor_getCommentRange
public static void nclang_Cursor_getCommentRange(long C, long __functionAddress, long __result) public static void nclang_Cursor_getCommentRange(long C, long __result)
Unsafe version of:Cursor_getCommentRange
-
clang_Cursor_getCommentRange
public static CXSourceRange clang_Cursor_getCommentRange(CXCursor C, CXSourceRange __result)
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.
-
nclang_Cursor_getRawCommentText
public static void nclang_Cursor_getRawCommentText(long C, long __functionAddress, long __result) public static void nclang_Cursor_getRawCommentText(long C, long __result)
Unsafe version of:Cursor_getRawCommentText
-
clang_Cursor_getRawCommentText
public static CXString clang_Cursor_getRawCommentText(CXCursor C, CXString __result)
Given a cursor that represents a declaration, return the associated comment text, including comment markers.
-
nclang_Cursor_getBriefCommentText
public static void nclang_Cursor_getBriefCommentText(long C, long __functionAddress, long __result) public static void nclang_Cursor_getBriefCommentText(long C, long __result)
Unsafe version of:Cursor_getBriefCommentText
-
clang_Cursor_getBriefCommentText
public static CXString clang_Cursor_getBriefCommentText(CXCursor C, CXString __result)
Given a cursor that represents a documentable entity (e.g., declaration), return the associated; otherwise return thefirst paragraph.
-
nclang_Cursor_getMangling
public static void nclang_Cursor_getMangling(long cursor, long __functionAddress, long __result) public static void nclang_Cursor_getMangling(long cursor, long __result)
Unsafe version of:Cursor_getMangling
-
clang_Cursor_getMangling
public static CXString clang_Cursor_getMangling(CXCursor cursor, CXString __result)
Retrieve theCXString
representing the mangled name of the cursor.
-
nclang_Cursor_getCXXManglings
public static long nclang_Cursor_getCXXManglings(long cursor, long __functionAddress) public static long nclang_Cursor_getCXXManglings(long cursor)
Unsafe version of:Cursor_getCXXManglings
-
clang_Cursor_getCXXManglings
@Nullable public static CXStringSet clang_Cursor_getCXXManglings(CXCursor cursor)
Retrieve theCXString
s representing the mangled symbols of the C++ constructor or destructor at the cursor.
-
nclang_Cursor_getObjCManglings
public static long nclang_Cursor_getObjCManglings(long cursor, long __functionAddress) public static long nclang_Cursor_getObjCManglings(long cursor)
Unsafe version of:Cursor_getObjCManglings
-
clang_Cursor_getObjCManglings
@Nullable public static CXStringSet clang_Cursor_getObjCManglings(CXCursor cursor)
Retrieve theCXString
s representing the mangled symbols of the ObjC class interface or implementation at the cursor.
-
nclang_Cursor_getModule
public static long nclang_Cursor_getModule(long C, long __functionAddress) public static long nclang_Cursor_getModule(long C)
Unsafe version of:Cursor_getModule
-
clang_Cursor_getModule
public static long clang_Cursor_getModule(CXCursor C)
Given aCursor_ModuleImportDecl
cursor, return the associated module.
-
clang_getModuleForFile
public static long clang_getModuleForFile(long TU, long file)
Given aCXFile
header file, return the module that contains it, if one exists.
-
clang_Module_getASTFile
public static long clang_Module_getASTFile(long Module)
- Parameters:
Module
- a module object- Returns:
- the module file where the provided module object came from
-
clang_Module_getParent
public static long clang_Module_getParent(long Module)
- Parameters:
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.
-
nclang_Module_getName
public static void nclang_Module_getName(long Module, long __functionAddress, long __result) public static void nclang_Module_getName(long Module, long __result)
Unsafe version of:Module_getName
-
clang_Module_getName
public static CXString clang_Module_getName(long Module, CXString __result)
- Parameters:
Module
- a module object__result
- the name of the module, e.g. for the 'std.vector' sub-module it will return "vector".
-
nclang_Module_getFullName
public static void nclang_Module_getFullName(long Module, long __functionAddress, long __result) public static void nclang_Module_getFullName(long Module, long __result)
Unsafe version of:Module_getFullName
-
clang_Module_getFullName
public static CXString clang_Module_getFullName(long Module, CXString __result)
- Parameters:
Module
- a module object__result
- the full name of the module, e.g. "std.vector".
-
clang_Module_isSystem
public static boolean clang_Module_isSystem(long Module)
- Parameters:
Module
- a module object- Returns:
- non-zero if the module is a system one
-
clang_Module_getNumTopLevelHeaders
public static int clang_Module_getNumTopLevelHeaders(long TU, long Module)
- Parameters:
Module
- a module object- Returns:
- the number of top level headers associated with this module
-
clang_Module_getTopLevelHeader
public static long clang_Module_getTopLevelHeader(long TU, long Module, int Index)
- Parameters:
Module
- a module objectIndex
- top level header index (zero-based)- Returns:
- the specified top level header associated with the module
-
nclang_CXXConstructor_isConvertingConstructor
public static int nclang_CXXConstructor_isConvertingConstructor(long C, long __functionAddress) public static int nclang_CXXConstructor_isConvertingConstructor(long C)
Unsafe version of:CXXConstructor_isConvertingConstructor
-
clang_CXXConstructor_isConvertingConstructor
public static boolean clang_CXXConstructor_isConvertingConstructor(CXCursor C)
Determine if a C++ constructor is a converting constructor.
-
nclang_CXXConstructor_isCopyConstructor
public static int nclang_CXXConstructor_isCopyConstructor(long C, long __functionAddress) public static int nclang_CXXConstructor_isCopyConstructor(long C)
Unsafe version of:CXXConstructor_isCopyConstructor
-
clang_CXXConstructor_isCopyConstructor
public static boolean clang_CXXConstructor_isCopyConstructor(CXCursor C)
Determine if a C++ constructor is a copy constructor.
-
nclang_CXXConstructor_isDefaultConstructor
public static int nclang_CXXConstructor_isDefaultConstructor(long C, long __functionAddress) public static int nclang_CXXConstructor_isDefaultConstructor(long C)
Unsafe version of:CXXConstructor_isDefaultConstructor
-
clang_CXXConstructor_isDefaultConstructor
public static boolean clang_CXXConstructor_isDefaultConstructor(CXCursor C)
Determine if a C++ constructor is the default constructor.
-
nclang_CXXConstructor_isMoveConstructor
public static int nclang_CXXConstructor_isMoveConstructor(long C, long __functionAddress) public static int nclang_CXXConstructor_isMoveConstructor(long C)
Unsafe version of:CXXConstructor_isMoveConstructor
-
clang_CXXConstructor_isMoveConstructor
public static boolean clang_CXXConstructor_isMoveConstructor(CXCursor C)
Determine if a C++ constructor is a move constructor.
-
nclang_CXXField_isMutable
public static int nclang_CXXField_isMutable(long C, long __functionAddress) public static int nclang_CXXField_isMutable(long C)
Unsafe version of:CXXField_isMutable
-
clang_CXXField_isMutable
public static boolean clang_CXXField_isMutable(CXCursor C)
Determine if a C++ field is declared 'mutable'.
-
nclang_CXXMethod_isDefaulted
public static int nclang_CXXMethod_isDefaulted(long C, long __functionAddress) public static int nclang_CXXMethod_isDefaulted(long C)
Unsafe version of:CXXMethod_isDefaulted
-
clang_CXXMethod_isDefaulted
public static boolean clang_CXXMethod_isDefaulted(CXCursor C)
Determine if a C++ method is declared '= default'.
-
nclang_CXXMethod_isPureVirtual
public static int nclang_CXXMethod_isPureVirtual(long C, long __functionAddress) public static int nclang_CXXMethod_isPureVirtual(long C)
Unsafe version of:CXXMethod_isPureVirtual
-
clang_CXXMethod_isPureVirtual
public static boolean clang_CXXMethod_isPureVirtual(CXCursor C)
Determine if a C++ member function or member function template is pure virtual.
-
nclang_CXXMethod_isStatic
public static int nclang_CXXMethod_isStatic(long C, long __functionAddress) public static int nclang_CXXMethod_isStatic(long C)
Unsafe version of:CXXMethod_isStatic
-
clang_CXXMethod_isStatic
public static boolean clang_CXXMethod_isStatic(CXCursor C)
Determine if a C++ member function or member function template is declared 'static'.
-
nclang_CXXMethod_isVirtual
public static int nclang_CXXMethod_isVirtual(long C, long __functionAddress) public static int nclang_CXXMethod_isVirtual(long C)
Unsafe version of:CXXMethod_isVirtual
-
clang_CXXMethod_isVirtual
public static boolean clang_CXXMethod_isVirtual(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.
-
nclang_CXXRecord_isAbstract
public static int nclang_CXXRecord_isAbstract(long C, long __functionAddress) public static int nclang_CXXRecord_isAbstract(long C)
Unsafe version of:CXXRecord_isAbstract
-
clang_CXXRecord_isAbstract
public static boolean clang_CXXRecord_isAbstract(CXCursor C)
Determine if a C++ record is abstract, i.e. whether a class or struct has a pure virtual member function.
-
nclang_EnumDecl_isScoped
public static int nclang_EnumDecl_isScoped(long C, long __functionAddress) public static int nclang_EnumDecl_isScoped(long C)
Unsafe version of:EnumDecl_isScoped
-
clang_EnumDecl_isScoped
public static boolean clang_EnumDecl_isScoped(CXCursor C)
Determine if an enum declaration refers to a scoped enum.
-
nclang_CXXMethod_isConst
public static int nclang_CXXMethod_isConst(long C, long __functionAddress) public static int nclang_CXXMethod_isConst(long C)
Unsafe version of:CXXMethod_isConst
-
clang_CXXMethod_isConst
public static boolean clang_CXXMethod_isConst(CXCursor C)
Determine if a C++ member function or member function template is declared 'const'.
-
nclang_getTemplateCursorKind
public static int nclang_getTemplateCursorKind(long C, long __functionAddress) public static int nclang_getTemplateCursorKind(long C)
Unsafe version of:getTemplateCursorKind
-
clang_getTemplateCursorKind
public static int clang_getTemplateCursorKind(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".
- Parameters:
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
C
. IfC
is not a template, returnsCursor_NoDeclFound
.
-
nclang_getSpecializedCursorTemplate
public static void nclang_getSpecializedCursorTemplate(long C, long __functionAddress, long __result) public static void nclang_getSpecializedCursorTemplate(long C, long __result)
Unsafe version of:getSpecializedCursorTemplate
-
clang_getSpecializedCursorTemplate
public static CXCursor clang_getSpecializedCursorTemplate(CXCursor C, CXCursor __result)
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.,
std::vector<bool>
), this routine will return either the primary template (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.
- Parameters:
C
- a cursor that may be a specialization of a template or a member of a template__result
- 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 aNULL
cursor.
-
nclang_getCursorReferenceNameRange
public static void nclang_getCursorReferenceNameRange(long C, int NameFlags, int PieceIndex, long __functionAddress, long __result) public static void nclang_getCursorReferenceNameRange(long C, int NameFlags, int PieceIndex, long __result)
Unsafe version of:getCursorReferenceNameRange
-
clang_getCursorReferenceNameRange
public static CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, int NameFlags, int PieceIndex, CXSourceRange __result)
Given a cursor that references something else, return the source range covering that reference.- Parameters:
C
- a cursor pointing to a member reference, a declaration reference, or an operator callNameFlags
- a bitset with three independent flags:NameRange_WantQualifier
,NameRange_WantTemplateArgs
, andNameRange_WantSinglePiece
PieceIndex
- for contiguous names or when passing the flagNameRange_WantSinglePiece
, only one piece with index 0 is available. When theNameRange_WantSinglePiece
flag is not passed for a non-contiguous names, this index can be used to retrieve the individual pieces of the name. See alsoNameRange_WantSinglePiece
.__result
- the piece of the name pointed to by the given cursor. If there is no name, or if thePieceIndex
is out-of-range, a null-cursor will be returned.
-
nclang_getToken
public static long nclang_getToken(long TU, long Location, long __functionAddress) public static long nclang_getToken(long TU, long Location)
Unsafe version of:getToken
-
clang_getToken
@Nullable public static CXToken clang_getToken(long TU, CXSourceLocation Location)
Get the raw lexical token starting with the given location.- Parameters:
TU
- the translation unit whose text is being tokenizedLocation
- 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 withdisposeTokens
before the translation unit is destroyed.
-
nclang_getTokenKind
public static int nclang_getTokenKind(long token, long __functionAddress) public static int nclang_getTokenKind(long token)
Unsafe version of:getTokenKind
-
clang_getTokenKind
public static int clang_getTokenKind(CXToken token)
Determine the kind of the given token.
-
nclang_getTokenSpelling
public static void nclang_getTokenSpelling(long TU, long token, long __functionAddress, long __result) public static void nclang_getTokenSpelling(long TU, long token, long __result)
Unsafe version of:getTokenSpelling
-
clang_getTokenSpelling
public static CXString clang_getTokenSpelling(long TU, CXToken token, CXString __result)
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.
-
nclang_getTokenLocation
public static void nclang_getTokenLocation(long TU, long token, long __functionAddress, long __result) public static void nclang_getTokenLocation(long TU, long token, long __result)
Unsafe version of:getTokenLocation
-
clang_getTokenLocation
public static CXSourceLocation clang_getTokenLocation(long TU, CXToken token, CXSourceLocation __result)
Retrieve the source location of the given token.
-
nclang_getTokenExtent
public static void nclang_getTokenExtent(long TU, long token, long __functionAddress, long __result) public static void nclang_getTokenExtent(long TU, long token, long __result)
Unsafe version of:getTokenExtent
-
clang_getTokenExtent
public static CXSourceRange clang_getTokenExtent(long TU, CXToken token, CXSourceRange __result)
Retrieve a source range that covers the given token.
-
nclang_tokenize
public static void nclang_tokenize(long TU, long Range, long Tokens, long NumTokens, long __functionAddress) public static void nclang_tokenize(long TU, long Range, long Tokens, long NumTokens)
Unsafe version of:tokenize
-
clang_tokenize
public static void clang_tokenize(long TU, CXSourceRange Range, org.lwjgl.PointerBuffer Tokens, java.nio.IntBuffer NumTokens)
Tokenize the source code described by the given range into raw lexical tokens.- Parameters:
TU
- the translation unit whose text is being tokenizedRange
- the source range in which text should be tokenized. All of the tokens produced by tokenization will fall within this source range,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 withdisposeTokens
before the translation unit is destroyed.NumTokens
- will be set to the number of tokens in the*Tokens
array
-
nclang_annotateTokens
public static void nclang_annotateTokens(long TU, long Tokens, int NumTokens, long Cursors)
Unsafe version of:annotateTokens
- Parameters:
NumTokens
- the number of tokens inTokens
-
clang_annotateTokens
public static void clang_annotateTokens(long TU, CXToken.Buffer Tokens, CXCursor.Buffer Cursors)
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
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 callf(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.
- Parameters:
TU
- the translation unit that owns the given tokensTokens
- the set of tokens to annotateCursors
- an array ofNumTokens
cursors, whose contents will be replaced with the cursors corresponding to each token
-
nclang_disposeTokens
public static void nclang_disposeTokens(long TU, long Tokens, int NumTokens)
Unsafe version of:disposeTokens
-
clang_disposeTokens
public static void clang_disposeTokens(long TU, CXToken.Buffer Tokens)
Free the given set of tokens.
-
nclang_getCursorKindSpelling
public static void nclang_getCursorKindSpelling(int Kind, long __functionAddress, long __result)
-
nclang_getCursorKindSpelling
public static void nclang_getCursorKindSpelling(int Kind, long __result)
-
clang_getCursorKindSpelling
public static CXString clang_getCursorKindSpelling(int Kind, CXString __result)
-
nclang_getDefinitionSpellingAndExtent
public static void nclang_getDefinitionSpellingAndExtent(long cursor, long startBuf, long endBuf, long startLine, long startColumn, long endLine, long endColumn, long __functionAddress)
-
nclang_getDefinitionSpellingAndExtent
public static void nclang_getDefinitionSpellingAndExtent(long cursor, long startBuf, long endBuf, long startLine, long startColumn, long endLine, long endColumn)
-
clang_getDefinitionSpellingAndExtent
public static void clang_getDefinitionSpellingAndExtent(CXCursor cursor, @Nullable org.lwjgl.PointerBuffer startBuf, @Nullable org.lwjgl.PointerBuffer endBuf, @Nullable java.nio.IntBuffer startLine, @Nullable java.nio.IntBuffer startColumn, @Nullable java.nio.IntBuffer endLine, @Nullable java.nio.IntBuffer endColumn)
-
clang_enableStackTraces
public static void clang_enableStackTraces()
-
nclang_executeOnThread
public static void nclang_executeOnThread(long fn, long user_data, int stack_size)
-
clang_executeOnThread
public static void clang_executeOnThread(CXExecuteOnThreadI fn, long user_data, int stack_size)
-
clang_getCompletionChunkKind
public static int clang_getCompletionChunkKind(long completion_string, int chunk_number)
Determine the kind of a particular chunk within a completion string.- Parameters:
completion_string
- the completion string to querychunk_number
- the 0-based index of the chunk in the completion string- Returns:
- the kind of the chunk at the index
chunk_number
-
nclang_getCompletionChunkText
public static void nclang_getCompletionChunkText(long completion_string, int chunk_number, long __functionAddress, long __result) public static void nclang_getCompletionChunkText(long completion_string, int chunk_number, long __result)
Unsafe version of:getCompletionChunkText
-
clang_getCompletionChunkText
public static CXString clang_getCompletionChunkText(long completion_string, int chunk_number, CXString __result)
Retrieve the text associated with a particular chunk within a completion string.- Parameters:
completion_string
- the completion string to querychunk_number
- the 0-based index of the chunk in the completion string__result
- the text associated with the chunk at indexchunk_number
-
clang_getCompletionChunkCompletionString
public static long clang_getCompletionChunkCompletionString(long completion_string, int chunk_number)
Retrieve the completion string associated with a particular chunk within a completion string.- Parameters:
completion_string
- the completion string to querychunk_number
- the 0-based index of the chunk in the completion string- Returns:
- the completion string associated with the chunk at index
chunk_number
-
clang_getNumCompletionChunks
public static int clang_getNumCompletionChunks(long completion_string)
Retrieve the number of chunks in the given code-completion string.
-
clang_getCompletionPriority
public static int clang_getCompletionPriority(long 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.
- Parameters:
completion_string
- the completion string to query- Returns:
- the priority of this completion string. Smaller values indicate higher-priority (more likely) completions.
-
clang_getCompletionAvailability
public static int clang_getCompletionAvailability(long completion_string)
Determine the availability of the entity that this code-completion string refers to.- Parameters:
completion_string
- the completion string to query- Returns:
- the availability of the completion string
-
clang_getCompletionNumAnnotations
public static int clang_getCompletionNumAnnotations(long completion_string)
Retrieve the number of annotations associated with the given completion string.- Parameters:
completion_string
- the completion string to query- Returns:
- the number of annotations associated with the given completion string
-
nclang_getCompletionAnnotation
public static void nclang_getCompletionAnnotation(long completion_string, int annotation_number, long __functionAddress, long __result) public static void nclang_getCompletionAnnotation(long completion_string, int annotation_number, long __result)
Unsafe version of:getCompletionAnnotation
-
clang_getCompletionAnnotation
public static CXString clang_getCompletionAnnotation(long completion_string, int annotation_number, CXString __result)
Retrieve the annotation associated with the given completion string.- Parameters:
completion_string
- the completion string to queryannotation_number
- the 0-based index of the annotation of the completion string__result
- annotation string associated with the completion at indexannotation_number
, or aNULL
string if that annotation is not available
-
nclang_getCompletionParent
public static void nclang_getCompletionParent(long completion_string, long kind, long __functionAddress, long __result) public static void nclang_getCompletionParent(long completion_string, long kind, long __result)
Unsafe version of:getCompletionParent
-
clang_getCompletionParent
public static CXString clang_getCompletionParent(long completion_string, @Nullable java.nio.IntBuffer kind, CXString __result)
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.
- Parameters:
completion_string
- the code completion string whose parent is being queriedkind
- DEPRECATED: always set toCursor_NotImplemented
if non-NULL
__result
- the name of the completion parent, e.g., "NSObject" if the completion string represents a method in theNSObject
class.
-
nclang_getCompletionBriefComment
public static void nclang_getCompletionBriefComment(long completion_string, long __functionAddress, long __result) public static void nclang_getCompletionBriefComment(long completion_string, long __result)
Unsafe version of:getCompletionBriefComment
-
clang_getCompletionBriefComment
public static CXString clang_getCompletionBriefComment(long completion_string, CXString __result)
Retrieve the brief documentation comment attached to the declaration that corresponds to the given completion string.
-
nclang_getCursorCompletionString
public static long nclang_getCursorCompletionString(long cursor, long __functionAddress) public static long nclang_getCursorCompletionString(long cursor)
Unsafe version of:getCursorCompletionString
-
clang_getCursorCompletionString
public static long clang_getCursorCompletionString(CXCursor cursor)
Retrieve a completion string for an arbitrary declaration or macro definition cursor.- Parameters:
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
-
nclang_getCompletionNumFixIts
public static int nclang_getCompletionNumFixIts(long results, int completion_index)
Unsafe version of:getCompletionNumFixIts
-
clang_getCompletionNumFixIts
public static int clang_getCompletionNumFixIts(CXCodeCompleteResults results, int completion_index)
Retrieve the number of fix-its for the given completion index.Calling this makes sense only if
CodeComplete_IncludeCompletionsWithFixIts
option was set.- Parameters:
results
- the structure keeping all completion resultscompletion_index
- the index of the completion- Returns:
- the number of fix-its which must be applied before the completion at
completion_index
can be applied
-
nclang_getCompletionFixIt
public static void nclang_getCompletionFixIt(long results, int completion_index, int fixit_index, long replacement_range, long __functionAddress, long __result) public static void nclang_getCompletionFixIt(long results, int completion_index, int fixit_index, long replacement_range, long __result)
Unsafe version of:getCompletionFixIt
-
clang_getCompletionFixIt
public static CXString clang_getCompletionFixIt(CXCodeCompleteResults results, int completion_index, int fixit_index, CXSourceRange replacement_range, CXString __result)
Fix-its that must be applied before inserting the text for the corresponding completion.By default,
codeCompleteAt
only returns completions with empty fix-its. Extra completions with non-empty fix-its should be explicitly requested by settingCodeComplete_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<std::vector<int>> 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 '.'.- Parameters:
results
- the structure keeping all completion resultscompletion_index
- the index of the completionfixit_index
- the index of the fix-it for the completion atcompletion_index
replacement_range
- the fix-it range that must be replaced before the completion at completion_index can be applied__result
- the fix-it string that must replace the code at replacement_range before the completion at completion_index can be applied
-
clang_defaultCodeCompleteOptions
public static int clang_defaultCodeCompleteOptions()
Returns a default set of code-completion options that can be passed tocodeCompleteAt
.
-
nclang_codeCompleteAt
public static long nclang_codeCompleteAt(long TU, long complete_filename, int complete_line, int complete_column, long unsaved_files, int num_unsaved_files, int options)
Unsafe version of:codeCompleteAt
- Parameters:
num_unsaved_files
- the number of unsaved file entries inunsaved_files
-
clang_codeCompleteAt
@Nullable public static CXCodeCompleteResults clang_codeCompleteAt(long TU, java.nio.ByteBuffer complete_filename, int complete_line, int complete_column, @Nullable CXUnsavedFile.Buffer unsaved_files, int options) @Nullable public static CXCodeCompleteResults clang_codeCompleteAt(long TU, java.lang.CharSequence complete_filename, int complete_line, int complete_column, @Nullable CXUnsavedFile.Buffer unsaved_files, int options)
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
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
p
is a pointer, code-completion might be triggered after the "-" and then after the ">" inp->
. 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 expressionp->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.- Parameters:
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 viaunsaved_files
). Cursors referring into the translation unit may be invalidated by this invocation.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.complete_line
- the line at which code-completion should occurcomplete_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.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 byCXUnsavedFile
) are copied when necessary, so the client only needs to guarantee their validity until the call to this function returns.options
- extra options that control the behavior of code completion, expressed as a bitwise OR of the enumerators of theCXCodeComplete_Flags
enumeration. ThedefaultCodeCompleteOptions
function returns a default set of code-completion options.- Returns:
- if successful, a new
CXCodeCompleteResults
structure containing code-completion results, which should eventually be freed withdisposeCodeCompleteResults
. If code completion fails, returnsNULL
.
-
nclang_sortCodeCompletionResults
public static void nclang_sortCodeCompletionResults(long Results, int NumResults)
Unsafe version of:sortCodeCompletionResults
- Parameters:
NumResults
- the number of results inResults
-
clang_sortCodeCompletionResults
public static void clang_sortCodeCompletionResults(CXCompletionResult.Buffer Results)
Sort the code-completion results in case-insensitive alphabetical order.- Parameters:
Results
- the set of results to sort
-
nclang_disposeCodeCompleteResults
public static void nclang_disposeCodeCompleteResults(long Results)
Unsafe version of:disposeCodeCompleteResults
-
clang_disposeCodeCompleteResults
public static void clang_disposeCodeCompleteResults(CXCodeCompleteResults Results)
Free the given set of code-completion results.
-
nclang_codeCompleteGetNumDiagnostics
public static int nclang_codeCompleteGetNumDiagnostics(long Results)
Unsafe version of:codeCompleteGetNumDiagnostics
-
clang_codeCompleteGetNumDiagnostics
public static int clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults Results)
Determine the number of diagnostics produced prior to the location where code completion was performed.
-
nclang_codeCompleteGetDiagnostic
public static long nclang_codeCompleteGetDiagnostic(long Results, int Index)
Unsafe version of:codeCompleteGetDiagnostic
-
clang_codeCompleteGetDiagnostic
public static long clang_codeCompleteGetDiagnostic(CXCodeCompleteResults Results, int Index)
Retrieve a diagnostic associated with the given code completion.- Parameters:
Results
- the code completion results to queryIndex
- the zero-based diagnostic number to retrieve- Returns:
- the requested diagnostic. This diagnostic must be freed via a call to
disposeDiagnostic
.
-
nclang_codeCompleteGetContexts
public static long nclang_codeCompleteGetContexts(long Results)
Unsafe version of:codeCompleteGetContexts
-
clang_codeCompleteGetContexts
public static long clang_codeCompleteGetContexts(CXCodeCompleteResults Results)
Determines what completions are appropriate for the context the given code completion.- Parameters:
Results
- the code completion results to query- Returns:
- the kinds of completions that are appropriate for use along with the given code completion results
-
nclang_codeCompleteGetContainerKind
public static int nclang_codeCompleteGetContainerKind(long Results, long IsIncomplete)
Unsafe version of:codeCompleteGetContainerKind
-
clang_codeCompleteGetContainerKind
public static int clang_codeCompleteGetContainerKind(CXCodeCompleteResults Results, java.nio.IntBuffer IsIncomplete)
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 returnCursor_InvalidCode
.- Parameters:
Results
- the code completion results to queryIsIncomplete
- 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
Cursor_InvalidCode
if there is not a container
-
nclang_codeCompleteGetContainerUSR
public static void nclang_codeCompleteGetContainerUSR(long Results, long __functionAddress, long __result) public static void nclang_codeCompleteGetContainerUSR(long Results, long __result)
Unsafe version of:codeCompleteGetContainerUSR
-
clang_codeCompleteGetContainerUSR
public static CXString clang_codeCompleteGetContainerUSR(CXCodeCompleteResults Results, CXString __result)
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.- Parameters:
Results
- the code completion results to query__result
- the USR for the container
-
nclang_codeCompleteGetObjCSelector
public static void nclang_codeCompleteGetObjCSelector(long Results, long __functionAddress, long __result) public static void nclang_codeCompleteGetObjCSelector(long Results, long __result)
Unsafe version of:codeCompleteGetObjCSelector
-
clang_codeCompleteGetObjCSelector
public static CXString clang_codeCompleteGetObjCSelector(CXCodeCompleteResults Results, CXString __result)
Returns the currently-entered selector for an Objective-C message send, formatted like "initWithFoo:bar:". Only guaranteed to return a non-empty string forCompletionContext_ObjCInstanceMessage
andCompletionContext_ObjCClassMessage
.- Parameters:
Results
- the code completion results to query__result
- the selector (or partial selector) that has been entered thus far for an Objective-C message send
-
nclang_getClangVersion
public static void nclang_getClangVersion(long __functionAddress, long __result) public static void nclang_getClangVersion(long __result)
Unsafe version of:getClangVersion
-
clang_getClangVersion
public static CXString clang_getClangVersion(CXString __result)
Return a version string, suitable for showing to a user, but not intended to be parsed (the format is not guaranteed to be stable).
-
clang_toggleCrashRecovery
public static void clang_toggleCrashRecovery(boolean isEnabled)
Enable/disable crash recovery.- Parameters:
isEnabled
- flag to indicate if crash recovery is enabled. A non-zero value enables crash recovery, while 0 disables it.
-
nclang_getInclusions
public static void nclang_getInclusions(long tu, long visitor, long client_data)
Unsafe version of:getInclusions
-
clang_getInclusions
public static void clang_getInclusions(long tu, CXInclusionVisitorI visitor, long client_data)
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).
-
nclang_Cursor_Evaluate
public static long nclang_Cursor_Evaluate(long C, long __functionAddress) public static long nclang_Cursor_Evaluate(long C)
Unsafe version of:Cursor_Evaluate
-
clang_Cursor_Evaluate
public static long clang_Cursor_Evaluate(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.
-
clang_EvalResult_getKind
public static int clang_EvalResult_getKind(long E)
Returns the kind of the evaluated result.
-
clang_EvalResult_getAsInt
public static int clang_EvalResult_getAsInt(long E)
Returns the evaluation result as integer if the kind is Int.
-
clang_EvalResult_getAsLongLong
public static long clang_EvalResult_getAsLongLong(long E)
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 withEvalResult_getAsInt
.
-
clang_EvalResult_isUnsignedInt
public static boolean clang_EvalResult_isUnsignedInt(long E)
Returns a non-zero value if the kind is Int and the evaluation result resulted in an unsigned integer.
-
clang_EvalResult_getAsUnsigned
public static long clang_EvalResult_getAsUnsigned(long E)
Returns the evaluation result as an unsigned integer if the kind is Int andEvalResult_isUnsignedInt
is non-zero.
-
clang_EvalResult_getAsDouble
public static double clang_EvalResult_getAsDouble(long E)
Returns the evaluation result as double if the kind is double.
-
nclang_EvalResult_getAsStr
public static long nclang_EvalResult_getAsStr(long E)
Unsafe version of:EvalResult_getAsStr
-
clang_EvalResult_getAsStr
@Nullable public static java.lang.String clang_EvalResult_getAsStr(long 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 callEvalResult_dispose
on theCXEvalResult
returned byCursor_Evaluate
.
-
clang_EvalResult_dispose
public static void clang_EvalResult_dispose(long E)
Disposes the createdEval
memory.
-
nclang_getRemappings
public static long nclang_getRemappings(long path)
Unsafe version of:getRemappings
-
clang_getRemappings
public static long clang_getRemappings(java.nio.ByteBuffer path) public static long clang_getRemappings(java.lang.CharSequence path)
Retrieve a remapping.- Parameters:
path
- the path that contains metadata about remappings- Returns:
- the requested remapping. This remapping must be freed via a call to
remap_dispose
. Can returnNULL
if an error occurred.
-
nclang_getRemappingsFromFileList
public static long nclang_getRemappingsFromFileList(long filePaths, int numFiles)
Unsafe version of:getRemappingsFromFileList
- Parameters:
numFiles
- number of file paths
-
clang_getRemappingsFromFileList
public static long clang_getRemappingsFromFileList(org.lwjgl.PointerBuffer filePaths)
Retrieve a remapping.- Parameters:
filePaths
- pointer to an array of file paths containing remapping info- Returns:
- the requested remapping. This remapping must be freed via a call to
remap_dispose
. Can returnNULL
if an error occurred.
-
clang_remap_getNumFiles
public static int clang_remap_getNumFiles(long Remapping)
Determine the number of remappings.
-
nclang_remap_getFilenames
public static void nclang_remap_getFilenames(long Remapping, int index, long original, long transformed)
Unsafe version of:remap_getFilenames
-
clang_remap_getFilenames
public static void clang_remap_getFilenames(long Remapping, int index, @Nullable CXString original, @Nullable CXString transformed)
Get the original and the associated filename from the remapping.- Parameters:
original
- if non-NULL
, will be set to the original filenametransformed
- if non-NULL
, will be set to the filename that the original is associated with
-
clang_remap_dispose
public static void clang_remap_dispose(long Remapping)
Dispose the remapping.
-
nclang_findReferencesInFile
public static int nclang_findReferencesInFile(long cursor, long file, long visitor, long __functionAddress) public static int nclang_findReferencesInFile(long cursor, long file, long visitor)
Unsafe version of:findReferencesInFile
-
clang_findReferencesInFile
public static int clang_findReferencesInFile(CXCursor cursor, long file, CXCursorAndRangeVisitor visitor)
Find references of a declaration in a specific file.- Parameters:
cursor
- pointing to a declaration or a reference of onefile
- to search for referencesvisitor
- callback that will receive pairs ofCXCursor/CXSourceRange
for each reference found. TheCXSourceRange
will point inside the file; if the reference is inside a macro (and not a macro argument) theCXSourceRange
will be invalid.- Returns:
- one of the
CXResult
enumerators
-
nclang_findIncludesInFile
public static int nclang_findIncludesInFile(long TU, long file, long visitor, long __functionAddress) public static int nclang_findIncludesInFile(long TU, long file, long visitor)
Unsafe version of:findIncludesInFile
-
clang_findIncludesInFile
public static int clang_findIncludesInFile(long TU, long file, CXCursorAndRangeVisitor visitor)
Find#import/#include
directives in a specific file.- Parameters:
TU
- translation unit containing the file to queryfile
- to search for#import/#include
directivesvisitor
- callback that will receive pairs ofCXCursor/CXSourceRange
for each directive found- Returns:
- one of the CXResult enumerators
-
clang_index_isEntityObjCContainerKind
public static boolean clang_index_isEntityObjCContainerKind(int kind)
-
nclang_index_getObjCContainerDeclInfo
public static long nclang_index_getObjCContainerDeclInfo(long info)
-
clang_index_getObjCContainerDeclInfo
@Nullable public static CXIdxObjCContainerDeclInfo clang_index_getObjCContainerDeclInfo(CXIdxDeclInfo info)
-
nclang_index_getObjCInterfaceDeclInfo
public static long nclang_index_getObjCInterfaceDeclInfo(long info)
-
clang_index_getObjCInterfaceDeclInfo
@Nullable public static CXIdxObjCInterfaceDeclInfo clang_index_getObjCInterfaceDeclInfo(CXIdxDeclInfo info)
-
nclang_index_getObjCCategoryDeclInfo
public static long nclang_index_getObjCCategoryDeclInfo(long info)
-
clang_index_getObjCCategoryDeclInfo
@Nullable public static CXIdxObjCCategoryDeclInfo clang_index_getObjCCategoryDeclInfo(CXIdxDeclInfo info)
-
nclang_index_getObjCProtocolRefListInfo
public static long nclang_index_getObjCProtocolRefListInfo(long info)
-
clang_index_getObjCProtocolRefListInfo
@Nullable public static CXIdxObjCProtocolRefListInfo clang_index_getObjCProtocolRefListInfo(CXIdxDeclInfo info)
-
nclang_index_getObjCPropertyDeclInfo
public static long nclang_index_getObjCPropertyDeclInfo(long info)
-
clang_index_getObjCPropertyDeclInfo
@Nullable public static CXIdxObjCPropertyDeclInfo clang_index_getObjCPropertyDeclInfo(CXIdxDeclInfo info)
-
nclang_index_getIBOutletCollectionAttrInfo
public static long nclang_index_getIBOutletCollectionAttrInfo(long info)
-
clang_index_getIBOutletCollectionAttrInfo
@Nullable public static CXIdxIBOutletCollectionAttrInfo clang_index_getIBOutletCollectionAttrInfo(CXIdxAttrInfo info)
-
nclang_index_getCXXClassDeclInfo
public static long nclang_index_getCXXClassDeclInfo(long info)
-
clang_index_getCXXClassDeclInfo
@Nullable public static CXIdxCXXClassDeclInfo clang_index_getCXXClassDeclInfo(CXIdxDeclInfo info)
-
nclang_index_getClientContainer
public static long nclang_index_getClientContainer(long info)
Unsafe version of:index_getClientContainer
-
clang_index_getClientContainer
public static long clang_index_getClientContainer(CXIdxContainerInfo info)
For retrieving a customCXIdxClientContainer
attached to a container.
-
nclang_index_setClientContainer
public static void nclang_index_setClientContainer(long info, long container)
Unsafe version of:index_setClientContainer
-
clang_index_setClientContainer
public static void clang_index_setClientContainer(CXIdxContainerInfo info, long container)
For setting a customCXIdxClientContainer
attached to a container.
-
nclang_index_getClientEntity
public static long nclang_index_getClientEntity(long info)
Unsafe version of:index_getClientEntity
-
clang_index_getClientEntity
public static long clang_index_getClientEntity(CXIdxEntityInfo info)
For retrieving a customCXIdxClientEntity
attached to an entity.
-
nclang_index_setClientEntity
public static void nclang_index_setClientEntity(long info, long entity)
Unsafe version of:index_setClientEntity
-
clang_index_setClientEntity
public static void clang_index_setClientEntity(CXIdxEntityInfo info, long entity)
For setting a customCXIdxClientEntity
attached to an entity.
-
clang_IndexAction_create
public static long clang_IndexAction_create(long CIdx)
An indexing action/session, to be applied to one or multiple translation units.- Parameters:
CIdx
- the index object with which the index action will be associated
-
clang_IndexAction_dispose
public static void clang_IndexAction_dispose(long action)
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.
-
nclang_indexSourceFile
public static int nclang_indexSourceFile(long action, long client_data, long index_callbacks, int index_callbacks_size, int index_options, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, long out_TU, int TU_options)
Unsafe version of:indexSourceFile
-
clang_indexSourceFile
public static int clang_indexSourceFile(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.nio.ByteBuffer source_filename, @Nullable org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, @Nullable org.lwjgl.PointerBuffer out_TU, int TU_options) public static int clang_indexSourceFile(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.lang.CharSequence source_filename, @Nullable org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, @Nullable org.lwjgl.PointerBuffer out_TU, int TU_options)
Index the given source file and the translation unit corresponding to that file via callbacks implemented throughIndexerCallbacks
.The rest of the parameters are the same as
parseTranslationUnit
.- Parameters:
client_data
- pointer data supplied by the client, which will be passed to the invoked callbacksindex_callbacks
- pointer to indexing callbacks that the client implementsindex_callbacks_size
- size ofIndexerCallbacks
structure that gets passed inindex_callbacks
index_options
- a bitmask of options that affects how indexing is performed. This should be a bitwise OR of theCXIndexOpt_XXX
flags.out_TU
- pointer to store aCXTranslationUnit
that can be reused after indexing is finished. Set toNULL
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
CXErrorCode
.
-
nclang_indexSourceFileFullArgv
public static int nclang_indexSourceFileFullArgv(long action, long client_data, long index_callbacks, int index_callbacks_size, int index_options, long source_filename, long command_line_args, int num_command_line_args, long unsaved_files, int num_unsaved_files, long out_TU, int TU_options)
Unsafe version of:indexSourceFileFullArgv
-
clang_indexSourceFileFullArgv
public static int clang_indexSourceFileFullArgv(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.nio.ByteBuffer source_filename, org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, @Nullable org.lwjgl.PointerBuffer out_TU, int TU_options) public static int clang_indexSourceFileFullArgv(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, java.lang.CharSequence source_filename, org.lwjgl.PointerBuffer command_line_args, @Nullable CXUnsavedFile.Buffer unsaved_files, @Nullable org.lwjgl.PointerBuffer out_TU, int TU_options)
Same asindexSourceFile
but requires a full command line forcommand_line_args
includingargv[0]
. This is useful if the standard library paths are relative to the binary.
-
nclang_indexTranslationUnit
public static int nclang_indexTranslationUnit(long action, long client_data, long index_callbacks, int index_callbacks_size, int index_options, long TU)
Unsafe version of:indexTranslationUnit
-
clang_indexTranslationUnit
public static boolean clang_indexTranslationUnit(long action, long client_data, IndexerCallbacks index_callbacks, int index_callbacks_size, int index_options, long TU)
Index the given translation unit via callbacks implemented throughIndexerCallbacks
.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
indexSourceFile
.- Returns:
- if there is a failure from which there is no recovery, returns non-zero, otherwise returns 0
-
nclang_indexLoc_getFileLocation
public static void nclang_indexLoc_getFileLocation(long loc, long indexFile, long file, long line, long column, long offset, long __functionAddress) public static void nclang_indexLoc_getFileLocation(long loc, long indexFile, long file, long line, long column, long offset)
Unsafe version of:indexLoc_getFileLocation
-
clang_indexLoc_getFileLocation
public static void clang_indexLoc_getFileLocation(CXIdxLoc loc, @Nullable org.lwjgl.PointerBuffer indexFile, @Nullable org.lwjgl.PointerBuffer file, @Nullable java.nio.IntBuffer line, @Nullable java.nio.IntBuffer column, @Nullable java.nio.IntBuffer offset)
Retrieve theCXIdxFile
, file, line, column, and offset represented by the givenCXIdxLoc
.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.
-
nclang_indexLoc_getCXSourceLocation
public static void nclang_indexLoc_getCXSourceLocation(long loc, long __functionAddress, long __result) public static void nclang_indexLoc_getCXSourceLocation(long loc, long __result)
Unsafe version of:indexLoc_getCXSourceLocation
-
clang_indexLoc_getCXSourceLocation
public static CXSourceLocation clang_indexLoc_getCXSourceLocation(CXIdxLoc loc, CXSourceLocation __result)
Retrieve theCXSourceLocation
represented by the givenCXIdxLoc
.
-
nclang_Type_visitFields
public static int nclang_Type_visitFields(long T, long visitor, long client_data, long __functionAddress) public static int nclang_Type_visitFields(long T, long visitor, long client_data)
Unsafe version of:Type_visitFields
-
clang_Type_visitFields
public static boolean clang_Type_visitFields(CXType T, CXFieldVisitorI visitor)
Visit the fields of a particular type.This function visits all the direct fields of the given cursor, invoking the given
visitor
function with the cursors of each visited field. The traversal may be ended prematurely, if the visitor returnsVisit_Break
.- Parameters:
T
- the record type whose field may be visitedvisitor
- the visitor function that will be invoked for each field ofT
- Returns:
- a non-zero value if the traversal was terminated prematurely by the visitor returning
Visit_Break
-
-