Movatterモバイル変換


[0]ホーム

URL:


clang

package
v0.0.0-...-55cc526Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2021 License:BSD-3-ClauseImports:7Imported by:0

Details

Repository

github.com/go-clang/clang-v12

Links

Documentation

Overview

Package clang provides the Clang C API bindings for Go.

Index

Constants

View Source
const (AccessSpecifier_InvalidAccessSpecifier =C.CX_CXXInvalidAccessSpecifierAccessSpecifier_Public                    =C.CX_CXXPublicAccessSpecifier_Protected                 =C.CX_CXXProtectedAccessSpecifier_Private                   =C.CX_CXXPrivate)
View Source
const (// The entity is available.Availability_AvailableAvailabilityKind =C.CXAvailability_Available// The entity is available, but has been deprecated (and its use is not recommended).Availability_Deprecated =C.CXAvailability_Deprecated// The entity is not available; any use of it will be an error.Availability_NotAvailable =C.CXAvailability_NotAvailable// The entity is available, but not accessible; any use of it will be an error.Availability_NotAccessible =C.CXAvailability_NotAccessible)
View Source
const (CallingConv_DefaultCallingConv =C.CXCallingConv_DefaultCallingConv_C                             =C.CXCallingConv_CCallingConv_X86StdCall                    =C.CXCallingConv_X86StdCallCallingConv_X86FastCall                   =C.CXCallingConv_X86FastCallCallingConv_X86ThisCall                   =C.CXCallingConv_X86ThisCallCallingConv_X86Pascal                     =C.CXCallingConv_X86PascalCallingConv_AAPCS                         =C.CXCallingConv_AAPCSCallingConv_AAPCS_VFP                     =C.CXCallingConv_AAPCS_VFPCallingConv_X86RegCall                    =C.CXCallingConv_X86RegCallCallingConv_IntelOclBicc                  =C.CXCallingConv_IntelOclBiccCallingConv_Win64                         =C.CXCallingConv_Win64CallingConv_X86_64Win64                   =C.CXCallingConv_X86_64Win64CallingConv_X86_64SysV                    =C.CXCallingConv_X86_64SysVCallingConv_X86VectorCall                 =C.CXCallingConv_X86VectorCallCallingConv_Swift                         =C.CXCallingConv_SwiftCallingConv_PreserveMost                  =C.CXCallingConv_PreserveMostCallingConv_PreserveAll                   =C.CXCallingConv_PreserveAllCallingConv_AArch64VectorCall             =C.CXCallingConv_AArch64VectorCallCallingConv_Invalid                       =C.CXCallingConv_InvalidCallingConv_Unexposed                     =C.CXCallingConv_Unexposed)
View Source
const (// Terminates the cursor traversal.ChildVisit_BreakChildVisitResult =C.CXChildVisit_Break// Continues the cursor traversal with the next sibling of the cursor just visited, without visiting its children.ChildVisit_Continue =C.CXChildVisit_Continue// Recursively traverse the children of this cursor, using the same visitor and client data.ChildVisit_Recurse =C.CXChildVisit_Recurse)
View Source
const (// Whether to include macros within the set of code completions returned.CodeComplete_IncludeMacrosCodeComplete_Flags =C.CXCodeComplete_IncludeMacros// Whether to include code patterns for language constructs within the set of code completions, e.g., for loops.CodeComplete_IncludeCodePatterns =C.CXCodeComplete_IncludeCodePatterns// Whether to include brief documentation within the set of code completions returned.CodeComplete_IncludeBriefComments =C.CXCodeComplete_IncludeBriefComments// 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_SkipPreamble =C.CXCodeComplete_SkipPreamble// Whether to include completions with small fix-its, e.g. change '.' to '->' on member access, etc.CodeComplete_IncludeCompletionsWithFixIts =C.CXCodeComplete_IncludeCompletionsWithFixIts)
View Source
const (// Command argument should be rendered in a normal font.CommentInlineCommandRenderKind_NormalCommentInlineCommandRenderKind =C.CXCommentInlineCommandRenderKind_Normal// Command argument should be rendered in a bold font.CommentInlineCommandRenderKind_Bold =C.CXCommentInlineCommandRenderKind_Bold// Command argument should be rendered in a monospaced font.CommentInlineCommandRenderKind_Monospaced =C.CXCommentInlineCommandRenderKind_Monospaced// Command argument should be rendered emphasized (typically italic font).CommentInlineCommandRenderKind_Emphasized =C.CXCommentInlineCommandRenderKind_Emphasized// Command argument should not be rendered (since it only defines an anchor).CommentInlineCommandRenderKind_Anchor =C.CXCommentInlineCommandRenderKind_Anchor)
View Source
const (// Null comment. No AST node is constructed at the requested location because there is no text or a syntax error.Comment_NullCommentKind =C.CXComment_Null// Plain text. Inline content.Comment_Text =C.CXComment_Text/*A command with word-like arguments that is considered inline content.For example: \command.*/Comment_InlineCommand =C.CXComment_InlineCommand/*HTML start tag with attributes (name-value pairs). Consideredinline content.For example:\verbatim<br> <br /> <a href="http://example.org/">\endverbatim*/Comment_HTMLStartTag =C.CXComment_HTMLStartTag/*HTML end tag. Considered inline content.For example:\verbatim</a>\endverbatim*/Comment_HTMLEndTag =C.CXComment_HTMLEndTag// A paragraph, contains inline comment. The paragraph itself is block content.Comment_Paragraph =C.CXComment_Paragraph/*A command that has zero or more word-like arguments (number ofword-like arguments depends on command name) and a paragraph as anargument. Block command is block content.Paragraph argument is also a child of the block command.For example: \has 0 word-like arguments and a paragraph argument.AST nodes of special kinds that parser knows about (e. g., \\paramcommand) have their own node kinds.*/Comment_BlockCommand =C.CXComment_BlockCommand/*A \Parameter or \\arg command that describes the function parameter(name, passing direction, description).For example: \Parameter [in] ParamName description.*/Comment_ParamCommand =C.CXComment_ParamCommand/*A \\tparam command that describes a template parameter (name anddescription).For example: \\tparam T description.*/Comment_TParamCommand =C.CXComment_TParamCommand/*A verbatim block command (e. g., preformatted code). Verbatimblock has an opening and a closing command and contains multiple lines oftext (CXComment_VerbatimBlockLine child nodes).For example:\\verbatimaaa\\endverbatim*/Comment_VerbatimBlockCommand =C.CXComment_VerbatimBlockCommand// A line of text that is contained within a CXComment_VerbatimBlockCommand node.Comment_VerbatimBlockLine =C.CXComment_VerbatimBlockLine// A verbatim line command. Verbatim line has an opening command, a single line of text (up to the newline after the opening command) and has no closing command.Comment_VerbatimLine =C.CXComment_VerbatimLine// A full comment attached to a declaration, contains block content.Comment_FullComment =C.CXComment_FullComment)
View Source
const (// The parameter is an input parameter.CommentParamPassDirection_InCommentParamPassDirection =C.CXCommentParamPassDirection_In// The parameter is an output parameter.CommentParamPassDirection_Out =C.CXCommentParamPassDirection_Out// The parameter is an input and output parameter.CommentParamPassDirection_InOut =C.CXCommentParamPassDirection_InOut)
View Source
const (/*A code-completion string that describes "optional" text thatcould be a part of the template (but is not required).The Optional chunk is the only kind of chunk that has a code-completionstring for its representation, which is accessible viaclang_getCompletionChunkCompletionString(). The code-completion stringdescribes an additional part of the template that is completely optional.For example, optional chunks can be used to describe the placeholders forarguments that match up with defaulted function parameters, e.g. given:\codevoid f(int x, float y = 3.14, double z = 2.71828);\endcodeThe 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 thefunction "f" would only include the first parameter ("int x").- Fully expand all optional chunks, in which case the template for thefunction "f" would have all of the parameters.*/CompletionChunk_OptionalCompletionChunkKind =C.CXCompletionChunk_Optional/*Text that a user would be expected to type to get thiscode-completion result.There will be exactly one "typed text" chunk in a semantic string, whichwill typically provide the spelling of a keyword or the name of adeclaration that could be used at the current code point. Clients areexpected to filter the code-completion results based on the text in thischunk.*/CompletionChunk_TypedText =C.CXCompletionChunk_TypedText/*Text that should be inserted as part of a code-completion result.A "text" chunk represents text that is part of the template to beinserted into user code should this particular code-completion resultbe selected.*/CompletionChunk_Text =C.CXCompletionChunk_Text/*Placeholder text that should be replaced by the user.A "placeholder" chunk marks a place where the user should insert textinto the code-completion template. For example, placeholders might markthe function parameters for a function declaration, to indicate that theuser should provide arguments for each of those parameters. The actualtext in a placeholder is a suggestion for the text to display beforethe user replaces the placeholder with real code.*/CompletionChunk_Placeholder =C.CXCompletionChunk_Placeholder/*Informative text that should be displayed but never inserted aspart of the template.An "informative" chunk contains annotations that can be displayed tohelp the user decide whether a particular code-completion result is theright option, but which is not part of the actual template to be insertedby code completion.*/CompletionChunk_Informative =C.CXCompletionChunk_Informative/*Text that describes the current parameter when code-completion isreferring to function call, message send, or template specialization.A "current parameter" chunk occurs when code-completion is providinginformation about a parameter corresponding to the argument at thecode-completion point. For example, given a function\codeint add(int x, int y);\endcodeand the source code add(, where the code-completion point is after the"(", the code-completion string will contain a "current parameter" chunkfor "int x", indicating that the current argument will initialize thatparameter. After typing further, to add(17, (where the code-completionpoint is after the ","), the code-completion string will contain a"current parameter" chunk to "int y".*/CompletionChunk_CurrentParameter =C.CXCompletionChunk_CurrentParameter// A left parenthesis ('('), used to initiate a function call or signal the beginning of a function parameter list.CompletionChunk_LeftParen =C.CXCompletionChunk_LeftParen// A right parenthesis (')'), used to finish a function call or signal the end of a function parameter list.CompletionChunk_RightParen =C.CXCompletionChunk_RightParen// A left bracket ('[').CompletionChunk_LeftBracket =C.CXCompletionChunk_LeftBracket// A right bracket (']').CompletionChunk_RightBracket =C.CXCompletionChunk_RightBracket// A left brace ('{').CompletionChunk_LeftBrace =C.CXCompletionChunk_LeftBrace// A right brace ('}').CompletionChunk_RightBrace =C.CXCompletionChunk_RightBrace// A left angle bracket ('<').CompletionChunk_LeftAngle =C.CXCompletionChunk_LeftAngle// A right angle bracket ('>').CompletionChunk_RightAngle =C.CXCompletionChunk_RightAngle// A comma separator (',').CompletionChunk_Comma =C.CXCompletionChunk_Comma/*Text that specifies the result type of a given result.This special kind of informative chunk is not meant to be inserted intothe text buffer. Rather, it is meant to illustrate the type that anexpression using the given completion string would have.*/CompletionChunk_ResultType =C.CXCompletionChunk_ResultType// A colon (':').CompletionChunk_Colon =C.CXCompletionChunk_Colon// A semicolon (';').CompletionChunk_SemiColon =C.CXCompletionChunk_SemiColon// An '=' sign.CompletionChunk_Equal =C.CXCompletionChunk_Equal// Horizontal space (' ').CompletionChunk_HorizontalSpace =C.CXCompletionChunk_HorizontalSpace// Vertical space ('\\n'), after which it is generally a good idea to perform indentation.CompletionChunk_VerticalSpace =C.CXCompletionChunk_VerticalSpace)
View Source
const (// The context for completions is unexposed, as only Clang results should be included. (This is equivalent to having no context bits set.)CompletionContext_UnexposedCompletionContext =C.CXCompletionContext_Unexposed// Completions for any possible type should be included in the results.CompletionContext_AnyType =C.CXCompletionContext_AnyType// Completions for any possible value (variables, function calls, etc.) should be included in the results.CompletionContext_AnyValue =C.CXCompletionContext_AnyValue// Completions for values that resolve to an Objective-C object should be included in the results.CompletionContext_ObjCObjectValue =C.CXCompletionContext_ObjCObjectValue// Completions for values that resolve to an Objective-C selector should be included in the results.CompletionContext_ObjCSelectorValue =C.CXCompletionContext_ObjCSelectorValue// Completions for values that resolve to a C++ class type should be included in the results.CompletionContext_CXXClassTypeValue =C.CXCompletionContext_CXXClassTypeValue// Completions for fields of the member being accessed using the dot operator should be included in the results.CompletionContext_DotMemberAccess =C.CXCompletionContext_DotMemberAccess// Completions for fields of the member being accessed using the arrow operator should be included in the results.CompletionContext_ArrowMemberAccess =C.CXCompletionContext_ArrowMemberAccess// Completions for properties of the Objective-C object being accessed using the dot operator should be included in the results.CompletionContext_ObjCPropertyAccess =C.CXCompletionContext_ObjCPropertyAccess// Completions for enum tags should be included in the results.CompletionContext_EnumTag =C.CXCompletionContext_EnumTag// Completions for union tags should be included in the results.CompletionContext_UnionTag =C.CXCompletionContext_UnionTag// Completions for struct tags should be included in the results.CompletionContext_StructTag =C.CXCompletionContext_StructTag// Completions for C++ class names should be included in the results.CompletionContext_ClassTag =C.CXCompletionContext_ClassTag// Completions for C++ namespaces and namespace aliases should be included in the results.CompletionContext_Namespace =C.CXCompletionContext_Namespace// Completions for C++ nested name specifiers should be included in the results.CompletionContext_NestedNameSpecifier =C.CXCompletionContext_NestedNameSpecifier// Completions for Objective-C interfaces (classes) should be included in the results.CompletionContext_ObjCInterface =C.CXCompletionContext_ObjCInterface// Completions for Objective-C protocols should be included in the results.CompletionContext_ObjCProtocol =C.CXCompletionContext_ObjCProtocol// Completions for Objective-C categories should be included in the results.CompletionContext_ObjCCategory =C.CXCompletionContext_ObjCCategory// Completions for Objective-C instance messages should be included in the results.CompletionContext_ObjCInstanceMessage =C.CXCompletionContext_ObjCInstanceMessage// Completions for Objective-C class messages should be included in the results.CompletionContext_ObjCClassMessage =C.CXCompletionContext_ObjCClassMessage// Completions for Objective-C selector names should be included in the results.CompletionContext_ObjCSelectorName =C.CXCompletionContext_ObjCSelectorName// Completions for preprocessor macro names should be included in the results.CompletionContext_MacroName =C.CXCompletionContext_MacroName// Natural language completions should be included in the results.CompletionContext_NaturalLanguage =C.CXCompletionContext_NaturalLanguage// #include file completions should be included in the results.CompletionContext_IncludedFile =C.CXCompletionContext_IncludedFile// The current context is unknown, so set all contexts.CompletionContext_Unknown =C.CXCompletionContext_Unknown)
View Source
const (// The cursor has no exception specification.Cursor_ExceptionSpecificationKind_NoneCursor_ExceptionSpecificationKind =C.CXCursor_ExceptionSpecificationKind_None// The cursor has exception specification throw()Cursor_ExceptionSpecificationKind_DynamicNone =C.CXCursor_ExceptionSpecificationKind_DynamicNone// The cursor has exception specification throw(T1, T2)Cursor_ExceptionSpecificationKind_Dynamic =C.CXCursor_ExceptionSpecificationKind_Dynamic// The cursor has exception specification throw(...).Cursor_ExceptionSpecificationKind_MSAny =C.CXCursor_ExceptionSpecificationKind_MSAny// The cursor has exception specification basic noexcept.Cursor_ExceptionSpecificationKind_BasicNoexcept =C.CXCursor_ExceptionSpecificationKind_BasicNoexcept// The cursor has exception specification computed noexcept.Cursor_ExceptionSpecificationKind_ComputedNoexcept =C.CXCursor_ExceptionSpecificationKind_ComputedNoexcept// The exception specification has not yet been evaluated.Cursor_ExceptionSpecificationKind_Unevaluated =C.CXCursor_ExceptionSpecificationKind_Unevaluated// The exception specification has not yet been instantiated.Cursor_ExceptionSpecificationKind_Uninstantiated =C.CXCursor_ExceptionSpecificationKind_Uninstantiated// The exception specification has not been parsed yet.Cursor_ExceptionSpecificationKind_Unparsed =C.CXCursor_ExceptionSpecificationKind_Unparsed// The cursor has a __declspec(nothrow) exception specification.Cursor_ExceptionSpecificationKind_NoThrow =C.CXCursor_ExceptionSpecificationKind_NoThrow)
View Source
const (/*A declaration whose specific kind is not exposed via thisinterface.Unexposed declarations have the same operations as any other kindof declaration; one can extract their location information,spelling, find their definitions, etc. However, the specific kindof the declaration is not reported.*/Cursor_UnexposedDeclCursorKind =C.CXCursor_UnexposedDecl// A C or C++ struct.Cursor_StructDecl =C.CXCursor_StructDecl// A C or C++ union.Cursor_UnionDecl =C.CXCursor_UnionDecl// A C++ class.Cursor_ClassDecl =C.CXCursor_ClassDecl// An enumeration.Cursor_EnumDecl =C.CXCursor_EnumDecl// A field (in C) or non-static data member (in C++) in a struct, union, or C++ class.Cursor_FieldDecl =C.CXCursor_FieldDecl// An enumerator constant.Cursor_EnumConstantDecl =C.CXCursor_EnumConstantDecl// A function.Cursor_FunctionDecl =C.CXCursor_FunctionDecl// A variable.Cursor_VarDecl =C.CXCursor_VarDecl// A function or method parameter.Cursor_ParmDecl =C.CXCursor_ParmDecl// An Objective-C \@interface.Cursor_ObjCInterfaceDecl =C.CXCursor_ObjCInterfaceDecl// An Objective-C \@interface for a category.Cursor_ObjCCategoryDecl =C.CXCursor_ObjCCategoryDecl// An Objective-C \@protocol declaration.Cursor_ObjCProtocolDecl =C.CXCursor_ObjCProtocolDecl// An Objective-C \@property declaration.Cursor_ObjCPropertyDecl =C.CXCursor_ObjCPropertyDecl// An Objective-C instance variable.Cursor_ObjCIvarDecl =C.CXCursor_ObjCIvarDecl// An Objective-C instance method.Cursor_ObjCInstanceMethodDecl =C.CXCursor_ObjCInstanceMethodDecl// An Objective-C class method.Cursor_ObjCClassMethodDecl =C.CXCursor_ObjCClassMethodDecl// An Objective-C \@implementation.Cursor_ObjCImplementationDecl =C.CXCursor_ObjCImplementationDecl// An Objective-C \@implementation for a category.Cursor_ObjCCategoryImplDecl =C.CXCursor_ObjCCategoryImplDecl// A typedef.Cursor_TypedefDecl =C.CXCursor_TypedefDecl// A C++ class method.Cursor_CXXMethod =C.CXCursor_CXXMethod// A C++ namespace.Cursor_Namespace =C.CXCursor_Namespace// A linkage specification, e.g. 'extern "C"'.Cursor_LinkageSpec =C.CXCursor_LinkageSpec// A C++ constructor.Cursor_Constructor =C.CXCursor_Constructor// A C++ destructor.Cursor_Destructor =C.CXCursor_Destructor// A C++ conversion function.Cursor_ConversionFunction =C.CXCursor_ConversionFunction// A C++ template type parameter.Cursor_TemplateTypeParameter =C.CXCursor_TemplateTypeParameter// A C++ non-type template parameter.Cursor_NonTypeTemplateParameter =C.CXCursor_NonTypeTemplateParameter// A C++ template template parameter.Cursor_TemplateTemplateParameter =C.CXCursor_TemplateTemplateParameter// A C++ function template.Cursor_FunctionTemplate =C.CXCursor_FunctionTemplate// A C++ class template.Cursor_ClassTemplate =C.CXCursor_ClassTemplate// A C++ class template partial specialization.Cursor_ClassTemplatePartialSpecialization =C.CXCursor_ClassTemplatePartialSpecialization// A C++ namespace alias declaration.Cursor_NamespaceAlias =C.CXCursor_NamespaceAlias// A C++ using directive.Cursor_UsingDirective =C.CXCursor_UsingDirective// A C++ using declaration.Cursor_UsingDeclaration =C.CXCursor_UsingDeclaration// A C++ alias declarationCursor_TypeAliasDecl =C.CXCursor_TypeAliasDecl// An Objective-C \@synthesize definition.Cursor_ObjCSynthesizeDecl =C.CXCursor_ObjCSynthesizeDecl// An Objective-C \@dynamic definition.Cursor_ObjCDynamicDecl =C.CXCursor_ObjCDynamicDecl// An access specifier.Cursor_CXXAccessSpecifier =C.CXCursor_CXXAccessSpecifier// An access specifier.Cursor_FirstDecl =C.CXCursor_FirstDecl// An access specifier.Cursor_LastDecl =C.CXCursor_LastDecl// An access specifier.Cursor_FirstRef =C.CXCursor_FirstRef// An access specifier.Cursor_ObjCSuperClassRef =C.CXCursor_ObjCSuperClassRef// An access specifier.Cursor_ObjCProtocolRef =C.CXCursor_ObjCProtocolRef// An access specifier.Cursor_ObjCClassRef =C.CXCursor_ObjCClassRef/*A reference to a type declaration.A type reference occurs anywhere where a type is named but notdeclared. For example, given:\codetypedef unsigned size_type;size_type size;\endcodeThe typedef is a declaration of size_type (CXCursor_TypedefDecl),while the type of the variable "size" is referenced. The cursorreferenced by the type of size is the typedef for size_type.*/Cursor_TypeRef =C.CXCursor_TypeRef/*A reference to a type declaration.A type reference occurs anywhere where a type is named but notdeclared. For example, given:\codetypedef unsigned size_type;size_type size;\endcodeThe typedef is a declaration of size_type (CXCursor_TypedefDecl),while the type of the variable "size" is referenced. The cursorreferenced by the type of size is the typedef for size_type.*/Cursor_CXXBaseSpecifier =C.CXCursor_CXXBaseSpecifier// A reference to a class template, function template, template template parameter, or class template partial specialization.Cursor_TemplateRef =C.CXCursor_TemplateRef// A reference to a namespace or namespace alias.Cursor_NamespaceRef =C.CXCursor_NamespaceRef// A reference to a member of a struct, union, or class that occurs in some non-expression context, e.g., a designated initializer.Cursor_MemberRef =C.CXCursor_MemberRef/*A reference to a labeled statement.This cursor kind is used to describe the jump to "start_over" in thegoto statement in the following example:\codestart_over:++counter;goto start_over;\endcodeA label reference cursor refers to a label statement.*/Cursor_LabelRef =C.CXCursor_LabelRef/*A reference to a set of overloaded functions or function templatesthat has not yet been resolved to a specific function or function template.An overloaded declaration reference cursor occurs in C++ templates wherea dependent name refers to a function. For example:\codetemplate<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&);\endcodeHere, the identifier "swap" is associated with an overloaded declarationreference. In the template definition, "swap" refers to either of the two"swap" functions declared above, so both results will be available. Atinstantiation time, "swap" may also refer to other functions found viaargument-dependent lookup (e.g., the "swap" function at the end of theexample).The functions clang_getNumOverloadedDecls() andclang_getOverloadedDecl() can be used to retrieve the definitionsreferenced by this cursor.*/Cursor_OverloadedDeclRef =C.CXCursor_OverloadedDeclRef// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_VariableRef =C.CXCursor_VariableRef// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_LastRef =C.CXCursor_LastRef// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_FirstInvalid =C.CXCursor_FirstInvalid// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_InvalidFile =C.CXCursor_InvalidFile// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_NoDeclFound =C.CXCursor_NoDeclFound// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_NotImplemented =C.CXCursor_NotImplemented// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_InvalidCode =C.CXCursor_InvalidCode// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_LastInvalid =C.CXCursor_LastInvalid// A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.Cursor_FirstExpr =C.CXCursor_FirstExpr/*An expression whose specific kind is not exposed via thisinterface.Unexposed expressions have the same operations as any other kindof expression; one can extract their location information,spelling, children, etc. However, the specific kind of theexpression is not reported.*/Cursor_UnexposedExpr =C.CXCursor_UnexposedExpr// An expression that refers to some value declaration, such as a function, variable, or enumerator.Cursor_DeclRefExpr =C.CXCursor_DeclRefExpr// An expression that refers to a member of a struct, union, class, Objective-C class, etc.Cursor_MemberRefExpr =C.CXCursor_MemberRefExpr// An expression that calls a function.Cursor_CallExpr =C.CXCursor_CallExpr// An expression that sends a message to an Objective-C  object or class.Cursor_ObjCMessageExpr =C.CXCursor_ObjCMessageExpr// An expression that represents a block literal.Cursor_BlockExpr =C.CXCursor_BlockExpr// An integer literal.Cursor_IntegerLiteral =C.CXCursor_IntegerLiteral// A floating point number literal.Cursor_FloatingLiteral =C.CXCursor_FloatingLiteral// An imaginary number literal.Cursor_ImaginaryLiteral =C.CXCursor_ImaginaryLiteral// A string literal.Cursor_StringLiteral =C.CXCursor_StringLiteral// A character literal.Cursor_CharacterLiteral =C.CXCursor_CharacterLiteral/*A parenthesized expression, e.g. "(1)".This AST node is only formed if full location information is requested.*/Cursor_ParenExpr =C.CXCursor_ParenExpr// This represents the unary-expression's (except sizeof and alignof).Cursor_UnaryOperator =C.CXCursor_UnaryOperator// [C99 6.5.2.1] Array Subscripting.Cursor_ArraySubscriptExpr =C.CXCursor_ArraySubscriptExpr// A builtin binary operation expression such as "x + y" or "x <= y".Cursor_BinaryOperator =C.CXCursor_BinaryOperator// Compound assignment such as "+=".Cursor_CompoundAssignOperator =C.CXCursor_CompoundAssignOperator// The ?: ternary operator.Cursor_ConditionalOperator =C.CXCursor_ConditionalOperator/*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_CStyleCastExpr =C.CXCursor_CStyleCastExpr// [C99 6.5.2.5]Cursor_CompoundLiteralExpr =C.CXCursor_CompoundLiteralExpr// Describes an C or C++ initializer list.Cursor_InitListExpr =C.CXCursor_InitListExpr// The GNU address of label extension, representing &&label.Cursor_AddrLabelExpr =C.CXCursor_AddrLabelExpr// This is the GNU Statement Expression extension: ({int X=4; X;})Cursor_StmtExpr =C.CXCursor_StmtExpr// Represents a C11 generic selection.Cursor_GenericSelectionExpr =C.CXCursor_GenericSelectionExpr/*Implements the GNU __null extension, which is a name for a nullpointer constant that has integral type (e.g., int or long) and is the samesize and alignment as a pointer.The __null extension is typically only used by system headers, which defineNULL as __null in C++ rather than using 0 (which is an integer that may notmatch the size of a pointer).*/Cursor_GNUNullExpr =C.CXCursor_GNUNullExpr// C++'s static_cast<> expression.Cursor_CXXStaticCastExpr =C.CXCursor_CXXStaticCastExpr// C++'s dynamic_cast<> expression.Cursor_CXXDynamicCastExpr =C.CXCursor_CXXDynamicCastExpr// C++'s reinterpret_cast<> expression.Cursor_CXXReinterpretCastExpr =C.CXCursor_CXXReinterpretCastExpr// C++'s const_cast<> expression.Cursor_CXXConstCastExpr =C.CXCursor_CXXConstCastExpr/*Represents an explicit C++ type conversion that uses "functional"notion (C++ [expr.type.conv]).Example:\codex = int(0.5);\endcode*/Cursor_CXXFunctionalCastExpr =C.CXCursor_CXXFunctionalCastExpr// A C++ typeid expression (C++ [expr.typeid]).Cursor_CXXTypeidExpr =C.CXCursor_CXXTypeidExpr// [C++ 2.13.5] C++ Boolean Literal.Cursor_CXXBoolLiteralExpr =C.CXCursor_CXXBoolLiteralExpr// [C++0x 2.14.7] C++ Pointer Literal.Cursor_CXXNullPtrLiteralExpr =C.CXCursor_CXXNullPtrLiteralExpr// Represents the "this" expression in C++Cursor_CXXThisExpr =C.CXCursor_CXXThisExpr/*[C++ 15] C++ Throw Expression.This handles 'throw' and 'throw' assignment-expression. Whenassignment-expression isn't present, Op will be null.*/Cursor_CXXThrowExpr =C.CXCursor_CXXThrowExpr// A new expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".Cursor_CXXNewExpr =C.CXCursor_CXXNewExpr// A delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray".Cursor_CXXDeleteExpr =C.CXCursor_CXXDeleteExpr// A unary expression. (noexcept, sizeof, or other traits)Cursor_UnaryExpr =C.CXCursor_UnaryExpr// An Objective-C string literal i.e. @"foo".Cursor_ObjCStringLiteral =C.CXCursor_ObjCStringLiteral// An Objective-C \@encode expression.Cursor_ObjCEncodeExpr =C.CXCursor_ObjCEncodeExpr// An Objective-C \@selector expression.Cursor_ObjCSelectorExpr =C.CXCursor_ObjCSelectorExpr// An Objective-C \@protocol expression.Cursor_ObjCProtocolExpr =C.CXCursor_ObjCProtocolExpr/*An Objective-C "bridged" cast expression, which casts betweenObjective-C pointers and C pointers, transferring ownership in the process.\codeNSString *str = (__bridge_transfer NSString *)CFCreateString();\endcode*/Cursor_ObjCBridgedCastExpr =C.CXCursor_ObjCBridgedCastExpr/*Represents a C++0x pack expansion that produces a sequence ofexpressions.A pack expansion expression contains a pattern (which itself is anexpression) followed by an ellipsis. For example:\codetemplate<typename F, typename ...Types>void forward(F f, Types &&...args) {f(static_cast<Types&&>(args)...);}\endcode*/Cursor_PackExpansionExpr =C.CXCursor_PackExpansionExpr/*Represents an expression that computes the length of a parameterpack.\codetemplate<typename ...Types>struct count {static const unsigned value = sizeof...(Types);};\endcode*/Cursor_SizeOfPackExpr =C.CXCursor_SizeOfPackExprCursor_LambdaExpr     =C.CXCursor_LambdaExpr// Objective-c Boolean Literal.Cursor_ObjCBoolLiteralExpr =C.CXCursor_ObjCBoolLiteralExpr// Represents the "self" expression in an Objective-C method.Cursor_ObjCSelfExpr =C.CXCursor_ObjCSelfExpr// OpenMP 5.0 [2.1.5, Array Section].Cursor_OMPArraySectionExpr =C.CXCursor_OMPArraySectionExpr// Represents an @available(...) check.Cursor_ObjCAvailabilityCheckExpr =C.CXCursor_ObjCAvailabilityCheckExpr// Fixed point literalCursor_FixedPointLiteral =C.CXCursor_FixedPointLiteral// OpenMP 5.0 [2.1.4, Array Shaping].Cursor_OMPArrayShapingExpr =C.CXCursor_OMPArrayShapingExpr// OpenMP 5.0 [2.1.6 Iterators]Cursor_OMPIteratorExpr =C.CXCursor_OMPIteratorExpr// OpenCL's addrspace_cast<> expression.Cursor_CXXAddrspaceCastExpr =C.CXCursor_CXXAddrspaceCastExpr// OpenCL's addrspace_cast<> expression.Cursor_LastExpr =C.CXCursor_LastExpr// OpenCL's addrspace_cast<> expression.Cursor_FirstStmt =C.CXCursor_FirstStmt/*A statement whose specific kind is not exposed via thisinterface.Unexposed statements have the same operations as any other kind ofstatement; one can extract their location information, spelling,children, etc. However, the specific kind of the statement is notreported.*/Cursor_UnexposedStmt =C.CXCursor_UnexposedStmt/*A labelled statement in a function.This cursor kind is used to describe the "start_over:" label statement inthe following example:\codestart_over:++counter;\endcode*/Cursor_LabelStmt =C.CXCursor_LabelStmt/*A group of statements like { stmt stmt }.This cursor kind is used to describe compound statements, e.g. functionbodies.*/Cursor_CompoundStmt =C.CXCursor_CompoundStmt// A case statement.Cursor_CaseStmt =C.CXCursor_CaseStmt// A default statement.Cursor_DefaultStmt =C.CXCursor_DefaultStmt// An if statementCursor_IfStmt =C.CXCursor_IfStmt// A switch statement.Cursor_SwitchStmt =C.CXCursor_SwitchStmt// A while statement.Cursor_WhileStmt =C.CXCursor_WhileStmt// A do statement.Cursor_DoStmt =C.CXCursor_DoStmt// A for statement.Cursor_ForStmt =C.CXCursor_ForStmt// A goto statement.Cursor_GotoStmt =C.CXCursor_GotoStmt// An indirect goto statement.Cursor_IndirectGotoStmt =C.CXCursor_IndirectGotoStmt// A continue statement.Cursor_ContinueStmt =C.CXCursor_ContinueStmt// A break statement.Cursor_BreakStmt =C.CXCursor_BreakStmt// A return statement.Cursor_ReturnStmt =C.CXCursor_ReturnStmt// A GCC inline assembly statement extension.Cursor_GCCAsmStmt =C.CXCursor_GCCAsmStmt// A GCC inline assembly statement extension.Cursor_AsmStmt =C.CXCursor_AsmStmt// Objective-C's overall \@try-\@catch-\@finally statement.Cursor_ObjCAtTryStmt =C.CXCursor_ObjCAtTryStmt// Objective-C's \@catch statement.Cursor_ObjCAtCatchStmt =C.CXCursor_ObjCAtCatchStmt// Objective-C's \@finally statement.Cursor_ObjCAtFinallyStmt =C.CXCursor_ObjCAtFinallyStmt// Objective-C's \@throw statement.Cursor_ObjCAtThrowStmt =C.CXCursor_ObjCAtThrowStmt// Objective-C's \@synchronized statement.Cursor_ObjCAtSynchronizedStmt =C.CXCursor_ObjCAtSynchronizedStmt// Objective-C's autorelease pool statement.Cursor_ObjCAutoreleasePoolStmt =C.CXCursor_ObjCAutoreleasePoolStmt// Objective-C's collection statement.Cursor_ObjCForCollectionStmt =C.CXCursor_ObjCForCollectionStmt// C++'s catch statement.Cursor_CXXCatchStmt =C.CXCursor_CXXCatchStmt// C++'s try statement.Cursor_CXXTryStmt =C.CXCursor_CXXTryStmt// C++'s for (* : *) statement.Cursor_CXXForRangeStmt =C.CXCursor_CXXForRangeStmt// Windows Structured Exception Handling's try statement.Cursor_SEHTryStmt =C.CXCursor_SEHTryStmt// Windows Structured Exception Handling's except statement.Cursor_SEHExceptStmt =C.CXCursor_SEHExceptStmt// Windows Structured Exception Handling's finally statement.Cursor_SEHFinallyStmt =C.CXCursor_SEHFinallyStmt// A MS inline assembly statement extension.Cursor_MSAsmStmt =C.CXCursor_MSAsmStmt/*The null statement ";": C99 6.8.3p3.This cursor kind is used to describe the null statement.*/Cursor_NullStmt =C.CXCursor_NullStmt// Adaptor class for mixing declarations with statements and expressions.Cursor_DeclStmt =C.CXCursor_DeclStmt// OpenMP parallel directive.Cursor_OMPParallelDirective =C.CXCursor_OMPParallelDirective// OpenMP SIMD directive.Cursor_OMPSimdDirective =C.CXCursor_OMPSimdDirective// OpenMP for directive.Cursor_OMPForDirective =C.CXCursor_OMPForDirective// OpenMP sections directive.Cursor_OMPSectionsDirective =C.CXCursor_OMPSectionsDirective// OpenMP section directive.Cursor_OMPSectionDirective =C.CXCursor_OMPSectionDirective// OpenMP single directive.Cursor_OMPSingleDirective =C.CXCursor_OMPSingleDirective// OpenMP parallel for directive.Cursor_OMPParallelForDirective =C.CXCursor_OMPParallelForDirective// OpenMP parallel sections directive.Cursor_OMPParallelSectionsDirective =C.CXCursor_OMPParallelSectionsDirective// OpenMP task directive.Cursor_OMPTaskDirective =C.CXCursor_OMPTaskDirective// OpenMP master directive.Cursor_OMPMasterDirective =C.CXCursor_OMPMasterDirective// OpenMP critical directive.Cursor_OMPCriticalDirective =C.CXCursor_OMPCriticalDirective// OpenMP taskyield directive.Cursor_OMPTaskyieldDirective =C.CXCursor_OMPTaskyieldDirective// OpenMP barrier directive.Cursor_OMPBarrierDirective =C.CXCursor_OMPBarrierDirective// OpenMP taskwait directive.Cursor_OMPTaskwaitDirective =C.CXCursor_OMPTaskwaitDirective// OpenMP flush directive.Cursor_OMPFlushDirective =C.CXCursor_OMPFlushDirective// Windows Structured Exception Handling's leave statement.Cursor_SEHLeaveStmt =C.CXCursor_SEHLeaveStmt// OpenMP ordered directive.Cursor_OMPOrderedDirective =C.CXCursor_OMPOrderedDirective// OpenMP atomic directive.Cursor_OMPAtomicDirective =C.CXCursor_OMPAtomicDirective// OpenMP for SIMD directive.Cursor_OMPForSimdDirective =C.CXCursor_OMPForSimdDirective// OpenMP parallel for SIMD directive.Cursor_OMPParallelForSimdDirective =C.CXCursor_OMPParallelForSimdDirective// OpenMP target directive.Cursor_OMPTargetDirective =C.CXCursor_OMPTargetDirective// OpenMP teams directive.Cursor_OMPTeamsDirective =C.CXCursor_OMPTeamsDirective// OpenMP taskgroup directive.Cursor_OMPTaskgroupDirective =C.CXCursor_OMPTaskgroupDirective// OpenMP cancellation point directive.Cursor_OMPCancellationPointDirective =C.CXCursor_OMPCancellationPointDirective// OpenMP cancel directive.Cursor_OMPCancelDirective =C.CXCursor_OMPCancelDirective// OpenMP target data directive.Cursor_OMPTargetDataDirective =C.CXCursor_OMPTargetDataDirective// OpenMP taskloop directive.Cursor_OMPTaskLoopDirective =C.CXCursor_OMPTaskLoopDirective// OpenMP taskloop simd directive.Cursor_OMPTaskLoopSimdDirective =C.CXCursor_OMPTaskLoopSimdDirective// OpenMP distribute directive.Cursor_OMPDistributeDirective =C.CXCursor_OMPDistributeDirective// OpenMP target enter data directive.Cursor_OMPTargetEnterDataDirective =C.CXCursor_OMPTargetEnterDataDirective// OpenMP target exit data directive.Cursor_OMPTargetExitDataDirective =C.CXCursor_OMPTargetExitDataDirective// OpenMP target parallel directive.Cursor_OMPTargetParallelDirective =C.CXCursor_OMPTargetParallelDirective// OpenMP target parallel for directive.Cursor_OMPTargetParallelForDirective =C.CXCursor_OMPTargetParallelForDirective// OpenMP target update directive.Cursor_OMPTargetUpdateDirective =C.CXCursor_OMPTargetUpdateDirective// OpenMP distribute parallel for directive.Cursor_OMPDistributeParallelForDirective =C.CXCursor_OMPDistributeParallelForDirective// OpenMP distribute parallel for simd directive.Cursor_OMPDistributeParallelForSimdDirective =C.CXCursor_OMPDistributeParallelForSimdDirective// OpenMP distribute simd directive.Cursor_OMPDistributeSimdDirective =C.CXCursor_OMPDistributeSimdDirective// OpenMP target parallel for simd directive.Cursor_OMPTargetParallelForSimdDirective =C.CXCursor_OMPTargetParallelForSimdDirective// OpenMP target simd directive.Cursor_OMPTargetSimdDirective =C.CXCursor_OMPTargetSimdDirective// OpenMP teams distribute directive.Cursor_OMPTeamsDistributeDirective =C.CXCursor_OMPTeamsDistributeDirective// OpenMP teams distribute simd directive.Cursor_OMPTeamsDistributeSimdDirective =C.CXCursor_OMPTeamsDistributeSimdDirective// OpenMP teams distribute parallel for simd directive.Cursor_OMPTeamsDistributeParallelForSimdDirective =C.CXCursor_OMPTeamsDistributeParallelForSimdDirective// OpenMP teams distribute parallel for directive.Cursor_OMPTeamsDistributeParallelForDirective =C.CXCursor_OMPTeamsDistributeParallelForDirective// OpenMP target teams directive.Cursor_OMPTargetTeamsDirective =C.CXCursor_OMPTargetTeamsDirective// OpenMP target teams distribute directive.Cursor_OMPTargetTeamsDistributeDirective =C.CXCursor_OMPTargetTeamsDistributeDirective// OpenMP target teams distribute parallel for directive.Cursor_OMPTargetTeamsDistributeParallelForDirective =C.CXCursor_OMPTargetTeamsDistributeParallelForDirective// OpenMP target teams distribute parallel for simd directive.Cursor_OMPTargetTeamsDistributeParallelForSimdDirective =C.CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective// OpenMP target teams distribute simd directive.Cursor_OMPTargetTeamsDistributeSimdDirective =C.CXCursor_OMPTargetTeamsDistributeSimdDirective// C++2a std::bit_cast expression.Cursor_BuiltinBitCastExpr =C.CXCursor_BuiltinBitCastExpr// OpenMP master taskloop directive.Cursor_OMPMasterTaskLoopDirective =C.CXCursor_OMPMasterTaskLoopDirective// OpenMP parallel master taskloop directive.Cursor_OMPParallelMasterTaskLoopDirective =C.CXCursor_OMPParallelMasterTaskLoopDirective// OpenMP master taskloop simd directive.Cursor_OMPMasterTaskLoopSimdDirective =C.CXCursor_OMPMasterTaskLoopSimdDirective// OpenMP parallel master taskloop simd directive.Cursor_OMPParallelMasterTaskLoopSimdDirective =C.CXCursor_OMPParallelMasterTaskLoopSimdDirective// OpenMP parallel master directive.Cursor_OMPParallelMasterDirective =C.CXCursor_OMPParallelMasterDirective// OpenMP depobj directive.Cursor_OMPDepobjDirective =C.CXCursor_OMPDepobjDirective// OpenMP scan directive.Cursor_OMPScanDirective =C.CXCursor_OMPScanDirective// OpenMP scan directive.Cursor_LastStmt =C.CXCursor_LastStmt/*Cursor that represents the translation unit itself.The translation unit cursor exists primarily to act as the rootcursor for traversing the contents of a translation unit.*/Cursor_TranslationUnit =C.CXCursor_TranslationUnit/*Cursor that represents the translation unit itself.The translation unit cursor exists primarily to act as the rootcursor for traversing the contents of a translation unit.*/Cursor_FirstAttr =C.CXCursor_FirstAttr// An attribute whose specific kind is not exposed via this interface.Cursor_UnexposedAttr =C.CXCursor_UnexposedAttr// An attribute whose specific kind is not exposed via this interface.Cursor_IBActionAttr =C.CXCursor_IBActionAttr// An attribute whose specific kind is not exposed via this interface.Cursor_IBOutletAttr =C.CXCursor_IBOutletAttr// An attribute whose specific kind is not exposed via this interface.Cursor_IBOutletCollectionAttr =C.CXCursor_IBOutletCollectionAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CXXFinalAttr =C.CXCursor_CXXFinalAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CXXOverrideAttr =C.CXCursor_CXXOverrideAttr// An attribute whose specific kind is not exposed via this interface.Cursor_AnnotateAttr =C.CXCursor_AnnotateAttr// An attribute whose specific kind is not exposed via this interface.Cursor_AsmLabelAttr =C.CXCursor_AsmLabelAttr// An attribute whose specific kind is not exposed via this interface.Cursor_PackedAttr =C.CXCursor_PackedAttr// An attribute whose specific kind is not exposed via this interface.Cursor_PureAttr =C.CXCursor_PureAttr// An attribute whose specific kind is not exposed via this interface.Cursor_ConstAttr =C.CXCursor_ConstAttr// An attribute whose specific kind is not exposed via this interface.Cursor_NoDuplicateAttr =C.CXCursor_NoDuplicateAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CUDAConstantAttr =C.CXCursor_CUDAConstantAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CUDADeviceAttr =C.CXCursor_CUDADeviceAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CUDAGlobalAttr =C.CXCursor_CUDAGlobalAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CUDAHostAttr =C.CXCursor_CUDAHostAttr// An attribute whose specific kind is not exposed via this interface.Cursor_CUDASharedAttr =C.CXCursor_CUDASharedAttr// An attribute whose specific kind is not exposed via this interface.Cursor_VisibilityAttr =C.CXCursor_VisibilityAttr// An attribute whose specific kind is not exposed via this interface.Cursor_DLLExport =C.CXCursor_DLLExport// An attribute whose specific kind is not exposed via this interface.Cursor_DLLImport =C.CXCursor_DLLImport// An attribute whose specific kind is not exposed via this interface.Cursor_NSReturnsRetained =C.CXCursor_NSReturnsRetained// An attribute whose specific kind is not exposed via this interface.Cursor_NSReturnsNotRetained =C.CXCursor_NSReturnsNotRetained// An attribute whose specific kind is not exposed via this interface.Cursor_NSReturnsAutoreleased =C.CXCursor_NSReturnsAutoreleased// An attribute whose specific kind is not exposed via this interface.Cursor_NSConsumesSelf =C.CXCursor_NSConsumesSelf// An attribute whose specific kind is not exposed via this interface.Cursor_NSConsumed =C.CXCursor_NSConsumed// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCException =C.CXCursor_ObjCException// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCNSObject =C.CXCursor_ObjCNSObject// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCIndependentClass =C.CXCursor_ObjCIndependentClass// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCPreciseLifetime =C.CXCursor_ObjCPreciseLifetime// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCReturnsInnerPointer =C.CXCursor_ObjCReturnsInnerPointer// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCRequiresSuper =C.CXCursor_ObjCRequiresSuper// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCRootClass =C.CXCursor_ObjCRootClass// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCSubclassingRestricted =C.CXCursor_ObjCSubclassingRestricted// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCExplicitProtocolImpl =C.CXCursor_ObjCExplicitProtocolImpl// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCDesignatedInitializer =C.CXCursor_ObjCDesignatedInitializer// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCRuntimeVisible =C.CXCursor_ObjCRuntimeVisible// An attribute whose specific kind is not exposed via this interface.Cursor_ObjCBoxable =C.CXCursor_ObjCBoxable// An attribute whose specific kind is not exposed via this interface.Cursor_FlagEnum =C.CXCursor_FlagEnum// An attribute whose specific kind is not exposed via this interface.Cursor_ConvergentAttr =C.CXCursor_ConvergentAttr// An attribute whose specific kind is not exposed via this interface.Cursor_WarnUnusedAttr =C.CXCursor_WarnUnusedAttr// An attribute whose specific kind is not exposed via this interface.Cursor_WarnUnusedResultAttr =C.CXCursor_WarnUnusedResultAttr// An attribute whose specific kind is not exposed via this interface.Cursor_AlignedAttr =C.CXCursor_AlignedAttr// An attribute whose specific kind is not exposed via this interface.Cursor_LastAttr =C.CXCursor_LastAttr// An attribute whose specific kind is not exposed via this interface.Cursor_PreprocessingDirective =C.CXCursor_PreprocessingDirective// An attribute whose specific kind is not exposed via this interface.Cursor_MacroDefinition =C.CXCursor_MacroDefinition// An attribute whose specific kind is not exposed via this interface.Cursor_MacroExpansion =C.CXCursor_MacroExpansion// An attribute whose specific kind is not exposed via this interface.Cursor_MacroInstantiation =C.CXCursor_MacroInstantiation// An attribute whose specific kind is not exposed via this interface.Cursor_InclusionDirective =C.CXCursor_InclusionDirective// An attribute whose specific kind is not exposed via this interface.Cursor_FirstPreprocessing =C.CXCursor_FirstPreprocessing// An attribute whose specific kind is not exposed via this interface.Cursor_LastPreprocessing =C.CXCursor_LastPreprocessing// A module import declaration.Cursor_ModuleImportDecl =C.CXCursor_ModuleImportDecl// A module import declaration.Cursor_TypeAliasTemplateDecl =C.CXCursor_TypeAliasTemplateDecl// A static_assert or _Static_assert nodeCursor_StaticAssert =C.CXCursor_StaticAssert// a friend declaration.Cursor_FriendDecl =C.CXCursor_FriendDecl// a friend declaration.Cursor_FirstExtraDecl =C.CXCursor_FirstExtraDecl// a friend declaration.Cursor_LastExtraDecl =C.CXCursor_LastExtraDecl// A code completion overload candidate.Cursor_OverloadCandidate =C.CXCursor_OverloadCandidate)
View Source
const (DeclQualifier_NoneDeclQualifierKind =C.CXObjCDeclQualifier_NoneDeclQualifier_In                       =C.CXObjCDeclQualifier_InDeclQualifier_Inout                    =C.CXObjCDeclQualifier_InoutDeclQualifier_Out                      =C.CXObjCDeclQualifier_OutDeclQualifier_Bycopy                   =C.CXObjCDeclQualifier_BycopyDeclQualifier_Byref                    =C.CXObjCDeclQualifier_ByrefDeclQualifier_Oneway                   =C.CXObjCDeclQualifier_Oneway)
View Source
const (/*Display the source-location information where thediagnostic was located.When set, diagnostics will be prefixed by the file, line, and(optionally) column to which the diagnostic refers. For example,\codetest.c:28: warning: extra tokens at end of #endif directive\endcodeThis option corresponds to the clang flag -fshow-source-location.*/Diagnostic_DisplaySourceLocationDiagnosticDisplayOptions =C.CXDiagnostic_DisplaySourceLocation/*If displaying the source-location information of thediagnostic, also include the column number.This option corresponds to the clang flag -fshow-column.*/Diagnostic_DisplayColumn =C.CXDiagnostic_DisplayColumn/*If displaying the source-location information of thediagnostic, also include information about source ranges in amachine-parsable format.This option corresponds to the clang flag-fdiagnostics-print-source-range-info.*/Diagnostic_DisplaySourceRanges =C.CXDiagnostic_DisplaySourceRanges/*Display the option name associated with this diagnostic, if any.The option name displayed (e.g., -Wconversion) will be placed in bracketsafter the diagnostic text. This option corresponds to the clang flag-fdiagnostics-show-option.*/Diagnostic_DisplayOption =C.CXDiagnostic_DisplayOption/*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_DisplayCategoryId =C.CXDiagnostic_DisplayCategoryId/*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.*/Diagnostic_DisplayCategoryName =C.CXDiagnostic_DisplayCategoryName)
View Source
const (// A diagnostic that has been suppressed, e.g., by a command-line option.Diagnostic_IgnoredDiagnosticSeverity =C.CXDiagnostic_Ignored// This diagnostic is a note that should be attached to the previous (non-note) diagnostic.Diagnostic_Note =C.CXDiagnostic_Note// This diagnostic indicates suspicious code that may not be wrong.Diagnostic_Warning =C.CXDiagnostic_Warning// This diagnostic indicates that the code is ill-formed.Diagnostic_Error =C.CXDiagnostic_Error// This diagnostic indicates that the code is ill-formed such that future parser recovery is unlikely to produce useful results.Diagnostic_Fatal =C.CXDiagnostic_Fatal)
View Source
const (// No error.Error_SuccessErrorCode =C.CXError_Success/*A generic error code, no further details are available.Errors of this kind can get their own specific error codes in futurelibclang versions.*/Error_Failure =C.CXError_Failure// libclang crashed while performing the requested operation.Error_Crashed =C.CXError_Crashed// The function detected that the arguments violate the function contract.Error_InvalidArguments =C.CXError_InvalidArguments// An AST deserialization error has occurred.Error_ASTReadError =C.CXError_ASTReadError)
View Source
const (Eval_IntEvalResultKind =C.CXEval_IntEval_Float                         =C.CXEval_FloatEval_ObjCStrLiteral                =C.CXEval_ObjCStrLiteralEval_StrLiteral                    =C.CXEval_StrLiteralEval_CFStr                         =C.CXEval_CFStrEval_Other                         =C.CXEval_OtherEval_UnExposed                     =C.CXEval_UnExposed)
View Source
const (// Used to indicate that no special CXIndex options are needed.GlobalOpt_NoneGlobalOptFlags =C.CXGlobalOpt_None/*Used to indicate that threads that libclang creates for indexingpurposes should use background priority.Affects #clang_indexSourceFile, #clang_indexTranslationUnit,#clang_parseTranslationUnit, #clang_saveTranslationUnit.*/GlobalOpt_ThreadBackgroundPriorityForIndexing =C.CXGlobalOpt_ThreadBackgroundPriorityForIndexing/*Used to indicate that threads that libclang creates for editingpurposes should use background priority.Affects #clang_reparseTranslationUnit, #clang_codeCompleteAt,#clang_annotateTokens*/GlobalOpt_ThreadBackgroundPriorityForEditing =C.CXGlobalOpt_ThreadBackgroundPriorityForEditing// Used to indicate that all threads that libclang creates should use background priority.GlobalOpt_ThreadBackgroundPriorityForAll =C.CXGlobalOpt_ThreadBackgroundPriorityForAll)
View Source
const (IdxAttr_UnexposedIdxAttrKind =C.CXIdxAttr_UnexposedIdxAttr_IBAction                       =C.CXIdxAttr_IBActionIdxAttr_IBOutlet                       =C.CXIdxAttr_IBOutletIdxAttr_IBOutletCollection             =C.CXIdxAttr_IBOutletCollection)
View Source
const (IdxEntity_NonTemplateIdxEntityCXXTemplateKind =C.CXIdxEntity_NonTemplateIdxEntity_Template                                               =C.CXIdxEntity_TemplateIdxEntity_TemplatePartialSpecialization                          =C.CXIdxEntity_TemplatePartialSpecializationIdxEntity_TemplateSpecialization                                 =C.CXIdxEntity_TemplateSpecialization)
View Source
const (IdxEntity_UnexposedIdxEntityKind =C.CXIdxEntity_UnexposedIdxEntity_Typedef                             =C.CXIdxEntity_TypedefIdxEntity_Function                            =C.CXIdxEntity_FunctionIdxEntity_Variable                            =C.CXIdxEntity_VariableIdxEntity_Field                               =C.CXIdxEntity_FieldIdxEntity_EnumConstant                        =C.CXIdxEntity_EnumConstantIdxEntity_ObjCClass                           =C.CXIdxEntity_ObjCClassIdxEntity_ObjCProtocol                        =C.CXIdxEntity_ObjCProtocolIdxEntity_ObjCCategory                        =C.CXIdxEntity_ObjCCategoryIdxEntity_ObjCInstanceMethod                  =C.CXIdxEntity_ObjCInstanceMethodIdxEntity_ObjCClassMethod                     =C.CXIdxEntity_ObjCClassMethodIdxEntity_ObjCProperty                        =C.CXIdxEntity_ObjCPropertyIdxEntity_ObjCIvar                            =C.CXIdxEntity_ObjCIvarIdxEntity_Enum                                =C.CXIdxEntity_EnumIdxEntity_Struct                              =C.CXIdxEntity_StructIdxEntity_Union                               =C.CXIdxEntity_UnionIdxEntity_CXXClass                            =C.CXIdxEntity_CXXClassIdxEntity_CXXNamespace                        =C.CXIdxEntity_CXXNamespaceIdxEntity_CXXNamespaceAlias                   =C.CXIdxEntity_CXXNamespaceAliasIdxEntity_CXXStaticVariable                   =C.CXIdxEntity_CXXStaticVariableIdxEntity_CXXStaticMethod                     =C.CXIdxEntity_CXXStaticMethodIdxEntity_CXXInstanceMethod                   =C.CXIdxEntity_CXXInstanceMethodIdxEntity_CXXConstructor                      =C.CXIdxEntity_CXXConstructorIdxEntity_CXXDestructor                       =C.CXIdxEntity_CXXDestructorIdxEntity_CXXConversionFunction               =C.CXIdxEntity_CXXConversionFunctionIdxEntity_CXXTypeAlias                        =C.CXIdxEntity_CXXTypeAliasIdxEntity_CXXInterface                        =C.CXIdxEntity_CXXInterface)
View Source
const (IdxEntityLang_NoneIdxEntityLanguage =C.CXIdxEntityLang_NoneIdxEntityLang_C                       =C.CXIdxEntityLang_CIdxEntityLang_ObjC                    =C.CXIdxEntityLang_ObjCIdxEntityLang_CXX                     =C.CXIdxEntityLang_CXXIdxEntityLang_Swift                   =C.CXIdxEntityLang_Swift)
View Source
const (IdxObjCContainer_ForwardRefIdxObjCContainerKind =C.CXIdxObjCContainer_ForwardRefIdxObjCContainer_Interface                           =C.CXIdxObjCContainer_InterfaceIdxObjCContainer_Implementation                      =C.CXIdxObjCContainer_Implementation)
View Source
const (// Used to indicate that no special indexing options are needed.IndexOpt_NoneIndexOptFlags =C.CXIndexOpt_None// Used to indicate that IndexerCallbacks#indexEntityReference should be invoked for only one reference of an entity per source file that does not also include a declaration/definition of the entity.IndexOpt_SuppressRedundantRefs =C.CXIndexOpt_SuppressRedundantRefs// Function-local symbols should be indexed. If this is not set function-local symbols will be ignored.IndexOpt_IndexFunctionLocalSymbols =C.CXIndexOpt_IndexFunctionLocalSymbols// Implicit function/class template instantiations should be indexed. If this is not set, implicit instantiations will be ignored.IndexOpt_IndexImplicitTemplateInstantiations =C.CXIndexOpt_IndexImplicitTemplateInstantiations// Suppress all compiler warnings when parsing for indexing.IndexOpt_SuppressWarnings =C.CXIndexOpt_SuppressWarnings// Skip a function/method body that was already parsed during an indexing session associated with a CXIndexAction object. Bodies in system headers are always skipped.IndexOpt_SkipParsedBodiesInSession =C.CXIndexOpt_SkipParsedBodiesInSession)
View Source
const (Language_InvalidLanguageKind =C.CXLanguage_InvalidLanguage_C                      =C.CXLanguage_CLanguage_ObjC                   =C.CXLanguage_ObjCLanguage_CPlusPlus              =C.CXLanguage_CPlusPlus)
View Source
const (// This value indicates that no linkage information is available for a provided CXCursor.Linkage_InvalidLinkageKind =C.CXLinkage_Invalid// This is the linkage for variables, parameters, and so on that have automatic storage. This covers normal (non-extern) local variables.Linkage_NoLinkage =C.CXLinkage_NoLinkage// This is the linkage for static variables and static functions.Linkage_Internal =C.CXLinkage_Internal// This is the linkage for entities with external linkage that live in C++ anonymous namespaces.Linkage_UniqueExternal =C.CXLinkage_UniqueExternal// This is the linkage for entities with true, external linkage.Linkage_External =C.CXLinkage_External)
View Source
const (// Indicates that no error occurred.LoadDiag_NoneLoadDiag_Error =C.CXLoadDiag_None// Indicates that an unknown error occurred while attempting to deserialize diagnostics.LoadDiag_Unknown =C.CXLoadDiag_Unknown// Indicates that the file containing the serialized diagnostics could not be opened.LoadDiag_CannotLoad =C.CXLoadDiag_CannotLoad// Indicates that the serialized diagnostics file is invalid or corrupt.LoadDiag_InvalidFile =C.CXLoadDiag_InvalidFile)
View Source
const (// Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the range.NameRange_WantQualifierNameRefFlags =C.CXNameRange_WantQualifier// Include the explicit template arguments, e.g. \<int> in x.f<int>, in the range.NameRange_WantTemplateArgs =C.CXNameRange_WantTemplateArgs/*If the name is non-contiguous, return the full spanning range.Non-contiguous names occur in Objective-C when a selector with two or moreparameters is used, or in C++ when using an operator:\code[object doSomething:here withValue:there]; // Objective-Creturn some_vector[1]; // C++\endcode*/NameRange_WantSinglePiece =C.CXNameRange_WantSinglePiece)
View Source
const (PrintingPolicy_IndentationPrintingPolicyProperty =C.CXPrintingPolicy_IndentationPrintingPolicy_SuppressSpecifiers                                           =C.CXPrintingPolicy_SuppressSpecifiersPrintingPolicy_SuppressTagKeyword                                           =C.CXPrintingPolicy_SuppressTagKeywordPrintingPolicy_IncludeTagDefinition                                         =C.CXPrintingPolicy_IncludeTagDefinitionPrintingPolicy_SuppressScope                                                =C.CXPrintingPolicy_SuppressScopePrintingPolicy_SuppressUnwrittenScope                                       =C.CXPrintingPolicy_SuppressUnwrittenScopePrintingPolicy_SuppressInitializers                                         =C.CXPrintingPolicy_SuppressInitializersPrintingPolicy_ConstantArraySizeAsWritten                                   =C.CXPrintingPolicy_ConstantArraySizeAsWrittenPrintingPolicy_AnonymousTagLocations                                        =C.CXPrintingPolicy_AnonymousTagLocationsPrintingPolicy_SuppressStrongLifetime                                       =C.CXPrintingPolicy_SuppressStrongLifetimePrintingPolicy_SuppressLifetimeQualifiers                                   =C.CXPrintingPolicy_SuppressLifetimeQualifiersPrintingPolicy_SuppressTemplateArgsInCXXConstructors                        =C.CXPrintingPolicy_SuppressTemplateArgsInCXXConstructorsPrintingPolicy_Bool                                                         =C.CXPrintingPolicy_BoolPrintingPolicy_Restrict                                                     =C.CXPrintingPolicy_RestrictPrintingPolicy_Alignof                                                      =C.CXPrintingPolicy_AlignofPrintingPolicy_UnderscoreAlignof                                            =C.CXPrintingPolicy_UnderscoreAlignofPrintingPolicy_UseVoidForZeroParams                                         =C.CXPrintingPolicy_UseVoidForZeroParamsPrintingPolicy_TerseOutput                                                  =C.CXPrintingPolicy_TerseOutputPrintingPolicy_PolishForDeclaration                                         =C.CXPrintingPolicy_PolishForDeclarationPrintingPolicy_Half                                                         =C.CXPrintingPolicy_HalfPrintingPolicy_MSWChar                                                      =C.CXPrintingPolicy_MSWCharPrintingPolicy_IncludeNewlines                                              =C.CXPrintingPolicy_IncludeNewlinesPrintingPolicy_MSVCFormatting                                               =C.CXPrintingPolicy_MSVCFormattingPrintingPolicy_ConstantsAsWritten                                           =C.CXPrintingPolicy_ConstantsAsWrittenPrintingPolicy_SuppressImplicitBase                                         =C.CXPrintingPolicy_SuppressImplicitBasePrintingPolicy_FullyQualifiedName                                           =C.CXPrintingPolicy_FullyQualifiedNamePrintingPolicy_LastProperty                                                 =C.CXPrintingPolicy_LastProperty)
View Source
const (PropertyAttr_noattrPropertyAttrKind =C.CXObjCPropertyAttr_noattrPropertyAttr_readonly                           =C.CXObjCPropertyAttr_readonlyPropertyAttr_getter                             =C.CXObjCPropertyAttr_getterPropertyAttr_assign                             =C.CXObjCPropertyAttr_assignPropertyAttr_readwrite                          =C.CXObjCPropertyAttr_readwritePropertyAttr_retain                             =C.CXObjCPropertyAttr_retainPropertyAttr_copy                               =C.CXObjCPropertyAttr_copyPropertyAttr_nonatomic                          =C.CXObjCPropertyAttr_nonatomicPropertyAttr_setter                             =C.CXObjCPropertyAttr_setterPropertyAttr_atomic                             =C.CXObjCPropertyAttr_atomicPropertyAttr_weak                               =C.CXObjCPropertyAttr_weakPropertyAttr_strong                             =C.CXObjCPropertyAttr_strongPropertyAttr_unsafe_unretained                  =C.CXObjCPropertyAttr_unsafe_unretainedPropertyAttr_class                              =C.CXObjCPropertyAttr_class)
View Source
const (// No ref-qualifier was provided.RefQualifier_NoneRefQualifierKind =C.CXRefQualifier_None// An lvalue ref-qualifier was provided (&).RefQualifier_LValue =C.CXRefQualifier_LValue// An rvalue ref-qualifier was provided (&&).RefQualifier_RValue =C.CXRefQualifier_RValue)
View Source
const (// Function returned successfully.Result_SuccessResult =C.CXResult_Success// One of the parameters was invalid for the function.Result_Invalid =C.CXResult_Invalid// The function was terminated by a callback (e.g. it returned CXVisit_Break)Result_VisitBreak =C.CXResult_VisitBreak)
View Source
const (// Indicates that no error occurred while saving a translation unit.SaveError_NoneSaveError =C.CXSaveError_None/*Indicates that an unknown error occurred while attempting to savethe file.This error typically indicates that file I/O failed when attempting towrite the file.*/SaveError_Unknown =C.CXSaveError_Unknown/*Indicates that errors during translation prevented this attemptto save the translation unit.Errors that prevent the translation unit from being saved can beextracted using clang_getNumDiagnostics() and clang_getDiagnostic().*/SaveError_TranslationErrors =C.CXSaveError_TranslationErrors// Indicates that the translation unit to be saved was somehow invalid (e.g., NULL).SaveError_InvalidTU =C.CXSaveError_InvalidTU)
View Source
const (SC_InvalidStorageClass =C.CX_SC_InvalidSC_None                              =C.CX_SC_NoneSC_Extern                            =C.CX_SC_ExternSC_Static                            =C.CX_SC_StaticSC_PrivateExtern                     =C.CX_SC_PrivateExternSC_OpenCLWorkGroupLocal              =C.CX_SC_OpenCLWorkGroupLocalSC_Auto                              =C.CX_SC_AutoSC_Register                          =C.CX_SC_Register)
View Source
const (SymbolRole_NoneSymbolRole =C.CXSymbolRole_NoneSymbolRole_Declaration            =C.CXSymbolRole_DeclarationSymbolRole_Definition             =C.CXSymbolRole_DefinitionSymbolRole_Reference              =C.CXSymbolRole_ReferenceSymbolRole_Read                   =C.CXSymbolRole_ReadSymbolRole_Write                  =C.CXSymbolRole_WriteSymbolRole_Call                   =C.CXSymbolRole_CallSymbolRole_Dynamic                =C.CXSymbolRole_DynamicSymbolRole_AddressOf              =C.CXSymbolRole_AddressOfSymbolRole_Implicit               =C.CXSymbolRole_Implicit)
View Source
const (TemplateArgumentKind_NullTemplateArgumentKind =C.CXTemplateArgumentKind_NullTemplateArgumentKind_Type                                   =C.CXTemplateArgumentKind_TypeTemplateArgumentKind_Declaration                            =C.CXTemplateArgumentKind_DeclarationTemplateArgumentKind_NullPtr                                =C.CXTemplateArgumentKind_NullPtrTemplateArgumentKind_Integral                               =C.CXTemplateArgumentKind_IntegralTemplateArgumentKind_Template                               =C.CXTemplateArgumentKind_TemplateTemplateArgumentKind_TemplateExpansion                      =C.CXTemplateArgumentKind_TemplateExpansionTemplateArgumentKind_Expression                             =C.CXTemplateArgumentKind_ExpressionTemplateArgumentKind_Pack                                   =C.CXTemplateArgumentKind_PackTemplateArgumentKind_Invalid                                =C.CXTemplateArgumentKind_Invalid)
View Source
const (TLS_NoneTLSKind =C.CXTLS_NoneTLS_Dynamic         =C.CXTLS_DynamicTLS_Static          =C.CXTLS_Static)
View Source
const (// A token that contains some kind of punctuation.Token_PunctuationTokenKind =C.CXToken_Punctuation// A language keyword.Token_Keyword =C.CXToken_Keyword// An identifier (that is not a keyword).Token_Identifier =C.CXToken_Identifier// A numeric, string, or character literal.Token_Literal =C.CXToken_Literal// A comment.Token_Comment =C.CXToken_Comment)
View Source
const (// Used to indicate that no special translation-unit options are needed.TranslationUnit_NoneTranslationUnit_Flags =C.CXTranslationUnit_None/*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 memoryand time to parse, since the information contained in the recordis usually not retained. However, it can be useful forapplications that require more detailed information about thebehavior of the preprocessor.*/TranslationUnit_DetailedPreprocessingRecord =C.CXTranslationUnit_DetailedPreprocessingRecord/*Used to indicate that the translation unit is incomplete.When a translation unit is considered "incomplete", semanticanalysis that is typically performed at the end of thetranslation unit will be suppressed. For example, this suppressesthe completion of tentative declarations in C and ofinstantiation of implicitly-instantiation function templates inC++. This option is typically used when parsing a header with theintent of producing a precompiled header.*/TranslationUnit_Incomplete =C.CXTranslationUnit_Incomplete/*Used to indicate that the translation unit should be built with animplicit precompiled header for the preamble.An implicit precompiled header is used as an optimization when aparticular translation unit is likely to be reparsed many timeswhen the sources aren't changing that often. In this case, animplicit precompiled header will be built containing all of theinitial includes at the top of the main file (what we refer to asthe "preamble" of the file). In subsequent parses, if thepreamble or the files in it have not changed, \cclang_reparseTranslationUnit() will re-use the implicitprecompiled header to improve parsing performance.*/TranslationUnit_PrecompiledPreamble =C.CXTranslationUnit_PrecompiledPreamble/*Used to indicate that the translation unit should cache somecode-completion results with each reparse of the source file.Caching of code-completion results is a performance optimization thatintroduces some overhead to reparsing but improves the performance ofcode-completion operations.*/TranslationUnit_CacheCompletionResults =C.CXTranslationUnit_CacheCompletionResults/*Used to indicate that the translation unit will be serialized withclang_saveTranslationUnit.This option is typically used when parsing a header with the intent ofproducing a precompiled header.*/TranslationUnit_ForSerialization =C.CXTranslationUnit_ForSerialization/*DEPRECATED: Enabled chained precompiled preambles in C++.Note: this is a *temporary* option that is available only whilewe are testing C++ precompiled preamble support. It is deprecated.*/TranslationUnit_CXXChainedPCH =C.CXTranslationUnit_CXXChainedPCH/*Used to indicate that function/method bodies should be skipped whileparsing.This option can be used to search for declarations/definitions whileignoring the usages.*/TranslationUnit_SkipFunctionBodies =C.CXTranslationUnit_SkipFunctionBodies// Used to indicate that brief documentation comments should be included into the set of code completions returned from this translation unit.TranslationUnit_IncludeBriefCommentsInCodeCompletion =C.CXTranslationUnit_IncludeBriefCommentsInCodeCompletion// 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_CreatePreambleOnFirstParse =C.CXTranslationUnit_CreatePreambleOnFirstParse/*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 commonsource for fatal errors are unresolvable include files. For thepurposes of an IDE, this is undesirable behavior and as much informationas possible should be reported. Use this flag to enable this behavior.*/TranslationUnit_KeepGoing =C.CXTranslationUnit_KeepGoing// Sets the preprocessor in a mode for parsing a single file only.TranslationUnit_SingleFileParse =C.CXTranslationUnit_SingleFileParse/*Used in combination with CXTranslationUnit_SkipFunctionBodies toconstrain the skipping of function bodies to the preamble.The function bodies of the main file are not skipped.*/TranslationUnit_LimitSkipFunctionBodiesToPreamble =C.CXTranslationUnit_LimitSkipFunctionBodiesToPreamble// Used to indicate that attributed types should be included in CXType.TranslationUnit_IncludeAttributedTypes =C.CXTranslationUnit_IncludeAttributedTypes// Used to indicate that implicit attributes should be visited.TranslationUnit_VisitImplicitAttributes =C.CXTranslationUnit_VisitImplicitAttributes/*Used to indicate that non-errors from included files should be ignored.If set, clang_getDiagnosticSetFromTU() will not report e.g. warnings fromincluded files anymore. This speeds up clang_getDiagnosticSetFromTU() forthe case where these warnings are not of interest, as for an IDE forexample, which typically shows only the diagnostics in the main file.*/TranslationUnit_IgnoreNonErrorsFromIncludedFiles =C.CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles// Tells the preprocessor not to skip excluded conditional blocks.TranslationUnit_RetainExcludedConditionalBlocks =C.CXTranslationUnit_RetainExcludedConditionalBlocks)
View Source
const (TUResourceUsage_ASTTUResourceUsageKind =C.CXTUResourceUsage_ASTTUResourceUsage_Identifiers                                            =C.CXTUResourceUsage_IdentifiersTUResourceUsage_Selectors                                              =C.CXTUResourceUsage_SelectorsTUResourceUsage_GlobalCompletionResults                                =C.CXTUResourceUsage_GlobalCompletionResultsTUResourceUsage_SourceManagerContentCache                              =C.CXTUResourceUsage_SourceManagerContentCacheTUResourceUsage_AST_SideTables                                         =C.CXTUResourceUsage_AST_SideTablesTUResourceUsage_SourceManager_Membuffer_Malloc                         =C.CXTUResourceUsage_SourceManager_Membuffer_MallocTUResourceUsage_SourceManager_Membuffer_MMap                           =C.CXTUResourceUsage_SourceManager_Membuffer_MMapTUResourceUsage_ExternalASTSource_Membuffer_Malloc                     =C.CXTUResourceUsage_ExternalASTSource_Membuffer_MallocTUResourceUsage_ExternalASTSource_Membuffer_MMap                       =C.CXTUResourceUsage_ExternalASTSource_Membuffer_MMapTUResourceUsage_Preprocessor                                           =C.CXTUResourceUsage_PreprocessorTUResourceUsage_PreprocessingRecord                                    =C.CXTUResourceUsage_PreprocessingRecordTUResourceUsage_SourceManager_DataStructures                           =C.CXTUResourceUsage_SourceManager_DataStructuresTUResourceUsage_Preprocessor_HeaderSearch                              =C.CXTUResourceUsage_Preprocessor_HeaderSearchTUResourceUsage_MEMORY_IN_BYTES_BEGIN                                  =C.CXTUResourceUsage_MEMORY_IN_BYTES_BEGINTUResourceUsage_MEMORY_IN_BYTES_END                                    =C.CXTUResourceUsage_MEMORY_IN_BYTES_ENDTUResourceUsage_First                                                  =C.CXTUResourceUsage_FirstTUResourceUsage_Last                                                   =C.CXTUResourceUsage_Last)
View Source
const (// Represents an invalid type (e.g., where no type is available).Type_InvalidTypeKind =C.CXType_Invalid// A type whose specific kind is not exposed via this interface.Type_Unexposed =C.CXType_Unexposed// A type whose specific kind is not exposed via this interface.Type_Void =C.CXType_Void// A type whose specific kind is not exposed via this interface.Type_Bool =C.CXType_Bool// A type whose specific kind is not exposed via this interface.Type_Char_U =C.CXType_Char_U// A type whose specific kind is not exposed via this interface.Type_UChar =C.CXType_UChar// A type whose specific kind is not exposed via this interface.Type_Char16 =C.CXType_Char16// A type whose specific kind is not exposed via this interface.Type_Char32 =C.CXType_Char32// A type whose specific kind is not exposed via this interface.Type_UShort =C.CXType_UShort// A type whose specific kind is not exposed via this interface.Type_UInt =C.CXType_UInt// A type whose specific kind is not exposed via this interface.Type_ULong =C.CXType_ULong// A type whose specific kind is not exposed via this interface.Type_ULongLong =C.CXType_ULongLong// A type whose specific kind is not exposed via this interface.Type_UInt128 =C.CXType_UInt128// A type whose specific kind is not exposed via this interface.Type_Char_S =C.CXType_Char_S// A type whose specific kind is not exposed via this interface.Type_SChar =C.CXType_SChar// A type whose specific kind is not exposed via this interface.Type_WChar =C.CXType_WChar// A type whose specific kind is not exposed via this interface.Type_Short =C.CXType_Short// A type whose specific kind is not exposed via this interface.Type_Int =C.CXType_Int// A type whose specific kind is not exposed via this interface.Type_Long =C.CXType_Long// A type whose specific kind is not exposed via this interface.Type_LongLong =C.CXType_LongLong// A type whose specific kind is not exposed via this interface.Type_Int128 =C.CXType_Int128// A type whose specific kind is not exposed via this interface.Type_Float =C.CXType_Float// A type whose specific kind is not exposed via this interface.Type_Double =C.CXType_Double// A type whose specific kind is not exposed via this interface.Type_LongDouble =C.CXType_LongDouble// A type whose specific kind is not exposed via this interface.Type_NullPtr =C.CXType_NullPtr// A type whose specific kind is not exposed via this interface.Type_Overload =C.CXType_Overload// A type whose specific kind is not exposed via this interface.Type_Dependent =C.CXType_Dependent// A type whose specific kind is not exposed via this interface.Type_ObjCId =C.CXType_ObjCId// A type whose specific kind is not exposed via this interface.Type_ObjCClass =C.CXType_ObjCClass// A type whose specific kind is not exposed via this interface.Type_ObjCSel =C.CXType_ObjCSel// A type whose specific kind is not exposed via this interface.Type_Float128 =C.CXType_Float128// A type whose specific kind is not exposed via this interface.Type_Half =C.CXType_Half// A type whose specific kind is not exposed via this interface.Type_Float16 =C.CXType_Float16// A type whose specific kind is not exposed via this interface.Type_ShortAccum =C.CXType_ShortAccum// A type whose specific kind is not exposed via this interface.Type_Accum =C.CXType_Accum// A type whose specific kind is not exposed via this interface.Type_LongAccum =C.CXType_LongAccum// A type whose specific kind is not exposed via this interface.Type_UShortAccum =C.CXType_UShortAccum// A type whose specific kind is not exposed via this interface.Type_UAccum =C.CXType_UAccum// A type whose specific kind is not exposed via this interface.Type_ULongAccum =C.CXType_ULongAccum// A type whose specific kind is not exposed via this interface.Type_BFloat16 =C.CXType_BFloat16// A type whose specific kind is not exposed via this interface.Type_FirstBuiltin =C.CXType_FirstBuiltin// A type whose specific kind is not exposed via this interface.Type_LastBuiltin =C.CXType_LastBuiltin// A type whose specific kind is not exposed via this interface.Type_Complex =C.CXType_Complex// A type whose specific kind is not exposed via this interface.Type_Pointer =C.CXType_Pointer// A type whose specific kind is not exposed via this interface.Type_BlockPointer =C.CXType_BlockPointer// A type whose specific kind is not exposed via this interface.Type_LValueReference =C.CXType_LValueReference// A type whose specific kind is not exposed via this interface.Type_RValueReference =C.CXType_RValueReference// A type whose specific kind is not exposed via this interface.Type_Record =C.CXType_Record// A type whose specific kind is not exposed via this interface.Type_Enum =C.CXType_Enum// A type whose specific kind is not exposed via this interface.Type_Typedef =C.CXType_Typedef// A type whose specific kind is not exposed via this interface.Type_ObjCInterface =C.CXType_ObjCInterface// A type whose specific kind is not exposed via this interface.Type_ObjCObjectPointer =C.CXType_ObjCObjectPointer// A type whose specific kind is not exposed via this interface.Type_FunctionNoProto =C.CXType_FunctionNoProto// A type whose specific kind is not exposed via this interface.Type_FunctionProto =C.CXType_FunctionProto// A type whose specific kind is not exposed via this interface.Type_ConstantArray =C.CXType_ConstantArray// A type whose specific kind is not exposed via this interface.Type_Vector =C.CXType_Vector// A type whose specific kind is not exposed via this interface.Type_IncompleteArray =C.CXType_IncompleteArray// A type whose specific kind is not exposed via this interface.Type_VariableArray =C.CXType_VariableArray// A type whose specific kind is not exposed via this interface.Type_DependentSizedArray =C.CXType_DependentSizedArray// A type whose specific kind is not exposed via this interface.Type_MemberPointer =C.CXType_MemberPointer// A type whose specific kind is not exposed via this interface.Type_Auto =C.CXType_Auto/*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_Elaborated =C.CXType_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 =C.CXType_Pipe/*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_OCLImage1dRO =C.CXType_OCLImage1dRO/*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_OCLImage1dArrayRO =C.CXType_OCLImage1dArrayRO/*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_OCLImage1dBufferRO =C.CXType_OCLImage1dBufferRO/*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_OCLImage2dRO =C.CXType_OCLImage2dRO/*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_OCLImage2dArrayRO =C.CXType_OCLImage2dArrayRO/*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_OCLImage2dDepthRO =C.CXType_OCLImage2dDepthRO/*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_OCLImage2dArrayDepthRO =C.CXType_OCLImage2dArrayDepthRO/*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_OCLImage2dMSAARO =C.CXType_OCLImage2dMSAARO/*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_OCLImage2dArrayMSAARO =C.CXType_OCLImage2dArrayMSAARO/*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_OCLImage2dMSAADepthRO =C.CXType_OCLImage2dMSAADepthRO/*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_OCLImage2dArrayMSAADepthRO =C.CXType_OCLImage2dArrayMSAADepthRO/*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_OCLImage3dRO =C.CXType_OCLImage3dRO/*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_OCLImage1dWO =C.CXType_OCLImage1dWO/*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_OCLImage1dArrayWO =C.CXType_OCLImage1dArrayWO/*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_OCLImage1dBufferWO =C.CXType_OCLImage1dBufferWO/*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_OCLImage2dWO =C.CXType_OCLImage2dWO/*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_OCLImage2dArrayWO =C.CXType_OCLImage2dArrayWO/*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_OCLImage2dDepthWO =C.CXType_OCLImage2dDepthWO/*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_OCLImage2dArrayDepthWO =C.CXType_OCLImage2dArrayDepthWO/*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_OCLImage2dMSAAWO =C.CXType_OCLImage2dMSAAWO/*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_OCLImage2dArrayMSAAWO =C.CXType_OCLImage2dArrayMSAAWO/*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_OCLImage2dMSAADepthWO =C.CXType_OCLImage2dMSAADepthWO/*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_OCLImage2dArrayMSAADepthWO =C.CXType_OCLImage2dArrayMSAADepthWO/*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_OCLImage3dWO =C.CXType_OCLImage3dWO/*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_OCLImage1dRW =C.CXType_OCLImage1dRW/*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_OCLImage1dArrayRW =C.CXType_OCLImage1dArrayRW/*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_OCLImage1dBufferRW =C.CXType_OCLImage1dBufferRW/*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_OCLImage2dRW =C.CXType_OCLImage2dRW/*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_OCLImage2dArrayRW =C.CXType_OCLImage2dArrayRW/*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_OCLImage2dDepthRW =C.CXType_OCLImage2dDepthRW/*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_OCLImage2dArrayDepthRW =C.CXType_OCLImage2dArrayDepthRW/*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_OCLImage2dMSAARW =C.CXType_OCLImage2dMSAARW/*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_OCLImage2dArrayMSAARW =C.CXType_OCLImage2dArrayMSAARW/*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_OCLImage2dMSAADepthRW =C.CXType_OCLImage2dMSAADepthRW/*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_OCLImage2dArrayMSAADepthRW =C.CXType_OCLImage2dArrayMSAADepthRW/*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_OCLImage3dRW =C.CXType_OCLImage3dRW/*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_OCLSampler =C.CXType_OCLSampler/*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_OCLEvent =C.CXType_OCLEvent/*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_OCLQueue =C.CXType_OCLQueue/*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_OCLReserveID =C.CXType_OCLReserveID/*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_ObjCObject =C.CXType_ObjCObject/*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_ObjCTypeParam =C.CXType_ObjCTypeParam/*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_Attributed =C.CXType_Attributed/*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_OCLIntelSubgroupAVCMcePayload =C.CXType_OCLIntelSubgroupAVCMcePayload/*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_OCLIntelSubgroupAVCImePayload =C.CXType_OCLIntelSubgroupAVCImePayload/*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_OCLIntelSubgroupAVCRefPayload =C.CXType_OCLIntelSubgroupAVCRefPayload/*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_OCLIntelSubgroupAVCSicPayload =C.CXType_OCLIntelSubgroupAVCSicPayload/*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_OCLIntelSubgroupAVCMceResult =C.CXType_OCLIntelSubgroupAVCMceResult/*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_OCLIntelSubgroupAVCImeResult =C.CXType_OCLIntelSubgroupAVCImeResult/*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_OCLIntelSubgroupAVCRefResult =C.CXType_OCLIntelSubgroupAVCRefResult/*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_OCLIntelSubgroupAVCSicResult =C.CXType_OCLIntelSubgroupAVCSicResult/*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_OCLIntelSubgroupAVCImeResultSingleRefStreamout =C.CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout/*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_OCLIntelSubgroupAVCImeResultDualRefStreamout =C.CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout/*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_OCLIntelSubgroupAVCImeSingleRefStreamin =C.CXType_OCLIntelSubgroupAVCImeSingleRefStreamin/*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_OCLIntelSubgroupAVCImeDualRefStreamin =C.CXType_OCLIntelSubgroupAVCImeDualRefStreamin/*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_ExtVector =C.CXType_ExtVector/*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_Atomic =C.CXType_Atomic)
View Source
const (// Type is of kind CXType_Invalid.TypeLayoutError_InvalidTypeLayoutError =C.CXTypeLayoutError_Invalid// The type is an incomplete Type.TypeLayoutError_Incomplete =C.CXTypeLayoutError_Incomplete// The type is a dependent Type.TypeLayoutError_Dependent =C.CXTypeLayoutError_Dependent// The type is not a constant size type.TypeLayoutError_NotConstantSize =C.CXTypeLayoutError_NotConstantSize// The Field name is not valid for this record.TypeLayoutError_InvalidFieldName =C.CXTypeLayoutError_InvalidFieldName// The type is undeduced.TypeLayoutError_Undeduced =C.CXTypeLayoutError_Undeduced)
View Source
const (// Values of this type can never be null.TypeNullability_NonNullTypeNullabilityKind =C.CXTypeNullability_NonNull// Values of this type can be null.TypeNullability_Nullable =C.CXTypeNullability_Nullable// 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_Unspecified =C.CXTypeNullability_Unspecified// Nullability is not applicable to this type.TypeNullability_Invalid =C.CXTypeNullability_Invalid// Generally behaves like Nullable, except when used in a block parameter that was imported into a swift async method. There, swift will assume that the parameter can get null even if no error occured. _Nullable parameters are assumed to only get null on error.TypeNullability_NullableResult =C.CXTypeNullability_NullableResult)
View Source
const (// This value indicates that no visibility information is available for a provided CXCursor.Visibility_InvalidVisibilityKind =C.CXVisibility_Invalid// Symbol not seen by the linker.Visibility_Hidden =C.CXVisibility_Hidden// Symbol seen by the linker but resolves to a symbol inside this object.Visibility_Protected =C.CXVisibility_Protected// Symbol seen by the linker and acts like a normal symbol.Visibility_Default =C.CXVisibility_Default)

Variables

This section is empty.

Functions

funcConstructUSR_ObjCCategory

func ConstructUSR_ObjCCategory(classNamestring, categoryNamestring)string

Construct a USR for a specified Objective-C category.

funcConstructUSR_ObjCClass

func ConstructUSR_ObjCClass(classNamestring)string

Construct a USR for a specified Objective-C class.

funcConstructUSR_ObjCIvar

func ConstructUSR_ObjCIvar(namestring, classUSR cxstring)string

Construct a USR for a specified Objective-C instance variable and the USR for its containing class.

funcConstructUSR_ObjCMethod

func ConstructUSR_ObjCMethod(namestring, isInstanceMethoduint32, classUSR cxstring)string

Construct a USR for a specified Objective-C method and the USR for its containing class.

funcConstructUSR_ObjCProperty

func ConstructUSR_ObjCProperty(propertystring, classUSR cxstring)string

Construct a USR for a specified Objective-C property and the USR for its containing class.

funcConstructUSR_ObjCProtocol

func ConstructUSR_ObjCProtocol(protocolNamestring)string

Construct a USR for a specified Objective-C protocol.

funcDefaultCodeCompleteOptions

func DefaultCodeCompleteOptions()uint32

Returns a default set of code-completion options that can be passed toclang_codeCompleteAt().

funcDefaultDiagnosticDisplayOptions

func DefaultDiagnosticDisplayOptions()uint32

Retrieve the set of display options most similar to thedefault behavior of the clang compiler.

Returns A set of display options suitable for use with \cclang_formatDiagnostic().

funcDefaultEditingTranslationUnitOptions

func DefaultEditingTranslationUnitOptions()uint32

Returns the set of flags that is suitable for parsing a translationunit that is being edited.

The set of flags returned provide options for clang_parseTranslationUnit()to indicate that the translation unit is likely to be reparsed many times,either explicitly (via clang_reparseTranslationUnit()) or implicitly(e.g., by code completion (clang_codeCompletionAt())). The returned flagset contains an unspecified set of optimizations (e.g., the precompiledpreamble) geared toward improving the performance of these routines. Theset of optimizations enabled may change from one version to the next.

funcDispose

func Dispose(overridden []Cursor)

Free the set of overridden cursors returned by \c clang_getOverriddenCursors().

funcEnableStackTraces

func EnableStackTraces()

funcFromDirectory

Creates a compilation database from the database found in directorybuildDir. For example, CMake can output a compile_commands.json which canbe used to build the database.

It must be freed by clang_CompilationDatabase_dispose.

funcGetBuildSessionTimestamp

func GetBuildSessionTimestamp()uint64

Return the timestamp for use with Clang's -fbuild-session-timestamp= option.

funcGetClangVersion

func GetClangVersion()string

Return a version string, suitable for showing to a user, but not intended to be parsed (the format is not guaranteed to be stable).

funcGetDiagnosticCategoryName

func GetDiagnosticCategoryName(categoryuint32)string

Retrieve the name of a particular diagnostic category. Thisis now deprecated. Use clang_getDiagnosticCategoryText()instead.

Parameter Category A diagnostic category number, as returned byclang_getDiagnosticCategory().

Returns The name of the given diagnostic category.

funcInstallAbortingFatalErrorHandler

func InstallAbortingFatalErrorHandler()

Installs error handler that prints error message to stderr and calls abort(). Replaces currently installed error handler (if any).

funcLoadDiagnostics

func LoadDiagnostics(filestring) (LoadDiag_Error,string,DiagnosticSet)

Deserialize a set of diagnostics from a Clang diagnostics bitcodefile.

Parameter file The name of the file to deserialize.Parameter error A pointer to a enum value recording if there was a problemdeserializing the diagnostics.Parameter errorString A pointer to a CXString for recording the error stringif the file was not successfully loaded.

Returns A loaded CXDiagnosticSet if successful, and NULL otherwise. Thesediagnostics should be released using clang_disposeDiagnosticSet().

funcSortCodeCompletionResults

func SortCodeCompletionResults(results []CompletionResult)

Sort the code-completion results in case-insensitive alphabeticalorder.

Parameter Results The set of results to sort.Parameter NumResults The number of results in \p Results.

funcToggleCrashRecovery

func ToggleCrashRecovery(isEnableduint32)

Enable/disable crash recovery.

Parameter isEnabled Flag to indicate if crash recovery is enabled. A non-zerovalue enables crash recovery, while 0 disables it.

funcUninstallFatalErrorHandler

func UninstallFatalErrorHandler()

Removes currently installed error handler (if any). If no error handler is intalled, the default strategy is to print error message to stderr and call exit(1).

Types

typeAccessSpecifier

type AccessSpecifieruint32

Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier.

func (AccessSpecifier)Spelling

func (asAccessSpecifier) Spelling()string

func (AccessSpecifier)String

func (asAccessSpecifier) String()string

typeAvailabilityKind

type AvailabilityKinduint32

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.

func (AvailabilityKind)Spelling

func (akAvailabilityKind) Spelling()string

func (AvailabilityKind)String

func (akAvailabilityKind) String()string

typeCallingConv

type CallingConvuint32

Describes the calling convention of a function type

func (CallingConv)Spelling

func (ccCallingConv) Spelling()string

func (CallingConv)String

func (ccCallingConv) String()string

typeChildVisitResult

type ChildVisitResultuint32

Describes how the traversal of the children of a particularcursor should proceed after visiting a particular child cursor.

A value of this enumeration type should be returned by eachCXCursorVisitor to indicate how clang_visitChildren() proceed.

funcGoClangCursorVisitor

func GoClangCursorVisitor(cursor, parentC.CXCursor, cfctunsafe.Pointer) (statusChildVisitResult)

GoClangCursorVisitor calls the cursor visitor.

func (ChildVisitResult)Spelling

func (cvrChildVisitResult) Spelling()string

func (ChildVisitResult)String

func (cvrChildVisitResult) String()string

typeClientData

type ClientData struct {// contains filtered or unexported fields}

Opaque pointer representing client data that will be passed through to various callbacks and visitors.

typeCodeCompleteResults

type CodeCompleteResults struct {// contains filtered or unexported fields}

Contains the results of code-completion.

This data structure contains the results of code completion, asproduced by clang_codeCompleteAt(). Its contents must be freed byclang_disposeCodeCompleteResults.

func (*CodeCompleteResults)CompletionFixIt

func (ccr *CodeCompleteResults) CompletionFixIt(completionIndexuint32, fixitIndexuint32) (SourceRange,string)

Fix-its that *must* be applied before inserting the text for thecorresponding completion.

By default, clang_codeCompleteAt() only returns completions with emptyfix-its. Extra completions with non-empty fix-its should be explicitlyrequested by setting CXCodeComplete_IncludeCompletionsWithFixIts.

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

The intuition is that provided fix-its change code around the identifier wecomplete, but are not allowed to touch the identifier itself or thecompletion point. One example of completions with corrections are the onesreplacing '.' with '->' and vice versa:

std::unique_ptr<std::vector<int>> vec_ptr;In 'vec_ptr.^', one of the completions is 'push_back', it requiresreplacing '.' with '->'.In 'vec_ptr->^', one of the completions is 'release', it requiresreplacing '->' with '.'.

Parameter results The structure keeping all completion results

Parameter completion_index The index of the completion

Parameter fixit_index The index of the fix-it for the completion atcompletion_index

Parameter replacement_range The fix-it range that must be replaced before thecompletion at completion_index can be applied

Returns The fix-it string that must replace the code at replacement_rangebefore the completion at completion_index can be applied

func (*CodeCompleteResults)CompletionNumFixIts

func (ccr *CodeCompleteResults) CompletionNumFixIts(completionIndexuint32)uint32

Retrieve the number of fix-its for the given completion index.

Calling this makes sense only if CXCodeComplete_IncludeCompletionsWithFixItsoption was set.

Parameter results The structure keeping all completion results

Parameter completion_index The index of the completion

\return The number of fix-its which must be applied before the completion atcompletion_index can be applied

func (*CodeCompleteResults)ContainerKind

func (ccr *CodeCompleteResults) ContainerKind() (uint32,CursorKind)

Returns the cursor kind for the container for the current codecompletion context. The container is only guaranteed to be set forcontexts where a container exists (i.e. member accesses or Objective-Cmessage sends); if there is not a container, this function will returnCXCursor_InvalidCode.

Parameter Results the code completion results to query

Parameter IsIncomplete on return, this value will be false if Clang has completeinformation about the container. If Clang does not have completeinformation, this value will be true.

Returns the container kind, or CXCursor_InvalidCode if there is not acontainer

func (*CodeCompleteResults)ContainerUSR

func (ccr *CodeCompleteResults) ContainerUSR()string

Returns the USR for the container for the current code completioncontext. If there is not a container for the current context, thisfunction will return the empty string.

Parameter Results the code completion results to query

Returns the USR for the container

func (*CodeCompleteResults)Contexts

func (ccr *CodeCompleteResults) Contexts()uint64

Determines what completions are appropriate for the contextthe given code completion.

Parameter Results the code completion results to query

Returns the kinds of completions that are appropriate for usealong with the given code completion results.

func (*CodeCompleteResults)Diagnostic

func (ccr *CodeCompleteResults) Diagnostic(indexuint32)Diagnostic

Retrieve a diagnostic associated with the given code completion.

Parameter Results the code completion results to query.Parameter Index the zero-based diagnostic number to retrieve.

Returns the requested diagnostic. This diagnostic must be freedvia a call to clang_disposeDiagnostic().

func (*CodeCompleteResults)Diagnostics

func (ccr *CodeCompleteResults) Diagnostics() []Diagnostic

Diagnostics determine the number of diagnostics produced prior to thelocation where code completion was performed.

func (*CodeCompleteResults)Dispose

func (ccr *CodeCompleteResults) Dispose()

Free the given set of code-completion results.

func (*CodeCompleteResults)NumDiagnostics

func (ccr *CodeCompleteResults) NumDiagnostics()uint32

Determine the number of diagnostics produced prior to the location where code completion was performed.

func (CodeCompleteResults)NumResults

func (ccrCodeCompleteResults) NumResults()uint32

The number of code-completion results stored in the Results array.

func (CodeCompleteResults)Results

The code-completion results.

func (*CodeCompleteResults)Selector

func (ccr *CodeCompleteResults) Selector()string

Returns the currently-entered selector for an Objective-C messagesend, formatted like "initWithFoo:bar:". Only guaranteed to return anon-empty string for CXCompletionContext_ObjCInstanceMessage andCXCompletionContext_ObjCClassMessage.

Parameter Results the code completion results to query

Returns the selector (or partial selector) that has been entered thus farfor an Objective-C message send.

typeCodeComplete_Flags

type CodeComplete_Flagsuint32

Flags that can be passed to clang_codeCompleteAt() tomodify its behavior.

The enumerators in this enumeration can be bitwise-OR'd together toprovide multiple options to clang_codeCompleteAt().

func (CodeComplete_Flags)Spelling

func (ccfCodeComplete_Flags) Spelling()string

func (CodeComplete_Flags)String

func (ccfCodeComplete_Flags) String()string

typeComment

type Comment struct {// contains filtered or unexported fields}

A parsed comment.

func (Comment)BlockCommandComment_getArgText

func (cComment) BlockCommandComment_getArgText(argIdxuint32)string

Parameter Comment a CXComment_BlockCommand AST node.

Parameter ArgIdx argument index (zero-based).

Returns text of the specified word-like argument.

func (Comment)BlockCommandComment_getCommandName

func (cComment) BlockCommandComment_getCommandName()string

Parameter Comment a CXComment_BlockCommand AST node.

Returns name of the block command.

func (Comment)BlockCommandComment_getNumArgs

func (cComment) BlockCommandComment_getNumArgs()uint32

Parameter Comment a CXComment_BlockCommand AST node.

Returns number of word-like arguments.

func (Comment)BlockCommandComment_getParagraph

func (cComment) BlockCommandComment_getParagraph()Comment

Parameter Comment a CXComment_BlockCommand orCXComment_VerbatimBlockCommand AST node.

Returns paragraph argument of the block command.

func (Comment)Child

func (cComment) Child(childIdxuint32)Comment

Parameter Comment AST node of any kind.

Parameter ChildIdx child index (zero-based).

Returns the specified child of the AST node.

func (Comment)FullComment_getAsHTML

func (cComment) FullComment_getAsHTML()string

Convert a given full parsed comment to an HTML fragment.

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

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

Function argument documentation is rendered as a \<dl\> list with argumentssorted in function prototype order. CSS classes used:\li "param-name-index-NUMBER" for parameter name (\<dt\>);\li "param-descr-index-NUMBER" for parameter description (\<dd\>);\li "param-name-index-invalid" and "param-descr-index-invalid" are used ifparameter index is invalid.

Template parameter documentation is rendered as a \<dl\> list withparameters sorted in template parameter list order. CSS classes used:\li "tparam-name-index-NUMBER" for parameter name (\<dt\>);\li "tparam-descr-index-NUMBER" for parameter description (\<dd\>);\li "tparam-name-index-other" and "tparam-descr-index-other" are used fornames inside template template parameters;\li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used ifparameter position is invalid.

Parameter Comment a CXComment_FullComment AST node.

Returns string containing an HTML fragment.

func (Comment)FullComment_getAsXML

func (cComment) FullComment_getAsXML()string

Convert a given full parsed comment to an XML document.

A Relax NG schema for the XML can be found in comment-xml-schema.rng fileinside clang source tree.

Parameter Comment a CXComment_FullComment AST node.

Returns string containing an XML document.

func (Comment)HTMLStartTagComment_IsSelfClosing

func (cComment) HTMLStartTagComment_IsSelfClosing()bool

Parameter Comment a CXComment_HTMLStartTag AST node.

Returns non-zero if tag is self-closing (for example, &lt;br /&gt;).

func (Comment)HTMLStartTag_getAttrName

func (cComment) HTMLStartTag_getAttrName(attrIdxuint32)string

Parameter Comment a CXComment_HTMLStartTag AST node.

Parameter AttrIdx attribute index (zero-based).

Returns name of the specified attribute.

func (Comment)HTMLStartTag_getAttrValue

func (cComment) HTMLStartTag_getAttrValue(attrIdxuint32)string

Parameter Comment a CXComment_HTMLStartTag AST node.

Parameter AttrIdx attribute index (zero-based).

Returns value of the specified attribute.

func (Comment)HTMLStartTag_getNumAttrs

func (cComment) HTMLStartTag_getNumAttrs()uint32

Parameter Comment a CXComment_HTMLStartTag AST node.

Returns number of attributes (name-value pairs) attached to the start tag.

func (Comment)HTMLTagComment_getAsString

func (cComment) HTMLTagComment_getAsString()string

Convert an HTML tag AST node to string.

Parameter Comment a CXComment_HTMLStartTag or CXComment_HTMLEndTag ASTnode.

Returns string containing an HTML tag.

func (Comment)HTMLTagComment_getTagName

func (cComment) HTMLTagComment_getTagName()string

Parameter Comment a CXComment_HTMLStartTag or CXComment_HTMLEndTag ASTnode.

Returns HTML tag name.

func (Comment)InlineCommandComment_getArgText

func (cComment) InlineCommandComment_getArgText(argIdxuint32)string

Parameter Comment a CXComment_InlineCommand AST node.

Parameter ArgIdx argument index (zero-based).

Returns text of the specified argument.

func (Comment)InlineCommandComment_getCommandName

func (cComment) InlineCommandComment_getCommandName()string

Parameter Comment a CXComment_InlineCommand AST node.

Returns name of the inline command.

func (Comment)InlineCommandComment_getNumArgs

func (cComment) InlineCommandComment_getNumArgs()uint32

Parameter Comment a CXComment_InlineCommand AST node.

Returns number of command arguments.

func (Comment)InlineCommandComment_getRenderKind

func (cComment) InlineCommandComment_getRenderKind()CommentInlineCommandRenderKind

Parameter Comment a CXComment_InlineCommand AST node.

Returns the most appropriate rendering mode, chosen on commandsemantics in Doxygen.

func (Comment)InlineContentComment_HasTrailingNewline

func (cComment) InlineContentComment_HasTrailingNewline()bool

Returns non-zero if Comment is inline content and has a newline immediately following it in the comment text. Newlines between paragraphs do not count.

func (Comment)IsWhitespace

func (cComment) IsWhitespace()bool

A CXComment_Paragraph node is considered whitespace if it containsonly CXComment_Text nodes that are empty or whitespace.

Other AST nodes (except CXComment_Paragraph and CXComment_Text) arenever considered whitespace.

Returns non-zero if Comment is whitespace.

func (Comment)Kind

func (cComment) Kind()CommentKind

Parameter Comment AST node of any kind.

Returns the type of the AST node.

func (Comment)NumChildren

func (cComment) NumChildren()uint32

Parameter Comment AST node of any kind.

Returns number of children of the AST node.

func (Comment)ParamCommandComment_IsDirectionExplicit

func (cComment) ParamCommandComment_IsDirectionExplicit()bool

Parameter Comment a CXComment_ParamCommand AST node.

Returns non-zero if parameter passing direction was specified explicitly inthe comment.

func (Comment)ParamCommandComment_IsParamIndexValid

func (cComment) ParamCommandComment_IsParamIndexValid()bool

Parameter Comment a CXComment_ParamCommand AST node.

Returns non-zero if the parameter that this AST node represents was foundin the function prototype and clang_ParamCommandComment_getParamIndexfunction will return a meaningful value.

func (Comment)ParamCommandComment_getDirection

func (cComment) ParamCommandComment_getDirection()CommentParamPassDirection

Parameter Comment a CXComment_ParamCommand AST node.

Returns parameter passing direction.

func (Comment)ParamCommandComment_getParamIndex

func (cComment) ParamCommandComment_getParamIndex()uint32

Parameter Comment a CXComment_ParamCommand AST node.

Returns zero-based parameter index in function prototype.

func (Comment)ParamCommandComment_getParamName

func (cComment) ParamCommandComment_getParamName()string

Parameter Comment a CXComment_ParamCommand AST node.

Returns parameter name.

func (Comment)TParamCommandComment_IsParamPositionValid

func (cComment) TParamCommandComment_IsParamPositionValid()bool

Parameter Comment a CXComment_TParamCommand AST node.

Returns non-zero if the parameter that this AST node represents was foundin the template parameter list andclang_TParamCommandComment_getDepth andclang_TParamCommandComment_getIndex functions will return a meaningfulvalue.

func (Comment)TParamCommandComment_getDepth

func (cComment) TParamCommandComment_getDepth()uint32

Parameter Comment a CXComment_TParamCommand AST node.

Returns zero-based nesting depth of this parameter in the template parameter list.

For example,\verbatimtemplate<typename C, template<typename T> class TT>void test(TT<int> aaa);\endverbatimfor C and TT nesting depth is 0,for T nesting depth is 1.

func (Comment)TParamCommandComment_getIndex

func (cComment) TParamCommandComment_getIndex(depthuint32)uint32

Parameter Comment a CXComment_TParamCommand AST node.

Returns zero-based parameter index in the template parameter list at agiven nesting depth.

For example,\verbatimtemplate<typename C, template<typename T> class TT>void test(TT<int> aaa);\endverbatimfor C and TT nesting depth is 0, so we can ask for index at depth 0:at depth 0 C's index is 0, TT's index is 1.

For T nesting depth is 1, so we can ask for index at depth 0 and 1:at depth 0 T's index is 1 (same as TT's),at depth 1 T's index is 0.

func (Comment)TParamCommandComment_getParamName

func (cComment) TParamCommandComment_getParamName()string

Parameter Comment a CXComment_TParamCommand AST node.

Returns template parameter name.

func (Comment)TextComment_getText

func (cComment) TextComment_getText()string

Parameter Comment a CXComment_Text AST node.

Returns text contained in the AST node.

func (Comment)TranslationUnit

func (cComment) TranslationUnit()TranslationUnit

func (Comment)VerbatimBlockLineComment_getText

func (cComment) VerbatimBlockLineComment_getText()string

Parameter Comment a CXComment_VerbatimBlockLine AST node.

Returns text contained in the AST node.

func (Comment)VerbatimLineComment_getText

func (cComment) VerbatimLineComment_getText()string

Parameter Comment a CXComment_VerbatimLine AST node.

Returns text contained in the AST node.

typeCommentInlineCommandRenderKind

type CommentInlineCommandRenderKinduint32

The most appropriate rendering mode for an inline command, chosen on command semantics in Doxygen.

func (CommentInlineCommandRenderKind)Spelling

func (CommentInlineCommandRenderKind)String

typeCommentKind

type CommentKinduint32

Describes the type of the comment AST node (CXComment). A comment node can be considered block content (e. g., paragraph), inline content (plain text) or neither (the root AST node).

func (CommentKind)Spelling

func (ckCommentKind) Spelling()string

func (CommentKind)String

func (ckCommentKind) String()string

typeCommentParamPassDirection

type CommentParamPassDirectionuint32

Describes parameter passing direction for \Parameter or \\arg command.

func (CommentParamPassDirection)Spelling

func (cppdCommentParamPassDirection) Spelling()string

func (CommentParamPassDirection)String

typeCompilationDatabase

type CompilationDatabase struct {// contains filtered or unexported fields}

A compilation database holds all information used to compile files in aproject. For each file in the database, it can be queried for the workingdirectory or the command line used for the compiler invocation.

Must be freed by clang_CompilationDatabase_dispose

func (CompilationDatabase)AllCompileCommands

func (cdCompilationDatabase) AllCompileCommands()CompileCommands

Get all the compile commands in the given compilation database.

func (CompilationDatabase)CompileCommands

func (cdCompilationDatabase) CompileCommands(completeFileNamestring)CompileCommands

Find the compile commands used for a file. The compile commands must be freed by clang_CompileCommands_dispose.

func (CompilationDatabase)Dispose

func (cdCompilationDatabase) Dispose()

Free the given compilation database

typeCompilationDatabase_Error

type CompilationDatabase_Errorint32

Error codes for Compilation Database

const (CompilationDatabase_NoErrorCompilationDatabase_Error =C.CXCompilationDatabase_NoErrorCompilationDatabase_CanNotLoadDatabase                           =C.CXCompilationDatabase_CanNotLoadDatabase)

func (CompilationDatabase_Error)Error

func (CompilationDatabase_Error)Spelling

func (cdeCompilationDatabase_Error) Spelling()string

func (CompilationDatabase_Error)String

typeCompileCommand

type CompileCommand struct {// contains filtered or unexported fields}

Represents the command line invocation to compile a specific file.

func (CompileCommand)Arg

Get the I'th argument value in the compiler invocations

Invariant :- argument 0 is the compiler executable

func (CompileCommand)Directory

func (ccCompileCommand) Directory()string

Get the working directory where the CompileCommand was executed from

func (CompileCommand)Filename

func (ccCompileCommand) Filename()string

Get the filename associated with the CompileCommand.

func (CompileCommand)NumArgs

func (ccCompileCommand) NumArgs()uint32

Get the number of arguments in the compiler invocation.

typeCompileCommands

type CompileCommands struct {// contains filtered or unexported fields}

Contains the results of a search in the compilation database

When searching for the compile command for a file, the compilation db canreturn several commands, as the file may have been compiled withdifferent options in different places of the project. This choice of compilecommands is wrapped in this opaque data structure. It must be freed byclang_CompileCommands_dispose.

func (CompileCommands)Command

Get the I'th CompileCommand for a file

Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)

func (CompileCommands)Dispose

func (ccCompileCommands) Dispose()

Free the given CompileCommands

func (CompileCommands)Size

func (ccCompileCommands) Size()uint32

Get the number of CompileCommand we have for a file

typeCompletionChunkKind

type CompletionChunkKinduint32

Describes a single piece of text within a code-completion string.

Each "chunk" within a code-completion string (CXCompletionString) iseither a piece of text with a specific "kind" that describes how that textshould be interpreted by the client or is another completion string.

func (CompletionChunkKind)Spelling

func (cckCompletionChunkKind) Spelling()string

func (CompletionChunkKind)String

func (cckCompletionChunkKind) String()string

typeCompletionContext

type CompletionContextuint32

Bits that represent the context under which completion is occurring.

The enumerators in this enumeration may be bitwise-OR'd together if multiplecontexts are occurring simultaneously.

func (CompletionContext)Spelling

func (ccCompletionContext) Spelling()string

func (CompletionContext)String

func (ccCompletionContext) String()string

typeCompletionResult

type CompletionResult struct {// contains filtered or unexported fields}

A single result of code completion.

func (CompletionResult)CompletionString

func (crCompletionResult) CompletionString()CompletionString

The code-completion string that describes how to insert this code-completion result into the editing buffer.

func (CompletionResult)CursorKind

func (crCompletionResult) CursorKind()CursorKind

The kind of entity that this completion refers to.

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

\todo In the future, we would like to provide a full cursor, to allowthe client to extract additional information from declaration.

typeCompletionString

type CompletionString struct {// contains filtered or unexported fields}

A semantic string that describes a code-completion result.

A semantic string that describes the formatting of a code-completionresult as a single "template" of text that should be inserted into thesource buffer when a particular code-completion result is selected.Each semantic string is made up of some number of "chunks", each of whichcontains some text along with a description of what that text means, e.g.,the name of the entity being referenced, whether the text chunk is part ofthe template, or whether it is a "placeholder" that the user should replacewith actual code,of a specific kind. See CXCompletionChunkKind for adescription of the different kinds of chunks.

func (CompletionString)Annotation

func (csCompletionString) Annotation(annotationNumberuint32)string

Retrieve the annotation associated with the given completion string.

Parameter completion_string the completion string to query.

Parameter annotation_number the 0-based index of the annotation of thecompletion string.

Returns annotation string associated with the completion at indexannotation_number, or a NULL string if that annotation is not available.

func (CompletionString)Availability

func (csCompletionString) Availability()AvailabilityKind

Determine the availability of the entity that this code-completionstring refers to.

Parameter completion_string The completion string to query.

Returns The availability of the completion string.

func (CompletionString)BriefComment

func (csCompletionString) BriefComment()string

Retrieve the brief documentation comment attached to the declaration that corresponds to the given completion string.

func (CompletionString)ChunkCompletionString

func (csCompletionString) ChunkCompletionString(chunkNumberuint32)CompletionString

Retrieve the completion string associated with a particular chunkwithin a completion string.

Parameter completion_string the completion string to query.

Parameter chunk_number the 0-based index of the chunk in the completion string.

Returns the completion string associated with the chunk at indexchunk_number.

func (CompletionString)ChunkKind

func (csCompletionString) ChunkKind(chunkNumberuint32)CompletionChunkKind

Determine the kind of a particular chunk within a completion string.

Parameter completion_string the completion string to query.

Parameter chunk_number the 0-based index of the chunk in the completion string.

Returns the kind of the chunk at the index chunk_number.

func (CompletionString)ChunkText

func (csCompletionString) ChunkText(chunkNumberuint32)string

Retrieve the text associated with a particular chunk within acompletion string.

Parameter completion_string the completion string to query.

Parameter chunk_number the 0-based index of the chunk in the completion string.

Returns the text associated with the chunk at index chunk_number.

func (CompletionString)NumAnnotations

func (csCompletionString) NumAnnotations()uint32

Retrieve the number of annotations associated with the givencompletion string.

Parameter completion_string the completion string to query.

Returns the number of annotations associated with the given completionstring.

func (CompletionString)NumChunks

func (csCompletionString) NumChunks()uint32

Retrieve the number of chunks in the given code-completion string.

func (CompletionString)Parent

func (csCompletionString) Parent(kind *CursorKind)string

Retrieve the parent context of the given completion string.

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

Parameter completion_string The code completion string whose parent isbeing queried.

Parameter kind DEPRECATED: always set to CXCursor_NotImplemented if non-NULL.

Returns The name of the completion parent, e.g., "NSObject" ifthe completion string represents a method in the NSObject class.

func (CompletionString)Priority

func (csCompletionString) Priority()uint32

Determine the priority of this code completion.

The priority of a code completion indicates how likely it is that thisparticular completion is the completion that the user will select. Thepriority is selected by various internal heuristics.

Parameter completion_string The completion string to query.

Returns The priority of this completion string. Smaller values indicatehigher-priority (more likely) completions.

typeCursor

type Cursor struct {// contains filtered or unexported fields}

A cursor representing some element in the abstract syntax tree fora translation unit.

The cursor abstraction unifies the different kinds of entities in aprogram--declaration, statements, expressions, references to declarations,etc.--under a single "cursor" abstraction with a common set of operations.Common operation for a cursor include: getting the physical location ina source file where the cursor points, getting the name associated with acursor, and retrieving cursors for any child nodes of a particular cursor.

Cursors can be produced in two specific ways.clang_getTranslationUnitCursor() produces a cursor for a translation unit,from which one can use clang_visitChildren() to explore the rest of thetranslation unit. clang_getCursor() maps from a physical source locationto the entity that resides at that location, allowing one to map from thesource code into the AST.

funcNewNullCursor

func NewNullCursor()Cursor

Retrieve the NULL cursor, which represents no entity.

func (Cursor)AccessSpecifier

func (cCursor) AccessSpecifier()AccessSpecifier

Returns the access control level for the referenced object.

If the cursor refers to a C++ declaration, its access control level withinits parent scope is returned. Otherwise, if the cursor refers to a basespecifier or access specifier, the specifier itself is returned.

func (Cursor)Argument

func (cCursor) Argument(iuint32)Cursor

Retrieve the argument cursor of a function or method.

The argument cursor can be determined for calls as well as for declarationsof functions or methods. For other cursors and for invalid indices, aninvalid cursor is returned.

func (Cursor)Availability

func (cCursor) Availability()AvailabilityKind

Determine the availability of the entity that this cursor refers to,taking the current target platform into account.

Parameter cursor The cursor to query.

Returns The availability of the cursor.

func (Cursor)BriefCommentText

func (cCursor) BriefCommentText()string

Given a cursor that represents a documentable entity (e.g., declaration), return the associated \paragraph; otherwise return the first paragraph.

func (Cursor)CXXConstructor_IsConvertingConstructor

func (cCursor) CXXConstructor_IsConvertingConstructor()bool

Determine if a C++ constructor is a converting constructor.

func (Cursor)CXXConstructor_IsCopyConstructor

func (cCursor) CXXConstructor_IsCopyConstructor()bool

Determine if a C++ constructor is a copy constructor.

func (Cursor)CXXConstructor_IsDefaultConstructor

func (cCursor) CXXConstructor_IsDefaultConstructor()bool

Determine if a C++ constructor is the default constructor.

func (Cursor)CXXConstructor_IsMoveConstructor

func (cCursor) CXXConstructor_IsMoveConstructor()bool

Determine if a C++ constructor is a move constructor.

func (Cursor)CXXField_IsMutable

func (cCursor) CXXField_IsMutable()bool

Determine if a C++ field is declared 'mutable'.

func (Cursor)CXXManglings

func (cCursor) CXXManglings() *StringSet

Retrieve the CXStrings representing the mangled symbols of the C++ constructor or destructor at the cursor.

func (Cursor)CXXMethod_IsConst

func (cCursor) CXXMethod_IsConst()bool

Determine if a C++ member function or member function template is declared 'const'.

func (Cursor)CXXMethod_IsDefaulted

func (cCursor) CXXMethod_IsDefaulted()bool

Determine if a C++ method is declared '= default'.

func (Cursor)CXXMethod_IsPureVirtual

func (cCursor) CXXMethod_IsPureVirtual()bool

Determine if a C++ member function or member function template is pure virtual.

func (Cursor)CXXMethod_IsStatic

func (cCursor) CXXMethod_IsStatic()bool

Determine if a C++ member function or member function template is declared 'static'.

func (Cursor)CXXMethod_IsVirtual

func (cCursor) CXXMethod_IsVirtual()bool

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.

func (Cursor)CXXRecord_IsAbstract

func (cCursor) CXXRecord_IsAbstract()bool

Determine if a C++ record is abstract, i.e. whether a class or struct has a pure virtual member function.

func (Cursor)CanonicalCursor

func (cCursor) CanonicalCursor()Cursor

Retrieve the canonical cursor corresponding to the given cursor.

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

\codestruct X;struct X;struct X {int member;};\endcode

The declarations and the definition of X are represented by threedifferent cursors, all of which are declarations of the same underlyingentity. One of these cursor is considered the "canonical" cursor, whichis effectively the representative for the underlying entity. One candetermine if two cursors are declarations of the same underlying entity bycomparing their canonical cursors.

Returns The canonical cursor for the entity referred to by the given cursor.

func (Cursor)CommentRange

func (cCursor) CommentRange()SourceRange

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.

func (Cursor)CompletionString

func (cCursor) CompletionString()CompletionString

Retrieve a completion string for an arbitrary declaration or macrodefinition cursor.

Parameter cursor The cursor to query.

Returns A non-context-sensitive completion string for declaration and macrodefinition cursors, or NULL for other kinds of cursors.

func (Cursor)DeclObjCTypeEncoding

func (cCursor) DeclObjCTypeEncoding()string

Returns the Objective-C type encoding for the specified declaration.

func (Cursor)DeclQualifiers

func (cCursor) DeclQualifiers()uint32

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.

func (Cursor)Definition

func (cCursor) Definition()Cursor

For a cursor that is either a reference to or a declarationof some entity, retrieve a cursor that describes the definition ofthat entity.

Some entities can be declared multiple times within a translationunit, but only one of those declarations can also be adefinition. For example, given:

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

there are three declarations of the function "f", but only thesecond 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 referencedthat uses "f" (the call to "f' inside "g") and will return adeclaration 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 thistranslation unit, returns a NULL cursor.

func (Cursor)DefinitionSpellingAndExtent

func (cCursor) DefinitionSpellingAndExtent() (string,string,uint32,uint32,uint32,uint32)

func (Cursor)DisplayName

func (cCursor) DisplayName()string

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 aclass template specialization.

func (Cursor)EnumConstantDeclUnsignedValue

func (cCursor) EnumConstantDeclUnsignedValue()uint64

Retrieve the integer value of an enum constant declaration as an unsignedlong long.

If the cursor does not reference an enum constant declaration, ULLONG_MAX isreturned. Since this is also potentially a valid constant value, the kind ofthe cursor must be verified before calling this function.

func (Cursor)EnumConstantDeclValue

func (cCursor) EnumConstantDeclValue()int64

Retrieve the integer value of an enum constant declaration as a signedlong long.

If the cursor does not reference an enum constant declaration, LLONG_MIN isreturned. Since this is also potentially a valid constant value, the kind ofthe cursor must be verified before calling this function.

func (Cursor)EnumDeclIntegerType

func (cCursor) EnumDeclIntegerType()Type

Retrieve the integer type of an enum declaration.

If the cursor does not reference an enum declaration, an invalid type isreturned.

func (Cursor)EnumDecl_IsScoped

func (cCursor) EnumDecl_IsScoped()bool

Determine if an enum declaration refers to a scoped enum.

func (Cursor)Equal

func (cCursor) Equal(c2Cursor)bool

Determine whether two cursors are equivalent.

func (Cursor)Evaluate

func (cCursor) Evaluate()EvalResult

If cursor is a statement declaration tries to evaluate the statement and if its variable, tries to evaluate its initializer, into its corresponding type. If it's an expression, tries to evaluate the expression.

func (Cursor)ExceptionSpecificationType

func (cCursor) ExceptionSpecificationType()int32

Retrieve the exception specification type associated with a given cursor.This is a value of type CXCursor_ExceptionSpecificationKind.

This only returns a valid result if the cursor refers to a function ormethod.

func (Cursor)Extent

func (cCursor) Extent()SourceRange

Retrieve the physical extent of the source construct referenced bythe given cursor.

The extent of a cursor starts with the file/line/column pointing at thefirst character within the source construct that the cursor refers to andends with the last character within that source construct. For adeclaration, the extent covers the declaration itself. For a reference,the extent covers the location of the reference (e.g., where the referencedentity was actually used).

func (Cursor)FieldDeclBitWidth

func (cCursor) FieldDeclBitWidth()int32

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.

func (Cursor)FindReferencesInFile

func (cCursor) FindReferencesInFile(fileFile, visitorCursorAndRangeVisitor)Result

Find references of a declaration in a specific file.

Parameter cursor pointing to a declaration or a reference of one.

Parameter file to search for references.

Parameter visitor callback that will receive pairs of CXCursor/CXSourceRange foreach reference found.The CXSourceRange will point inside the file; if the reference is insidea macro (and not a macro argument) the CXSourceRange will be invalid.

Returns one of the CXResult enumerators.

func (Cursor)HasAttrs

func (cCursor) HasAttrs()bool

Determine whether the given cursor has any attributes.

func (Cursor)HasVarDeclExternalStorage

func (cCursor) HasVarDeclExternalStorage()bool

If cursor refers to a variable declaration that has external storage returns 1. If cursor refers to a variable declaration that doesn't have external storage returns 0. Otherwise returns -1.

func (Cursor)HasVarDeclGlobalStorage

func (cCursor) HasVarDeclGlobalStorage()bool

If cursor refers to a variable declaration that has global storage returns 1. If cursor refers to a variable declaration that doesn't have global storage returns 0. Otherwise returns -1.

func (Cursor)HashCursor

func (cCursor) HashCursor()uint32

Compute a hash value for the given cursor.

func (Cursor)IBOutletCollectionType

func (cCursor) IBOutletCollectionType()Type

For cursors representing an iboutletcollection attribute,this function returns the collection element type.

func (Cursor)IncludedFile

func (cCursor) IncludedFile()File

Retrieve the file that is included by the given inclusion directive cursor.

func (Cursor)IsAnonymous

func (cCursor) IsAnonymous()bool

Determine whether the given cursor represents an anonymous tag or namespace

func (Cursor)IsAnonymousRecordDecl

func (cCursor) IsAnonymousRecordDecl()bool

Determine whether the given cursor represents an anonymous record declaration.

func (Cursor)IsBitField

func (cCursor) IsBitField()bool

Returns non-zero if the cursor specifies a Record member that is a bitfield.

func (Cursor)IsCursorDefinition

func (cCursor) IsCursorDefinition()bool

Determine whether the declaration pointed to by this cursor is also a definition of that entity.

func (Cursor)IsDynamicCall

func (cCursor) IsDynamicCall()bool

Given a cursor pointing to a C++ method call or an Objective-Cmessage, 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 amethod/message, it will return zero.

func (Cursor)IsExternalSymbol

func (cCursor) IsExternalSymbol() (string,string,uint32,bool)

Returns non-zero if the given cursor points to a symbol marked withexternal_source_symbol attribute.

Parameter language If non-NULL, and the attribute is present, will be set tothe 'language' string from the attribute.

Parameter definedIn If non-NULL, and the attribute is present, will be set tothe 'definedIn' string from the attribute.

Parameter isGenerated If non-NULL, and the attribute is present, will be set tonon-zero if the 'generated_declaration' is set in the attribute.

func (Cursor)IsFunctionInlined

func (cCursor) IsFunctionInlined()bool

Determine whether a CXCursor that is a function declaration, is an inline declaration.

func (Cursor)IsInlineNamespace

func (cCursor) IsInlineNamespace()bool

Determine whether the given cursor represents an inline namespace declaration.

func (Cursor)IsInvalidDeclaration

func (cCursor) IsInvalidDeclaration()bool

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 isinvalid, otherwise NULL.

func (Cursor)IsMacroBuiltin

func (cCursor) IsMacroBuiltin()bool

Determine whether a CXCursor that is a macro, is a builtin one.

func (Cursor)IsMacroFunctionLike

func (cCursor) IsMacroFunctionLike()bool

Determine whether a CXCursor that is a macro, is function like.

func (Cursor)IsNull

func (cCursor) IsNull()bool

Returns non-zero if \p cursor is null.

func (Cursor)IsObjCOptional

func (cCursor) IsObjCOptional()bool

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".

func (Cursor)IsVariadic

func (cCursor) IsVariadic()bool

Returns non-zero if the given cursor is a variadic function or method.

func (Cursor)IsVirtualBase

func (cCursor) IsVirtualBase()bool

Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual.

func (Cursor)Kind

func (cCursor) Kind()CursorKind

Retrieve the kind of the given cursor.

func (Cursor)Language

func (cCursor) Language()LanguageKind

Determine the "language" of the entity referred to by a given cursor.

func (Cursor)LexicalParent

func (cCursor) LexicalParent()Cursor

Determine the lexical parent of the given cursor.

The lexical parent of a cursor is the cursor in which the given \p cursorwas actually written. For many declarations, the lexical and semantic parentsare equivalent (the semantic parent is returned byclang_getCursorSemanticParent()). They diverge when declarations ordefinitions are provided out-of-line. For example:

\codeclass C {void f();};

void C::f() { }\endcode

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

In the example above, both declarations of C::f have C as theirsemantic context, while the lexical context of the first C::f is Cand the lexical context of the second C::f is the translation unit.

For declarations written in the global scope, the lexical parent isthe translation unit.

func (Cursor)Linkage

func (cCursor) Linkage()LinkageKind

Determine the linkage of the entity referred to by a given cursor.

func (Cursor)Location

func (cCursor) Location()SourceLocation

Retrieve the physical location of the source constructor referencedby the given cursor.

The location of a declaration is typically the location of the name of thatdeclaration, where the name of that declaration would occur if it isunnamed, or some keyword that introduces that particular declaration.The location of a reference is where that reference occurs within thesource code.

func (Cursor)Mangling

func (cCursor) Mangling()string

Retrieve the CXString representing the mangled name of the cursor.

func (Cursor)Module

func (cCursor) Module()Module

Given a CXCursor_ModuleImportDecl cursor, return the associated module.

func (Cursor)NumArguments

func (cCursor) NumArguments()int32

Retrieve the number of non-variadic arguments associated with a givencursor.

The number of arguments can be determined for calls as well as fordeclarations of functions or methods. For other cursors -1 is returned.

func (Cursor)NumOverloadedDecls

func (cCursor) NumOverloadedDecls()uint32

Determine the number of overloaded declarations referenced by aCXCursor_OverloadedDeclRef cursor.

Parameter cursor The cursor whose overloaded declarations are being queried.

Returns The number of overloaded declarations referenced by cursor. If itis not a CXCursor_OverloadedDeclRef cursor, returns 0.

func (Cursor)NumTemplateArguments

func (cCursor) NumTemplateArguments()int32

Returns the number of template args of a function decl representing atemplate specialization.

If the argument cursor cannot be converted into a template functiondeclaration, -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.

func (Cursor)ObjCManglings

func (cCursor) ObjCManglings() *StringSet

Retrieve the CXStrings representing the mangled symbols of the ObjC class interface or implementation at the cursor.

func (Cursor)OffsetOfField

func (cCursor) OffsetOfField()int64

Return the offset of the field represented by the Cursor.

If the cursor is not a field declaration, -1 is returned.If the cursor semantic parent is not a record field declaration,CXTypeLayoutError_Invalid is returned.If the field's type declaration is an incomplete type,CXTypeLayoutError_Incomplete is returned.If the field's type declaration is a dependent type,CXTypeLayoutError_Dependent is returned.If the field's name S is not found,CXTypeLayoutError_InvalidFieldName is returned.

func (Cursor)OverloadedDecl

func (cCursor) OverloadedDecl(indexuint32)Cursor

Retrieve a cursor for one of the overloaded declarations referencedby a CXCursor_OverloadedDeclRef cursor.

Parameter cursor The cursor whose overloaded declarations are being queried.

Parameter index The zero-based index into the set of overloaded declarations inthe cursor.

Returns A cursor representing the declaration referenced by the givencursor at the specified index. If the cursor does not have anassociated set of overloaded declarations, or if the index is out of bounds,returns clang_getNullCursor();

func (Cursor)OverriddenCursors

func (cCursor) OverriddenCursors() []Cursor

Determine the set of methods that are overridden by the givenmethod.

In both Objective-C and C++, a method (aka virtual member function,in C++) can override a virtual method in a base class. ForObjective-C, a method is said to override any method in the class'sbase class, its protocols, or its categories' protocols, that has the sameselector 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-Cimplementation is considered to override the same methods as itscorresponding method in the interface.

For C++, a virtual member function overrides any virtual memberfunction with the same signature that occurs in its baseclasses. With multiple inheritance, a virtual member function canoverride several virtual member functions coming from differentbase classes.

In all cases, this function determines the immediate overriddenmethod, rather than all of the overridden methods. For example, ifa 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 wheninvoked on C's method will be B's method. The client may theninvoke this function again, given the previously-found overriddenmethods, to map out the complete method-override set.

Parameter cursor A cursor representing an Objective-C or C++method. This routine will compute the set of methods that thismethod overrides.

Parameter overridden A pointer whose pointee will be replaced with apointer to an array of cursors, representing the set of overriddenmethods. If there are no overridden methods, the pointee will beset to NULL. The pointee must be freed via a call toclang_disposeOverriddenCursors().

Parameter num_overridden A pointer to the number of overriddenfunctions, will be set to the number of overridden functions in thearray pointed to by \p overridden.

func (Cursor)ParsedComment

func (cCursor) ParsedComment()Comment

Given a cursor that represents a documentable entity (e.g., declaration), return the associated parsed comment as a CXComment_FullComment AST node.

func (Cursor)PlatformAvailability

func (cCursor) PlatformAvailability(availabilitySizeint) (alwaysDeprecatedbool, deprecated_msgstring, always_unavailablebool, unavailable_msgstring, availability []PlatformAvailability)

PlatformAvailability determine the availability of the entity that this cursor refers to on any platforms for which availability information is known.

availabilitySize is the number of elements available in the availability array.

alwaysDeprecated is if non-NULL, will be set to indicate whether the entity is deprecated on all platforms.deprecatedMessage is 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.alwaysUnavailable is if non-NULL, will be set to indicate whether the entity is unavailable on all platforms.unavailableMessage is 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 is if non-NULL, an array of PlatformAvailability instances that will be populated with platform availability information, up to either the number of platforms for which availability information is available (as returned by this function) or availabilitySize, whichever is smaller.

Returns The number of platforms (N) for which availability information is available (which is unrelated to availabilitySize).Note that the client is responsible for calling Dispose to free each of the PlatformAvailability structures returned. There are min(N, availabilitySize) such structures.

func (Cursor)PrettyPrinted

func (cCursor) PrettyPrinted(policyPrintingPolicy)string

Pretty print declarations.

Parameter Cursor The cursor representing a declaration.

Parameter Policy The policy to control the entities being printed. IfNULL, a default policy is used.

Returns The pretty printed declaration or the empty string forother cursors.

func (Cursor)PrintingPolicy

func (cCursor) PrintingPolicy()PrintingPolicy

Retrieve the default policy for the cursor.

The policy should be released after use with \cclang_PrintingPolicy_dispose.

func (Cursor)PropertyAttributes

func (cCursor) PropertyAttributes(reserveduint32)uint32

Given a cursor that represents a property declaration, return theassociated property attributes. The bits are formed fromCXObjCPropertyAttrKind.

Parameter reserved Reserved for future use, pass 0.

func (Cursor)PropertyGetterName

func (cCursor) PropertyGetterName()string

Given a cursor that represents a property declaration, return the name of the method that implements the getter.

func (Cursor)PropertySetterName

func (cCursor) PropertySetterName()string

Given a cursor that represents a property declaration, return the name of the method that implements the setter, if any.

func (Cursor)RawCommentText

func (cCursor) RawCommentText()string

Given a cursor that represents a declaration, return the associated comment text, including comment markers.

func (Cursor)ReceiverType

func (cCursor) ReceiverType()Type

Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns the CXType of the receiver.

func (Cursor)ReferenceNameRange

func (cCursor) ReferenceNameRange(nameFlagsuint32, pieceIndexuint32)SourceRange

Given a cursor that references something else, return the source rangecovering that reference.

Parameter C A cursor pointing to a member reference, a declaration reference, oran operator call.Parameter NameFlags A bitset with three independent flags:CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, andCXNameRange_WantSinglePiece.Parameter PieceIndex For contiguous names or when passing the flagCXNameRange_WantSinglePiece, only one piece with index 0 isavailable. When the CXNameRange_WantSinglePiece flag is not passed for anon-contiguous names, this index can be used to retrieve the individualpieces of the name. See also CXNameRange_WantSinglePiece.

Returns The piece of the name pointed to by the given cursor. If there is noname, or if the PieceIndex is out-of-range, a null-cursor will be returned.

func (Cursor)Referenced

func (cCursor) Referenced()Cursor

For a cursor that is a reference, retrieve a cursor representing theentity that it references.

Reference cursors refer to other entities in the AST. For example, anObjective-C superclass reference cursor refers to an Objective-C class.This function produces the cursor for the Objective-C class from thecursor for the superclass reference. If the input cursor is a declaration ordefinition, it returns that declaration or definition unchanged.Otherwise, returns the NULL cursor.

func (Cursor)ResultType

func (cCursor) ResultType()Type

Retrieve the return type associated with a given cursor.

This only returns a valid type if the cursor refers to a function or method.

func (Cursor)SelectorIndex

func (cCursor) SelectorIndex()int32

If the cursor points to a selector identifier in an Objective-Cmethod or message expression, this returns the selector index.

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

Returns The selector index if the cursor is an Objective-C method or messageexpression and the cursor is pointing to a selector identifier, or -1otherwise.

func (Cursor)SemanticParent

func (cCursor) SemanticParent()Cursor

Determine the semantic parent of the given cursor.

The semantic parent of a cursor is the cursor that semantically containsthe given \p cursor. For many declarations, the lexical and semantic parentsare equivalent (the lexical parent is returned byclang_getCursorLexicalParent()). They diverge when declarations ordefinitions are provided out-of-line. For example:

\codeclass C {void f();};

void C::f() { }\endcode

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

In the example above, both declarations of C::f have C as theirsemantic context, while the lexical context of the first C::f is Cand the lexical context of the second C::f is the translation unit.

For global declarations, the semantic parent is the translation unit.

func (Cursor)SpecializedCursorTemplate

func (cCursor) SpecializedCursorTemplate()Cursor

Given a cursor that may represent a specialization or instantiationof a template, retrieve the cursor that represents the template that itspecializes or from which it was instantiated.

This routine determines the template involved both for explicitspecializations of templates and for implicit instantiations of the template,both of which are referred to as "specializations". For a class templatespecialization (e.g., std::vector<bool>), this routine will returneither the primary template (std::vector) or, if the specialization wasinstantiated from a class template partial specialization, the class templatepartial specialization. For a class template partial specialization and afunction template specialization (including instantiations), thisthis routine will return the specialized template.

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

Parameter C A cursor that may be a specialization of a template or a memberof a template.

Returns If the given cursor is a specialization or instantiation of atemplate or a member thereof, the template or member that it specializes orfrom which it was instantiated. Otherwise, returns a NULL cursor.

func (Cursor)Spelling

func (cCursor) Spelling()string

Retrieve a name for the entity referenced by this cursor.

func (Cursor)SpellingNameRange

func (cCursor) SpellingNameRange(pieceIndexuint32, optionsuint32)SourceRange

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 forObjective-C methods and Objective-C message expressions, there are multiplepieces for each selector identifier.

Parameter pieceIndex the index of the spelling name piece. If this is greaterthan the actual number of pieces, it will return a NULL (invalid) range.

Parameter options Reserved.

func (Cursor)StorageClass

func (cCursor) StorageClass()StorageClass

Returns the storage class for a function or variable declaration.

If the passed in Cursor is not a function or variable declaration,CX_SC_Invalid is returned else the storage class.

func (Cursor)TLSKind

func (cCursor) TLSKind()TLSKind

Determine the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.

func (Cursor)TemplateArgumentKind

func (cCursor) TemplateArgumentKind(iuint32)TemplateArgumentKind

Retrieve the kind of the I'th template argument of the CXCursor C.

If the argument CXCursor does not represent a FunctionDecl, an invalidtemplate 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, and Integral will be returned,respectively.

func (Cursor)TemplateArgumentType

func (cCursor) TemplateArgumentType(iuint32)Type

Retrieve a CXType representing the type of a TemplateArgument of afunction decl representing a template specialization.

If the argument CXCursor does not represent a FunctionDecl whose I'thtemplate argument has a kind of CXTemplateArgKind_Integral, an invalid typeis 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.

func (Cursor)TemplateArgumentUnsignedValue

func (cCursor) TemplateArgumentUnsignedValue(iuint32)uint64

Retrieve the value of an Integral TemplateArgument (of a functiondecl representing a template specialization) as an unsigned long long.

It is undefined to call this function on a CXCursor that does not represent aFunctionDecl or whose I'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.

func (Cursor)TemplateArgumentValue

func (cCursor) TemplateArgumentValue(iuint32)int64

Retrieve the value of an Integral TemplateArgument (of a functiondecl representing a template specialization) as a signed long long.

It is undefined to call this function on a CXCursor that does not represent aFunctionDecl or whose I'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.

func (Cursor)TemplateCursorKind

func (cCursor) TemplateCursorKind()CursorKind

Given a cursor that represents a template, determinethe cursor kind of the specializations would be generated by instantiatingthe template.

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

Parameter C The cursor to query. This cursor should represent a templatedeclaration.

Returns The cursor kind of the specializations that would be generatedby instantiating the template \p C. If \p C is not a template, returnsCXCursor_NoDeclFound.

func (Cursor)TranslationUnit

func (cCursor) TranslationUnit()TranslationUnit

Returns the translation unit that a cursor originated from.

func (Cursor)Type

func (cCursor) Type()Type

Retrieve the type of a CXCursor (if any).

func (Cursor)TypedefDeclUnderlyingType

func (cCursor) TypedefDeclUnderlyingType()Type

Retrieve the underlying type of a typedef declaration.

If the cursor does not reference a typedef declaration, an invalid type isreturned.

func (Cursor)USR

func (cCursor) USR()string

Retrieve a Unified Symbol Resolution (USR) for the entity referencedby the given cursor.

A Unified Symbol Resolution (USR) is a string that identifies a particularentity (function, class, variable, etc.) within a program. USRs can becompared across translation units to determine, e.g., when references inone translation refer to an entity defined in another translation unit.

func (Cursor)VarDeclInitializer

func (cCursor) VarDeclInitializer()Cursor

If cursor refers to a variable declaration and it has initializer returns cursor referring to the initializer otherwise return null cursor.

func (Cursor)Visibility

func (cCursor) Visibility()VisibilityKind

Describe the visibility of the entity referred to by a cursor.

This returns the default visibility if not explicitly specified bya visibility attribute. The default visibility may be changed bycommandline arguments.

Parameter cursor The cursor to query.

Returns The visibility of the cursor.

func (Cursor)Visit

func (cCursor) Visit(visitorCursorVisitor)bool

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 eachvisited child. The traversal may be recursive, if the visitor returnsChildVisit_Recurse. The traversal may also be ended prematurely, ifthe visitor returns ChildVisit_Break.

parent the cursor whose child may be visited. All kinds ofcursors can be visited, including invalid cursors (which, bydefinition, have no children).

visitor the visitor function that will be invoked for eachchild of parent.

clientData pointer data supplied by the client, which willbe passed to the visitor each time it is invoked.

Returns a non-zero value if the traversal was terminated.

func (Cursor)Xdata

func (cCursor) Xdata()int32

typeCursorAndRangeVisitor

type CursorAndRangeVisitor struct {// contains filtered or unexported fields}

typeCursorKind

type CursorKinduint32

Describes the kind of entity that a cursor refers to.

func (CursorKind)IsAttribute

func (ckCursorKind) IsAttribute()bool

Determine whether the given cursor kind represents an attribute.

func (CursorKind)IsDeclaration

func (ckCursorKind) IsDeclaration()bool

Determine whether the given cursor kind represents a declaration.

func (CursorKind)IsExpression

func (ckCursorKind) IsExpression()bool

Determine whether the given cursor kind represents an expression.

func (CursorKind)IsInvalid

func (ckCursorKind) IsInvalid()bool

Determine whether the given cursor kind represents an invalid cursor.

func (CursorKind)IsPreprocessing

func (ckCursorKind) IsPreprocessing()bool

* Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.

func (CursorKind)IsReference

func (ckCursorKind) IsReference()bool

Determine whether the given cursor kind represents a simplereference.

Note that other kinds of cursors (such as expressions) can also refer toother cursors. Use clang_getCursorReferenced() to determine whether aparticular cursor refers to another entity.

func (CursorKind)IsStatement

func (ckCursorKind) IsStatement()bool

Determine whether the given cursor kind represents a statement.

func (CursorKind)IsTranslationUnit

func (ckCursorKind) IsTranslationUnit()bool

Determine whether the given cursor kind represents a translation unit.

func (CursorKind)IsUnexposed

func (ckCursorKind) IsUnexposed()bool

* Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).

func (CursorKind)Spelling

func (ckCursorKind) Spelling()string

func (CursorKind)String

func (ckCursorKind) String()string

typeCursorSet

type CursorSet struct {// contains filtered or unexported fields}

A fast container representing a set of CXCursors.

funcNewCursorSet

func NewCursorSet()CursorSet

Creates an empty CXCursorSet.

func (CursorSet)Contains

func (csCursorSet) Contains(cursorCursor)uint32

Queries a CXCursorSet to see if it contains a specific CXCursor.

Returns non-zero if the set contains the specified cursor.

func (CursorSet)Dispose

func (csCursorSet) Dispose()

Disposes a CXCursorSet and releases its associated memory.

func (CursorSet)Insert

func (csCursorSet) Insert(cursorCursor)uint32

Inserts a CXCursor into a CXCursorSet.

Returns zero if the CXCursor was already in the set, and non-zero otherwise.

typeCursorVisitor

type CursorVisitor func(cursor, parentCursor) (statusChildVisitResult)

CursorVisitor invoked for each cursor found by a traversal.

This visitor function will be invoked for each cursor found byclang_visitCursorChildren(). Its first argument is the cursor beingvisited, its second argument is the parent visitor for that cursor,and its third argument is the client data provided toclang_visitCursorChildren().

The visitor should return one of the ChildVisitResult valuesto direct clang_visitCursorChildren().

typeCursor_ExceptionSpecificationKind

type Cursor_ExceptionSpecificationKinduint32

Describes the exception specification of a cursor.

A negative value indicates that the cursor is not a function declaration.

func (Cursor_ExceptionSpecificationKind)Spelling

func (Cursor_ExceptionSpecificationKind)String

typeDeclQualifierKind

type DeclQualifierKinduint32

'Qualifiers' written next to the return and parameter types in Objective-C method declarations.

func (DeclQualifierKind)Spelling

func (dqkDeclQualifierKind) Spelling()string

func (DeclQualifierKind)String

func (dqkDeclQualifierKind) String()string

typeDiagnostic

type Diagnostic struct {// contains filtered or unexported fields}

A single diagnostic, containing the diagnostic's severity, location, text, source ranges, and fix-it hints.

func (Diagnostic)Category

func (dDiagnostic) Category()uint32

Retrieve the category number for this diagnostic.

Diagnostics can be categorized into groups along with other, relateddiagnostics (e.g., diagnostics under the same warning flag). This routineretrieves the category number for the given diagnostic.

Returns The number of the category that contains this diagnostic, or zeroif this diagnostic is uncategorized.

func (Diagnostic)CategoryText

func (dDiagnostic) CategoryText()string

Retrieve the diagnostic category text for a given diagnostic.

Returns The text of the given diagnostic category.

func (Diagnostic)ChildDiagnostics

func (dDiagnostic) ChildDiagnostics()DiagnosticSet

Retrieve the child diagnostics of a CXDiagnostic.

This CXDiagnosticSet does not need to be released byclang_disposeDiagnosticSet.

func (Diagnostic)Dispose

func (dDiagnostic) Dispose()

Destroy a diagnostic.

func (Diagnostic)FixIt

func (dDiagnostic) FixIt(fixItuint32) (SourceRange,string)

Retrieve the replacement information for a given fix-it.

Fix-its are described in terms of a source range whose contentsshould be replaced by a string. This approach generalizes overthree kinds of operations: removal of source code (the range coversthe code to be removed and the replacement string is empty),replacement of source code (the range covers the code to bereplaced and the replacement string provides the new code), andinsertion (both the start and end of the range point at theinsertion location, and the replacement string provides the text toinsert).

Parameter Diagnostic The diagnostic whose fix-its are being queried.

Parameter FixIt The zero-based index of the fix-it.

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

Returns A string containing text that should be replace the sourcecode indicated by the ReplacementRange.

func (Diagnostic)FormatDiagnostic

func (dDiagnostic) FormatDiagnostic(optionsuint32)string

Format the given diagnostic in a manner that is suitable for display.

This routine will format the given diagnostic to a string, renderingthe diagnostic according to the various options given. Theclang_defaultDiagnosticDisplayOptions() function returns the set ofoptions that most closely mimics the behavior of the clang compiler.

Parameter Diagnostic The diagnostic to print.

Parameter Options A set of options that control the diagnostic display,created by combining CXDiagnosticDisplayOptions values.

Returns A new string containing for formatted diagnostic.

func (Diagnostic)Location

func (dDiagnostic) Location()SourceLocation

Retrieve the source location of the given diagnostic.

This location is where Clang would print the caret ('^') whendisplaying the diagnostic on the command line.

func (Diagnostic)NumFixIts

func (dDiagnostic) NumFixIts()uint32

Determine the number of fix-it hints associated with the given diagnostic.

func (Diagnostic)NumRanges

func (dDiagnostic) NumRanges()uint32

Determine the number of source ranges associated with the given diagnostic.

func (Diagnostic)Option

func (dDiagnostic) Option() (string,string)

Retrieve the name of the command-line option that enabled thisdiagnostic.

Parameter Diag The diagnostic to be queried.

Parameter Disable If non-NULL, will be set to the option that disables thisdiagnostic (if any).

Returns A string that contains the command-line option used to enable thiswarning, such as "-Wconversion" or "-pedantic".

func (Diagnostic)Range

Retrieve a source range associated with the diagnostic.

A diagnostic's source ranges highlight important elements in the sourcecode. On the command line, Clang displays source ranges byunderlining them with '~' characters.

Parameter Diagnostic the diagnostic whose range is being extracted.

Parameter Range the zero-based index specifying which range to

Returns the requested source range.

func (Diagnostic)Severity

func (dDiagnostic) Severity()DiagnosticSeverity

Determine the severity of the given diagnostic.

func (Diagnostic)Spelling

func (dDiagnostic) Spelling()string

Retrieve the text of the given diagnostic.

typeDiagnosticDisplayOptions

type DiagnosticDisplayOptionsuint32

Options to control the display of diagnostics.

The values in this enum are meant to be combined to customize thebehavior of clang_formatDiagnostic().

func (DiagnosticDisplayOptions)Spelling

func (ddoDiagnosticDisplayOptions) Spelling()string

func (DiagnosticDisplayOptions)String

typeDiagnosticSet

type DiagnosticSet struct {// contains filtered or unexported fields}

A group of CXDiagnostics.

func (DiagnosticSet)DiagnosticInSet

func (dsDiagnosticSet) DiagnosticInSet(indexuint32)Diagnostic

Retrieve a diagnostic associated with the given CXDiagnosticSet.

Parameter Diags the CXDiagnosticSet to query.Parameter Index the zero-based diagnostic number to retrieve.

Returns the requested diagnostic. This diagnostic must be freedvia a call to clang_disposeDiagnostic().

func (DiagnosticSet)Dispose

func (dsDiagnosticSet) Dispose()

Release a CXDiagnosticSet and all of its contained diagnostics.

func (DiagnosticSet)NumDiagnosticsInSet

func (dsDiagnosticSet) NumDiagnosticsInSet()uint32

Determine the number of diagnostics in a CXDiagnosticSet.

typeDiagnosticSeverity

type DiagnosticSeverityuint32

Describes the severity of a particular diagnostic.

func (DiagnosticSeverity)Spelling

func (dsDiagnosticSeverity) Spelling()string

func (DiagnosticSeverity)String

func (dsDiagnosticSeverity) String()string

typeErrorCode

type ErrorCodeuint32

Error codes returned by libclang routines.

Zero (CXError_Success) is the only error code indicating success. Othererror codes, including not yet assigned non-zero values, indicate errors.

func (ErrorCode)Spelling

func (ecErrorCode) Spelling()string

func (ErrorCode)String

func (ecErrorCode) String()string

typeEvalResult

type EvalResult struct {// contains filtered or unexported fields}

Evaluation result of a cursor

func (EvalResult)AsDouble

func (erEvalResult) AsDouble()float64

Returns the evaluation result as double if the kind is double.

func (EvalResult)AsInt

func (erEvalResult) AsInt()int32

Returns the evaluation result as integer if the kind is Int.

func (EvalResult)AsLongLong

func (erEvalResult) AsLongLong()int64

Returns the evaluation result as a long long integer if the kind is Int. This prevents overflows that may happen if the result is returned with clang_EvalResult_getAsInt.

func (EvalResult)AsStr

func (erEvalResult) AsStr()string

Returns the evaluation result as a constant string if the kind is other than Int or float. User must not free this pointer, instead call clang_EvalResult_dispose on the CXEvalResult returned by clang_Cursor_Evaluate.

func (EvalResult)AsUnsigned

func (erEvalResult) AsUnsigned()uint64

Returns the evaluation result as an unsigned integer if the kind is Int and clang_EvalResult_isUnsignedInt is non-zero.

func (EvalResult)Dispose

func (erEvalResult) Dispose()

Disposes the created Eval memory.

func (EvalResult)IsUnsignedInt

func (erEvalResult) IsUnsignedInt()bool

Returns a non-zero value if the kind is Int and the evaluation result resulted in an unsigned integer.

func (EvalResult)Kind

func (erEvalResult) Kind()EvalResultKind

Returns the kind of the evaluated result.

typeEvalResultKind

type EvalResultKinduint32

func (EvalResultKind)Spelling

func (erkEvalResultKind) Spelling()string

func (EvalResultKind)String

func (erkEvalResultKind) String()string

typeFile

type File struct {// contains filtered or unexported fields}

A particular source file that is part of a translation unit.

func (File)IsEqual

func (fFile) IsEqual(file2File)bool

Returns non-zero if the file1 and file2 point to the same file, or they are both NULL.

func (File)Name

func (fFile) Name()string

Retrieve the complete file and path name of the given file.

func (File)Time

func (fFile) Time()time.Time

Retrieve the last modification time of the given file.

func (File)TryGetRealPathName

func (fFile) TryGetRealPathName()string

Returns the real path name of file.

An empty string may be returned. Use clang_getFileName() in that case.

func (File)UniqueID

func (fFile) UniqueID() (FileUniqueID,int32)

Retrieve the unique ID for the given file.

Parameter file the file to get the ID for.Parameter outID stores the returned CXFileUniqueID.Returns If there was a failure getting the unique ID, returns non-zero,otherwise returns 0.

typeFileUniqueID

type FileUniqueID struct {// contains filtered or unexported fields}

Uniquely identifies a CXFile, that refers to the same underlying file, across an indexing session.

typeGlobalOptFlags

type GlobalOptFlagsuint32

func (GlobalOptFlags)Spelling

func (gofGlobalOptFlags) Spelling()string

func (GlobalOptFlags)String

func (gofGlobalOptFlags) String()string

typeIdxAttrInfo

type IdxAttrInfo struct {// contains filtered or unexported fields}

func (IdxAttrInfo)Cursor

func (iaiIdxAttrInfo) Cursor()Cursor

func (*IdxAttrInfo)IBOutletCollectionAttrInfo

func (iai *IdxAttrInfo) IBOutletCollectionAttrInfo() *IdxIBOutletCollectionAttrInfo

func (IdxAttrInfo)Kind

func (iaiIdxAttrInfo) Kind()IdxAttrKind

func (IdxAttrInfo)Loc

func (iaiIdxAttrInfo) Loc()IdxLoc

typeIdxAttrKind

type IdxAttrKinduint32

func (IdxAttrKind)Spelling

func (iakIdxAttrKind) Spelling()string

func (IdxAttrKind)String

func (iakIdxAttrKind) String()string

typeIdxBaseClassInfo

type IdxBaseClassInfo struct {// contains filtered or unexported fields}

func (IdxBaseClassInfo)Base

func (ibciIdxBaseClassInfo) Base() *IdxEntityInfo

func (IdxBaseClassInfo)Cursor

func (ibciIdxBaseClassInfo) Cursor()Cursor

func (IdxBaseClassInfo)Loc

func (ibciIdxBaseClassInfo) Loc()IdxLoc

typeIdxCXXClassDeclInfo

type IdxCXXClassDeclInfo struct {// contains filtered or unexported fields}

func (IdxCXXClassDeclInfo)Bases

func (icxxcdiIdxCXXClassDeclInfo) Bases() []*IdxBaseClassInfo

func (IdxCXXClassDeclInfo)DeclInfo

func (icxxcdiIdxCXXClassDeclInfo) DeclInfo() *IdxDeclInfo

func (IdxCXXClassDeclInfo)NumBases

func (icxxcdiIdxCXXClassDeclInfo) NumBases()uint32

typeIdxClientASTFile

type IdxClientASTFile struct {// contains filtered or unexported fields}

The client's data object that is associated with an AST file (PCH or module).

typeIdxClientContainer

type IdxClientContainer struct {// contains filtered or unexported fields}

The client's data object that is associated with a semantic container of entities.

typeIdxClientEntity

type IdxClientEntity struct {// contains filtered or unexported fields}

The client's data object that is associated with a semantic entity.

typeIdxClientFile

type IdxClientFile struct {// contains filtered or unexported fields}

The client's data object that is associated with a CXFile.

typeIdxContainerInfo

type IdxContainerInfo struct {// contains filtered or unexported fields}

func (*IdxContainerInfo)ClientContainer

func (ici *IdxContainerInfo) ClientContainer()IdxClientContainer

For retrieving a custom CXIdxClientContainer attached to a container.

func (IdxContainerInfo)Cursor

func (iciIdxContainerInfo) Cursor()Cursor

func (*IdxContainerInfo)SetClientContainer

func (ici *IdxContainerInfo) SetClientContainer(iccIdxClientContainer)

For setting a custom CXIdxClientContainer attached to a container.

typeIdxDeclInfo

type IdxDeclInfo struct {// contains filtered or unexported fields}

func (IdxDeclInfo)Attributes

func (idiIdxDeclInfo) Attributes() []*IdxAttrInfo

func (*IdxDeclInfo)CategoryDeclInfo

func (idi *IdxDeclInfo) CategoryDeclInfo() *IdxObjCCategoryDeclInfo

func (*IdxDeclInfo)ClassDeclInfo

func (idi *IdxDeclInfo) ClassDeclInfo() *IdxCXXClassDeclInfo

func (*IdxDeclInfo)ContainerDeclInfo

func (idi *IdxDeclInfo) ContainerDeclInfo() *IdxObjCContainerDeclInfo

func (IdxDeclInfo)Cursor

func (idiIdxDeclInfo) Cursor()Cursor

func (IdxDeclInfo)DeclAsContainer

func (idiIdxDeclInfo) DeclAsContainer() *IdxContainerInfo

func (IdxDeclInfo)EntityInfo

func (idiIdxDeclInfo) EntityInfo() *IdxEntityInfo

func (IdxDeclInfo)Flags

func (idiIdxDeclInfo) Flags()uint32

func (*IdxDeclInfo)InterfaceDeclInfo

func (idi *IdxDeclInfo) InterfaceDeclInfo() *IdxObjCInterfaceDeclInfo

func (IdxDeclInfo)IsContainer

func (idiIdxDeclInfo) IsContainer()bool

func (IdxDeclInfo)IsDefinition

func (idiIdxDeclInfo) IsDefinition()bool

func (IdxDeclInfo)IsImplicit

func (idiIdxDeclInfo) IsImplicit()bool

Whether the declaration exists in code or was created implicitly by the compiler, e.g. implicit Objective-C methods for properties.

func (IdxDeclInfo)IsRedeclaration

func (idiIdxDeclInfo) IsRedeclaration()bool

func (IdxDeclInfo)LexicalContainer

func (idiIdxDeclInfo) LexicalContainer() *IdxContainerInfo

Generally same as #semanticContainer but can be different in cases like out-of-line C++ member functions.

func (IdxDeclInfo)Loc

func (idiIdxDeclInfo) Loc()IdxLoc

func (IdxDeclInfo)NumAttributes

func (idiIdxDeclInfo) NumAttributes()uint32

func (*IdxDeclInfo)PropertyDeclInfo

func (idi *IdxDeclInfo) PropertyDeclInfo() *IdxObjCPropertyDeclInfo

func (*IdxDeclInfo)ProtocolRefListInfo

func (idi *IdxDeclInfo) ProtocolRefListInfo() *IdxObjCProtocolRefListInfo

func (IdxDeclInfo)SemanticContainer

func (idiIdxDeclInfo) SemanticContainer() *IdxContainerInfo

typeIdxDeclInfoFlags

type IdxDeclInfoFlagsuint32
const (IdxDeclFlag_SkippedIdxDeclInfoFlags =C.CXIdxDeclFlag_Skipped)

func (IdxDeclInfoFlags)Spelling

func (idifIdxDeclInfoFlags) Spelling()string

func (IdxDeclInfoFlags)String

func (idifIdxDeclInfoFlags) String()string

typeIdxEntityCXXTemplateKind

type IdxEntityCXXTemplateKinduint32

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

func (IdxEntityCXXTemplateKind)Spelling

func (iecxxtkIdxEntityCXXTemplateKind) Spelling()string

func (IdxEntityCXXTemplateKind)String

func (iecxxtkIdxEntityCXXTemplateKind) String()string

typeIdxEntityInfo

type IdxEntityInfo struct {// contains filtered or unexported fields}

func (IdxEntityInfo)Attributes

func (ieiIdxEntityInfo) Attributes() []*IdxAttrInfo

func (*IdxEntityInfo)ClientEntity

func (iei *IdxEntityInfo) ClientEntity()IdxClientEntity

For retrieving a custom CXIdxClientEntity attached to an entity.

func (IdxEntityInfo)Cursor

func (ieiIdxEntityInfo) Cursor()Cursor

func (IdxEntityInfo)Kind

func (IdxEntityInfo)Lang

func (IdxEntityInfo)Name

func (ieiIdxEntityInfo) Name()string

func (IdxEntityInfo)NumAttributes

func (ieiIdxEntityInfo) NumAttributes()uint32

func (*IdxEntityInfo)SetClientEntity

func (iei *IdxEntityInfo) SetClientEntity(iceIdxClientEntity)

For setting a custom CXIdxClientEntity attached to an entity.

func (IdxEntityInfo)TemplateKind

func (ieiIdxEntityInfo) TemplateKind()IdxEntityCXXTemplateKind

func (IdxEntityInfo)USR

func (ieiIdxEntityInfo) USR()string

typeIdxEntityKind

type IdxEntityKinduint32

func (IdxEntityKind)IsEntityObjCContainerKind

func (iekIdxEntityKind) IsEntityObjCContainerKind()bool

func (IdxEntityKind)Spelling

func (iekIdxEntityKind) Spelling()string

func (IdxEntityKind)String

func (iekIdxEntityKind) String()string

typeIdxEntityLanguage

type IdxEntityLanguageuint32

func (IdxEntityLanguage)Spelling

func (ielIdxEntityLanguage) Spelling()string

func (IdxEntityLanguage)String

func (ielIdxEntityLanguage) String()string

typeIdxEntityRefInfo

type IdxEntityRefInfo struct {// contains filtered or unexported fields}

Data for IndexerCallbacks#indexEntityReference.

func (IdxEntityRefInfo)Container

func (ieriIdxEntityRefInfo) Container() *IdxContainerInfo

Lexical container context of the reference.

func (IdxEntityRefInfo)Cursor

func (ieriIdxEntityRefInfo) Cursor()Cursor

Reference cursor.

func (IdxEntityRefInfo)Kind

func (IdxEntityRefInfo)Loc

func (ieriIdxEntityRefInfo) Loc()IdxLoc

func (IdxEntityRefInfo)ParentEntity

func (ieriIdxEntityRefInfo) ParentEntity() *IdxEntityInfo

Immediate "parent" of the reference. For example:

\codeFoo *var;\endcode

The parent of reference of type 'Foo' is the variable 'var'.For references inside statement bodies of functions/methods,the parentEntity will be the function/method.

func (IdxEntityRefInfo)ReferencedEntity

func (ieriIdxEntityRefInfo) ReferencedEntity() *IdxEntityInfo

The entity that gets referenced.

func (IdxEntityRefInfo)Role

func (ieriIdxEntityRefInfo) Role()SymbolRole

Sets of symbol roles of the reference.

typeIdxEntityRefKind

type IdxEntityRefKinduint32

Data for IndexerCallbacks#indexEntityReference.

This may be deprecated in a future version as this duplicatesthe CXSymbolRole_Implicit bit in CXSymbolRole.

const (// The entity is referenced directly in user's code.IdxEntityRef_DirectIdxEntityRefKind =C.CXIdxEntityRef_Direct// An implicit reference, e.g. a reference of an Objective-C method via the dot syntax.IdxEntityRef_Implicit =C.CXIdxEntityRef_Implicit)

func (IdxEntityRefKind)Spelling

func (ierkIdxEntityRefKind) Spelling()string

func (IdxEntityRefKind)String

func (ierkIdxEntityRefKind) String()string

typeIdxIBOutletCollectionAttrInfo

type IdxIBOutletCollectionAttrInfo struct {// contains filtered or unexported fields}

func (IdxIBOutletCollectionAttrInfo)AttrInfo

func (iibocaiIdxIBOutletCollectionAttrInfo) AttrInfo() *IdxAttrInfo

func (IdxIBOutletCollectionAttrInfo)ClassCursor

func (iibocaiIdxIBOutletCollectionAttrInfo) ClassCursor()Cursor

func (IdxIBOutletCollectionAttrInfo)ClassLoc

func (iibocaiIdxIBOutletCollectionAttrInfo) ClassLoc()IdxLoc

func (IdxIBOutletCollectionAttrInfo)ObjcClass

func (iibocaiIdxIBOutletCollectionAttrInfo) ObjcClass() *IdxEntityInfo

typeIdxImportedASTFileInfo

type IdxImportedASTFileInfo struct {// contains filtered or unexported fields}

Data for IndexerCallbacks#importedASTFile.

func (IdxImportedASTFileInfo)File

func (iiastfiIdxImportedASTFileInfo) File()File

Top level AST file containing the imported PCH, module or submodule.

func (IdxImportedASTFileInfo)IsImplicit

func (iiastfiIdxImportedASTFileInfo) IsImplicit()bool

Non-zero if an inclusion directive was automatically turned into a module import. Applicable only for modules.

func (IdxImportedASTFileInfo)Loc

func (iiastfiIdxImportedASTFileInfo) Loc()IdxLoc

Location where the file is imported. Applicable only for modules.

func (IdxImportedASTFileInfo)Module

func (iiastfiIdxImportedASTFileInfo) Module()Module

The imported module or NULL if the AST file is a PCH.

typeIdxIncludedFileInfo

type IdxIncludedFileInfo struct {// contains filtered or unexported fields}

Data for ppIncludedFile callback.

func (IdxIncludedFileInfo)File

func (iifiIdxIncludedFileInfo) File()File

The actual file that the \#include/\#import directive resolved to.

func (IdxIncludedFileInfo)Filename

func (iifiIdxIncludedFileInfo) Filename()string

Filename as written in the \#include/\#import directive.

func (IdxIncludedFileInfo)HashLoc

func (iifiIdxIncludedFileInfo) HashLoc()IdxLoc

Location of '#' in the \#include/\#import directive.

func (IdxIncludedFileInfo)IsAngled

func (iifiIdxIncludedFileInfo) IsAngled()bool

func (IdxIncludedFileInfo)IsImport

func (iifiIdxIncludedFileInfo) IsImport()bool

func (IdxIncludedFileInfo)IsModuleImport

func (iifiIdxIncludedFileInfo) IsModuleImport()bool

Non-zero if the directive was automatically turned into a module import.

typeIdxLoc

type IdxLoc struct {// contains filtered or unexported fields}

Source location passed to index callbacks.

func (IdxLoc)FileLocation

func (ilIdxLoc) FileLocation() (IdxClientFile,File,uint32,uint32,uint32)

Retrieve the CXIdxFile, file, line, column, and offset represented bythe given CXIdxLoc.

If the location refers into a macro expansion, retrieves thelocation of the macro expansion and if it refers into a macro argumentretrieves the location of the argument.

func (IdxLoc)SourceLocation

func (ilIdxLoc) SourceLocation()SourceLocation

Retrieve the CXSourceLocation represented by the given CXIdxLoc.

typeIdxObjCCategoryDeclInfo

type IdxObjCCategoryDeclInfo struct {// contains filtered or unexported fields}

func (IdxObjCCategoryDeclInfo)ClassCursor

func (ioccdiIdxObjCCategoryDeclInfo) ClassCursor()Cursor

func (IdxObjCCategoryDeclInfo)ClassLoc

func (ioccdiIdxObjCCategoryDeclInfo) ClassLoc()IdxLoc

func (IdxObjCCategoryDeclInfo)ContainerInfo

func (IdxObjCCategoryDeclInfo)ObjcClass

func (ioccdiIdxObjCCategoryDeclInfo) ObjcClass() *IdxEntityInfo

func (IdxObjCCategoryDeclInfo)Protocols

typeIdxObjCContainerDeclInfo

type IdxObjCContainerDeclInfo struct {// contains filtered or unexported fields}

func (IdxObjCContainerDeclInfo)DeclInfo

func (ioccdiIdxObjCContainerDeclInfo) DeclInfo() *IdxDeclInfo

func (IdxObjCContainerDeclInfo)Kind

typeIdxObjCContainerKind

type IdxObjCContainerKinduint32

func (IdxObjCContainerKind)Spelling

func (iocckIdxObjCContainerKind) Spelling()string

func (IdxObjCContainerKind)String

func (iocckIdxObjCContainerKind) String()string

typeIdxObjCInterfaceDeclInfo

type IdxObjCInterfaceDeclInfo struct {// contains filtered or unexported fields}

func (IdxObjCInterfaceDeclInfo)ContainerInfo

func (IdxObjCInterfaceDeclInfo)Protocols

func (IdxObjCInterfaceDeclInfo)SuperInfo

func (iocidiIdxObjCInterfaceDeclInfo) SuperInfo() *IdxBaseClassInfo

typeIdxObjCPropertyDeclInfo

type IdxObjCPropertyDeclInfo struct {// contains filtered or unexported fields}

func (IdxObjCPropertyDeclInfo)DeclInfo

func (iocpdiIdxObjCPropertyDeclInfo) DeclInfo() *IdxDeclInfo

func (IdxObjCPropertyDeclInfo)Getter

func (iocpdiIdxObjCPropertyDeclInfo) Getter() *IdxEntityInfo

func (IdxObjCPropertyDeclInfo)Setter

func (iocpdiIdxObjCPropertyDeclInfo) Setter() *IdxEntityInfo

typeIdxObjCProtocolRefInfo

type IdxObjCProtocolRefInfo struct {// contains filtered or unexported fields}

func (IdxObjCProtocolRefInfo)Cursor

func (iocpriIdxObjCProtocolRefInfo) Cursor()Cursor

func (IdxObjCProtocolRefInfo)Loc

func (iocpriIdxObjCProtocolRefInfo) Loc()IdxLoc

func (IdxObjCProtocolRefInfo)Protocol

func (iocpriIdxObjCProtocolRefInfo) Protocol() *IdxEntityInfo

typeIdxObjCProtocolRefListInfo

type IdxObjCProtocolRefListInfo struct {// contains filtered or unexported fields}

func (IdxObjCProtocolRefListInfo)NumProtocols

func (iocprliIdxObjCProtocolRefListInfo) NumProtocols()uint32

func (IdxObjCProtocolRefListInfo)Protocols

typeIndex

type Index struct {// contains filtered or unexported fields}

An "index" that consists of a set of translation units that would typically be linked together into an executable or library.

funcNewIndex

func NewIndex(excludeDeclarationsFromPCHint32, displayDiagnosticsint32)Index

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" declarationis one that belongs in the translation unit itself and not in a precompiledheader that was used by the translation unit. If zero, all declarationswill be enumerated.

Here is an example:

\code// excludeDeclsFromPCH = 1, displayDiagnostics=1Idx = 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);\endcode

This process of creating the 'pch', loading it separately, and using it (via-include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks(which gives the indexer the same performance benefit as the compiler).

func (Index)Action_create

func (iIndex) Action_create()IndexAction

An indexing action/session, to be applied to one or multipletranslation units.

Parameter CIdx The index object with which the index action will be associated.

func (Index)Dispose

func (iIndex) Dispose()

Destroy the given index.

The index must not be destroyed until all of the translation units createdwithin that index have been destroyed.

func (Index)GlobalOptions

func (iIndex) GlobalOptions()uint32

Gets the general options associated with a CXIndex.

Returns A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags thatare associated with the given CXIndex object.

func (Index)ParseTranslationUnit

func (iIndex) ParseTranslationUnit(sourceFilenamestring, commandLineArgs []string, unsavedFiles []UnsavedFile, optionsuint32)TranslationUnit

Same as clang_parseTranslationUnit2, but returns the CXTranslationUnit instead of an error code. In case of an error this routine returns a NULL CXTranslationUnit, without further detailed error codes.

func (Index)ParseTranslationUnit2

func (iIndex) ParseTranslationUnit2(sourceFilenamestring, commandLineArgs []string, unsavedFiles []UnsavedFile, optionsuint32, outTU *TranslationUnit)ErrorCode

Parse the given source file and the translation unit correspondingto that file.

This routine is the main entry point for the Clang C API, providing theability to parse a source file into a translation unit that can then bequeried by other functions in the API. This routine accepts a set ofcommand-line arguments so that the compilation can be configured in the sameway that the compiler is configured on the command line.

Parameter CIdx The index object with which the translation unit will beassociated.

Parameter source_filename The name of the source file to load, or NULL if thesource file is included in command_line_args.

Parameter command_line_args The command-line arguments that would bepassed to the clang executable if it were being invoked out-of-process.These command-line options will be parsed and will affect how the translationunit is parsed. Note that the following options are ignored: '-c','-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.

Parameter num_command_line_args The number of command-line arguments incommand_line_args.

Parameter unsaved_files the files that have not yet been saved to diskbut may be required for parsing, including the contents ofthose files. The contents and name of these files (as specified byCXUnsavedFile) are copied when necessary, so the client only needs toguarantee their validity until the call to this function returns.

Parameter num_unsaved_files the number of unsaved file entries in \punsaved_files.

Parameter options A bitmask of options that affects how the translation unitis managed but not its compilation. This should be a bitwise OR of theCXTranslationUnit_XXX flags.

\param[out] out_TU A non-NULL pointer to store the createdCXTranslationUnit, describing the parsed code and containing anydiagnostics produced by the compiler.

Returns Zero on success, otherwise returns an error code.

func (Index)ParseTranslationUnit2FullArgv

func (iIndex) ParseTranslationUnit2FullArgv(sourceFilenamestring, commandLineArgs []string, unsavedFiles []UnsavedFile, optionsuint32, outTU *TranslationUnit)ErrorCode

Same as clang_parseTranslationUnit2 but requires a full command line for command_line_args including argv[0]. This is useful if the standard library paths are relative to the binary.

func (Index)SetGlobalOptions

func (iIndex) SetGlobalOptions(optionsuint32)

Sets general options associated with a CXIndex.

For example:\codeCXIndex idx = ...;clang_CXIndex_setGlobalOptions(idx,clang_CXIndex_getGlobalOptions(idx) |CXGlobalOpt_ThreadBackgroundPriorityForIndexing);\endcode

Parameter options A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags.

func (Index)SetInvocationEmissionPathOption

func (iIndex) SetInvocationEmissionPathOption(pathstring)

Sets the invocation emission path option in a CXIndex.

The invocation emission path specifies a path which will contain logfiles for certain libclang invocations. A null value (default) implies thatlibclang invocations are not logged..

func (Index)TranslationUnit

func (iIndex) TranslationUnit(astFilenamestring)TranslationUnit

Same as clang_createTranslationUnit2, but returns the CXTranslationUnit instead of an error code. In case of an error this routine returns a NULL CXTranslationUnit, without further detailed error codes.

func (Index)TranslationUnit2

func (iIndex) TranslationUnit2(astFilenamestring, outTU *TranslationUnit)ErrorCode

Create a translation unit from an AST file (-emit-ast).

\param[out] out_TU A non-NULL pointer to store the createdCXTranslationUnit.

Returns Zero on success, otherwise returns an error code.

func (Index)TranslationUnitFromSourceFile

func (iIndex) TranslationUnitFromSourceFile(sourceFilenamestring, clangCommandLineArgs []string, unsavedFiles []UnsavedFile)TranslationUnit

Return the CXTranslationUnit for a given source file and the providedcommand 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 thespecified command line arguments.

Note: When encountered in 'clang_command_line_args', the following optionsare ignored:

'-c''-emit-ast''-fsyntax-only''-o \<output file>' (both '-o' and '\<output file>' are ignored)

Parameter CIdx The index object with which the translation unit will beassociated.

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

Parameter num_clang_command_line_args The number of command-line arguments in\p clang_command_line_args.

Parameter clang_command_line_args The command-line arguments that would bepassed to the clang executable if it were being invoked out-of-process.These command-line options will be parsed and will affect how the translationunit is parsed. Note that the following options are ignored: '-c','-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.

Parameter num_unsaved_files the number of unsaved file entries in \punsaved_files.

Parameter unsaved_files the files that have not yet been saved to diskbut may be required for code completion, including the contents ofthose files. The contents and name of these files (as specified byCXUnsavedFile) are copied when necessary, so the client only needs toguarantee their validity until the call to this function returns.

typeIndexAction

type IndexAction struct {// contains filtered or unexported fields}

An indexing action/session, to be applied to one or multiple translation units.

func (IndexAction)Dispose

func (iaIndexAction) Dispose()

Destroy the given index action.

The index action must not be destroyed until all of the translation unitscreated within that index action have been destroyed.

func (IndexAction)IndexSourceFile

func (iaIndexAction) IndexSourceFile(clientDataClientData, indexCallbacks *IndexerCallbacks, indexCallbacksSizeuint32, indexOptionsuint32, sourceFilenamestring, commandLineArgs []string, unsavedFiles []UnsavedFile, outTU *TranslationUnit, tUOptionsuint32)int32

Index the given source file and the translation unit correspondingto that file via callbacks implemented through #IndexerCallbacks.

Parameter client_data pointer data supplied by the client, which willbe passed to the invoked callbacks.

Parameter index_callbacks Pointer to indexing callbacks that the clientimplements.

Parameter index_callbacks_size Size of #IndexerCallbacks structure that getspassed in index_callbacks.

Parameter index_options A bitmask of options that affects how indexing isperformed. This should be a bitwise OR of the CXIndexOpt_XXX flags.

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

Returns 0 on success or if there were errors from which the compiler couldrecover. If there is a failure from which there is no recovery, returnsa non-zero CXErrorCode.

The rest of the parameters are the same as #clang_parseTranslationUnit.

func (IndexAction)IndexSourceFileFullArgv

func (iaIndexAction) IndexSourceFileFullArgv(clientDataClientData, indexCallbacks *IndexerCallbacks, indexCallbacksSizeuint32, indexOptionsuint32, sourceFilenamestring, commandLineArgs []string, unsavedFiles []UnsavedFile, outTU *TranslationUnit, tUOptionsuint32)int32

Same as clang_indexSourceFile but requires a full command line for command_line_args including argv[0]. This is useful if the standard library paths are relative to the binary.

func (IndexAction)IndexTranslationUnit

func (iaIndexAction) IndexTranslationUnit(clientDataClientData, indexCallbacks *IndexerCallbacks, indexCallbacksSizeuint32, indexOptionsuint32, tuTranslationUnit)int32

Index the given translation unit via callbacks implemented through#IndexerCallbacks.

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

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

The parameters are the same as #clang_indexSourceFile.

Returns If there is a failure from which there is no recovery, returnsnon-zero, otherwise returns 0.

typeIndexOptFlags

type IndexOptFlagsuint32

func (IndexOptFlags)Spelling

func (iofIndexOptFlags) Spelling()string

func (IndexOptFlags)String

func (iofIndexOptFlags) String()string

typeIndexerCallbacks

type IndexerCallbacks struct {// contains filtered or unexported fields}

A group of callbacks used by #clang_indexSourceFile and #clang_indexTranslationUnit.

typeLanguageKind

type LanguageKinduint32

Describe the "language" of the entity referred to by a cursor.

func (LanguageKind)Spelling

func (lkLanguageKind) Spelling()string

func (LanguageKind)String

func (lkLanguageKind) String()string

typeLinkageKind

type LinkageKinduint32

Describe the linkage of the entity referred to by a cursor.

func (LinkageKind)Spelling

func (lkLinkageKind) Spelling()string

func (LinkageKind)String

func (lkLinkageKind) String()string

typeLoadDiag_Error

type LoadDiag_Errorint32

Describes the kind of error that occurred (if any) in a call to clang_loadDiagnostics.

func (LoadDiag_Error)Error

func (ldeLoadDiag_Error) Error()string

func (LoadDiag_Error)Spelling

func (ldeLoadDiag_Error) Spelling()string

func (LoadDiag_Error)String

func (ldeLoadDiag_Error) String()string

typeModule

type Module struct {// contains filtered or unexported fields}

func (Module)ASTFile

func (mModule) ASTFile()File

Parameter Module a module object.

Returns the module file where the provided module object came from.

func (Module)FullName

func (mModule) FullName()string

Parameter Module a module object.

Returns the full name of the module, e.g. "std.vector".

func (Module)IsSystem

func (mModule) IsSystem()bool

Parameter Module a module object.

Returns non-zero if the module is a system one.

func (Module)Name

func (mModule) Name()string

Parameter Module a module object.

Returns the name of the module, e.g. for the 'std.vector' sub-module itwill return "vector".

func (Module)Parent

func (mModule) Parent()Module

Parameter 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.

typeModuleMapDescriptor

type ModuleMapDescriptor struct {// contains filtered or unexported fields}

Object encapsulating information about a module.map file.

funcNewModuleMapDescriptor

func NewModuleMapDescriptor(optionsuint32)ModuleMapDescriptor

Create a CXModuleMapDescriptor object.Must be disposed with clang_ModuleMapDescriptor_dispose().

Parameter options is reserved, always pass 0.

func (ModuleMapDescriptor)Dispose

func (mmdModuleMapDescriptor) Dispose()

Dispose a CXModuleMapDescriptor object.

func (ModuleMapDescriptor)SetFrameworkModuleName

func (mmdModuleMapDescriptor) SetFrameworkModuleName(namestring)ErrorCode

Sets the framework module name that the module.map describes. Returns 0 for success, non-zero to indicate an error.

func (ModuleMapDescriptor)SetUmbrellaHeader

func (mmdModuleMapDescriptor) SetUmbrellaHeader(namestring)ErrorCode

Sets the umbrella header name that the module.map describes. Returns 0 for success, non-zero to indicate an error.

func (ModuleMapDescriptor)WriteToBuffer

func (mmdModuleMapDescriptor) WriteToBuffer(optionsuint32) (string,uint32,ErrorCode)

Write out the CXModuleMapDescriptor object to a char buffer.

Parameter options is reserved, always pass 0.Parameter out_buffer_ptr pointer to receive the buffer pointer, which should bedisposed using clang_free().Parameter out_buffer_size pointer to receive the buffer size.Returns 0 for success, non-zero to indicate an error.

typeNameRefFlags

type NameRefFlagsuint32

func (NameRefFlags)Spelling

func (nrfNameRefFlags) Spelling()string

func (NameRefFlags)String

func (nrfNameRefFlags) String()string

typePlatformAvailability

type PlatformAvailability struct {// contains filtered or unexported fields}

Describes the availability of a given entity on a particular platform, e.g., a particular class might only be available on Mac OS 10.7 or newer.

func (PlatformAvailability)Deprecated

func (paPlatformAvailability) Deprecated()Version

The version number in which this entity was deprecated (but is still available).

func (PlatformAvailability)Dispose

func (paPlatformAvailability) Dispose()

Free the memory associated with a CXPlatformAvailability structure.

func (PlatformAvailability)Introduced

func (paPlatformAvailability) Introduced()Version

The version number in which this entity was introduced.

func (PlatformAvailability)Message

func (paPlatformAvailability) Message()string

An optional message to provide to a user of this API, e.g., to suggest replacement APIs.

func (PlatformAvailability)Obsoleted

func (paPlatformAvailability) Obsoleted()Version

The version number in which this entity was obsoleted, and therefore is no longer available.

func (PlatformAvailability)Platform

func (paPlatformAvailability) Platform()string

A string that describes the platform for which this structureprovides availability information.

Possible values are "ios" or "macos".

func (PlatformAvailability)Unavailable

func (paPlatformAvailability) Unavailable()int32

Whether the entity is unconditionally unavailable on this platform.

typePrintingPolicy

type PrintingPolicy struct {// contains filtered or unexported fields}

Opaque pointer representing a policy that controls pretty printing for clang_getCursorPrettyPrinted.

func (PrintingPolicy)Dispose

func (ppPrintingPolicy) Dispose()

Release a printing policy.

func (PrintingPolicy)Property

func (ppPrintingPolicy) Property(propertyPrintingPolicyProperty)uint32

Get a property value for the given printing policy.

func (PrintingPolicy)SetProperty

func (ppPrintingPolicy) SetProperty(propertyPrintingPolicyProperty, valueuint32)

Set a property value for the given printing policy.

typePrintingPolicyProperty

type PrintingPolicyPropertyuint32

Properties for the printing policy.

See clang::PrintingPolicy for more information.

func (PrintingPolicyProperty)Spelling

func (pppPrintingPolicyProperty) Spelling()string

func (PrintingPolicyProperty)String

func (pppPrintingPolicyProperty) String()string

typePropertyAttrKind

type PropertyAttrKinduint32

Property attributes for a CXCursor_ObjCPropertyDecl.

func (PropertyAttrKind)Spelling

func (pakPropertyAttrKind) Spelling()string

func (PropertyAttrKind)String

func (pakPropertyAttrKind) String()string

typeRefQualifierKind

type RefQualifierKinduint32

func (RefQualifierKind)Spelling

func (rqkRefQualifierKind) Spelling()string

func (RefQualifierKind)String

func (rqkRefQualifierKind) String()string

typeRemapping

type Remapping struct {// contains filtered or unexported fields}

A remapping of original source files and their translated files.

funcNewRemappings

func NewRemappings(pathstring)Remapping

Retrieve a remapping.

Parameter path the path that contains metadata about remappings.

Returns the requested remapping. This remapping must be freedvia a call to clang_remap_dispose(). Can return NULL if an error occurred.

funcNewRemappingsFromFileList

func NewRemappingsFromFileList(filePaths []string)Remapping

Retrieve a remapping.

Parameter filePaths pointer to an array of file paths containing remapping info.

Parameter numFiles number of file paths.

Returns the requested remapping. This remapping must be freedvia a call to clang_remap_dispose(). Can return NULL if an error occurred.

func (Remapping)Dispose

func (rRemapping) Dispose()

Dispose the remapping.

func (Remapping)Filenames

func (rRemapping) Filenames(indexuint32) (string,string)

Get the original and the associated filename from the remapping.

Parameter original If non-NULL, will be set to the original filename.

Parameter transformed If non-NULL, will be set to the filename that the originalis associated with.

func (Remapping)NumFiles

func (rRemapping) NumFiles()uint32

Determine the number of remappings.

typeReparse_Flags

type Reparse_Flagsuint32

Flags that control the reparsing of translation units.

The enumerators in this enumeration type are meant to be bitwiseORed together to specify which options should be used whenreparsing the translation unit.

const (// Used to indicate that no special reparsing options are needed.Reparse_NoneReparse_Flags =C.CXReparse_None)

func (Reparse_Flags)Spelling

func (rfReparse_Flags) Spelling()string

func (Reparse_Flags)String

func (rfReparse_Flags) String()string

typeResult

type Resultuint32

func (Result)Spelling

func (rResult) Spelling()string

func (Result)String

func (rResult) String()string

typeRewriter

type Rewriter struct {// contains filtered or unexported fields}

func (Rewriter)CXRewriter_Dispose

func (rRewriter) CXRewriter_Dispose()

Free the given CXRewriter.

func (Rewriter)InsertTextBefore

func (rRewriter) InsertTextBefore(locSourceLocation, insertstring)

Insert the specified string at the specified location in the original buffer.

func (Rewriter)OverwriteChangedFiles

func (rRewriter) OverwriteChangedFiles()int32

Save all changed files to disk. Returns 1 if any files were not saved successfully, returns 0 otherwise.

func (Rewriter)RemoveText

func (rRewriter) RemoveText(toBeRemovedSourceRange)

Remove the specified range.

func (Rewriter)ReplaceText

func (rRewriter) ReplaceText(toBeReplacedSourceRange, replacementstring)

Replace the specified range of characters in the input with the specified replacement.

func (Rewriter)WriteMainFileToStdOut

func (rRewriter) WriteMainFileToStdOut()

Write out rewritten version of the main file to stdout.

typeSaveError

type SaveErrorint32

Describes the kind of error that occurred (if any) in a call to clang_saveTranslationUnit().

func (SaveError)Error

func (seSaveError) Error()string

func (SaveError)Spelling

func (seSaveError) Spelling()string

func (SaveError)String

func (seSaveError) String()string

typeSaveTranslationUnit_Flags

type SaveTranslationUnit_Flagsuint32

Flags that control how translation units are saved.

The enumerators in this enumeration type are meant to be bitwiseORed together to specify which options should be used whensaving the translation unit.

const (// Used to indicate that no special saving options are needed.SaveTranslationUnit_NoneSaveTranslationUnit_Flags =C.CXSaveTranslationUnit_None)

func (SaveTranslationUnit_Flags)Spelling

func (stufSaveTranslationUnit_Flags) Spelling()string

func (SaveTranslationUnit_Flags)String

typeSourceLocation

type SourceLocation struct {// contains filtered or unexported fields}

Identifies a specific source location within a translationunit.

Use clang_getExpansionLocation() or clang_getSpellingLocation()to map a source location to a particular file, line, and column.

funcNewNullLocation

func NewNullLocation()SourceLocation

Retrieve a NULL (invalid) source location.

func (SourceLocation)Equal

Determine whether two source locations, which must refer intothe same translation unit, refer to exactly the same point in the sourcecode.

Returns non-zero if the source locations refer to the same location, zeroif they refer to different locations.

func (SourceLocation)ExpansionLocation

func (slSourceLocation) ExpansionLocation() (File,uint32,uint32,uint32)

Retrieve the file, line, column, and offset represented bythe given source location.

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

Parameter location the location within a source file that will be decomposedinto its parts.

Parameter file [out] if non-NULL, will be set to the file to which the givensource location points.

Parameter line [out] if non-NULL, will be set to the line to which the givensource location points.

Parameter column [out] if non-NULL, will be set to the column to which the givensource location points.

Parameter offset [out] if non-NULL, will be set to the offset into thebuffer to which the given source location points.

func (SourceLocation)FileLocation

func (slSourceLocation) FileLocation() (File,uint32,uint32,uint32)

Retrieve the file, line, column, and offset represented bythe given source location.

If the location refers into a macro expansion, return where the macro wasexpanded or where the macro argument was written, if the location points ata macro argument.

Parameter location the location within a source file that will be decomposedinto its parts.

Parameter file [out] if non-NULL, will be set to the file to which the givensource location points.

Parameter line [out] if non-NULL, will be set to the line to which the givensource location points.

Parameter column [out] if non-NULL, will be set to the column to which the givensource location points.

Parameter offset [out] if non-NULL, will be set to the offset into thebuffer to which the given source location points.

func (SourceLocation)InstantiationLocation

func (slSourceLocation) InstantiationLocation() (File,uint32,uint32,uint32)

Legacy API to retrieve the file, line, column, and offset representedby the given source location.

This interface has been replaced by the newer interface#clang_getExpansionLocation(). See that interface's documentation fordetails.

func (SourceLocation)IsFromMainFile

func (slSourceLocation) IsFromMainFile()bool

Returns non-zero if the given source location is in the main file of the corresponding translation unit.

func (SourceLocation)IsInSystemHeader

func (slSourceLocation) IsInSystemHeader()bool

Returns non-zero if the given source location is in a system header.

func (SourceLocation)PresumedLocation

func (slSourceLocation) PresumedLocation() (string,uint32,uint32)

Retrieve the file, line and column represented by the given sourcelocation, as specified in a # line directive.

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

\code#123 "dummy.c" 1

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

the location information returned by this function would be

File: dummy.c Line: 124 Column: 12

whereas clang_getExpansionLocation would have returned

File: somefile.c Line: 3 Column: 12

Parameter location the location within a source file that will be decomposedinto its parts.

Parameter filename [out] if non-NULL, will be set to the filename of thesource location. Note that filenames returned will be for "virtual" files,which don't necessarily exist on the machine running clang - e.g. whenparsing preprocessed output obtained from a different environment. Ifa non-NULL value is passed in, remember to dispose of the returned valueusing clang_disposeString() once you've finished with it. For an invalidsource location, an empty string is returned.

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

Parameter column [out] if non-NULL, will be set to the column number of thesource location. For an invalid source location, zero is returned.

func (SourceLocation)Range

Retrieve a source range given the beginning and ending source locations.

func (SourceLocation)SpellingLocation

func (slSourceLocation) SpellingLocation() (File,uint32,uint32,uint32)

Retrieve the file, line, column, and offset represented bythe given source location.

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

Parameter location the location within a source file that will be decomposedinto its parts.

Parameter file [out] if non-NULL, will be set to the file to which the givensource location points.

Parameter line [out] if non-NULL, will be set to the line to which the givensource location points.

Parameter column [out] if non-NULL, will be set to the column to which the givensource location points.

Parameter offset [out] if non-NULL, will be set to the offset into thebuffer to which the given source location points.

typeSourceRange

type SourceRange struct {// contains filtered or unexported fields}

Identifies a half-open character range in the source code.

Use clang_getRangeStart() and clang_getRangeEnd() to retrieve thestarting and end locations from a source range, respectively.

funcNewNullRange

func NewNullRange()SourceRange

Retrieve a NULL (invalid) source range.

func (SourceRange)End

Retrieve a source location representing the last character within a source range.

func (SourceRange)Equal

func (srSourceRange) Equal(sr2SourceRange)bool

Determine whether two ranges are equivalent.

Returns non-zero if the ranges are the same, zero if they differ.

func (SourceRange)IsNull

func (srSourceRange) IsNull()bool

Returns non-zero if \p range is null.

func (SourceRange)Start

func (srSourceRange) Start()SourceLocation

Retrieve a source location representing the first character within a source range.

typeSourceRangeList

type SourceRangeList struct {// contains filtered or unexported fields}

Identifies an array of ranges.

func (SourceRangeList)Count

func (srlSourceRangeList) Count()uint32

The number of ranges in the ranges array.

func (SourceRangeList)Ranges

func (srlSourceRangeList) Ranges() []SourceRange

An array of CXSourceRanges.

typeStorageClass

type StorageClassuint32

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.

func (StorageClass)Spelling

func (scStorageClass) Spelling()string

func (StorageClass)String

func (scStorageClass) String()string

typeString

type String struct {// contains filtered or unexported fields}

A character string.

The CXString type is used to return strings from the interface whenthe ownership of that string might differ from one call to the next.Use clang_getCString() to retrieve the string data and, once finishedwith the string data, call clang_disposeString() to free the string.

func (String)Private_flags

func (sString) Private_flags()uint32

typeStringSet

type StringSet struct {// contains filtered or unexported fields}

func (StringSet)Count

func (ssStringSet) Count()uint32

func (StringSet)Strings

func (ssStringSet) Strings() []cxstring

typeSymbolRole

type SymbolRoleuint32

Roles that are attributed to symbol occurrences.

Internal: this currently mirrors low 9 bits of clang::index::SymbolRole withhigher bits zeroed. These high bits may be exposed in the future.

func (SymbolRole)Spelling

func (srSymbolRole) Spelling()string

func (SymbolRole)String

func (srSymbolRole) String()string

typeTLSKind

type TLSKinduint32

Describe the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.

func (TLSKind)Spelling

func (tlskTLSKind) Spelling()string

func (TLSKind)String

func (tlskTLSKind) String()string

typeTUResourceUsage

type TUResourceUsage struct {// contains filtered or unexported fields}

The memory usage of a CXTranslationUnit, broken into categories.

func (TUResourceUsage)Dispose

func (turuTUResourceUsage) Dispose()

func (TUResourceUsage)Entries

func (turuTUResourceUsage) Entries() []TUResourceUsageEntry

func (TUResourceUsage)NumEntries

func (turuTUResourceUsage) NumEntries()uint32

typeTUResourceUsageEntry

type TUResourceUsageEntry struct {// contains filtered or unexported fields}

func (TUResourceUsageEntry)Amount

func (turueTUResourceUsageEntry) Amount()uint64

func (TUResourceUsageEntry)Kind

typeTUResourceUsageKind

type TUResourceUsageKinduint32

Categorizes how memory is being used by a translation unit.

func (TUResourceUsageKind)Name

func (turukTUResourceUsageKind) Name()string

Returns the human-readable null-terminated C string that represents the name of the memory category. This string should never be freed.

func (TUResourceUsageKind)Spelling

func (turukTUResourceUsageKind) Spelling()string

func (TUResourceUsageKind)String

func (turukTUResourceUsageKind) String()string

typeTargetInfo

type TargetInfo struct {// contains filtered or unexported fields}

An opaque type representing target information for a given translation unit.

func (TargetInfo)Dispose

func (tiTargetInfo) Dispose()

Destroy the CXTargetInfo object.

func (TargetInfo)PointerWidth

func (tiTargetInfo) PointerWidth()int32

Get the pointer width of the target in bits.

Returns -1 in case of error.

func (TargetInfo)Triple

func (tiTargetInfo) Triple()string

Get the normalized target triple as a string.

Returns the empty string in case of any error.

typeTemplateArgumentKind

type TemplateArgumentKinduint32

Describes the kind of a template argument.

See the definition of llvm::clang::TemplateArgument::ArgKind for fullelement descriptions.

func (TemplateArgumentKind)Spelling

func (takTemplateArgumentKind) Spelling()string

func (TemplateArgumentKind)String

func (takTemplateArgumentKind) String()string

typeToken

type Token struct {// contains filtered or unexported fields}

Describes a single preprocessing token.

func (Token)Kind

func (tToken) Kind()TokenKind

Determine the kind of the given token.

typeTokenKind

type TokenKinduint32

Describes a kind of token.

func (TokenKind)Spelling

func (tkTokenKind) Spelling()string

func (TokenKind)String

func (tkTokenKind) String()string

typeTranslationUnit

type TranslationUnit struct {// contains filtered or unexported fields}

A single translation unit, which resides in an index.

func (TranslationUnit)AllSkippedRanges

func (tuTranslationUnit) AllSkippedRanges() *SourceRangeList

Retrieve all ranges from all files that were skipped by thepreprocessor.

The preprocessor will skip lines when they are surrounded by anif/ifdef/ifndef directive whose condition does not evaluate to true.

func (TranslationUnit)AnnotateTokens

func (tuTranslationUnit) AnnotateTokens(Tokens []Token) []Cursor

AnnotateTokens is the annotate the given set of tokens by providing cursors for each tokenthat can be mapped to a specific entity within the abstract syntax tree.

This token-annotation routine is equivalent to invoking Cursor() for the source locations of each of thetokens.The cursors provided are filtered, so that only those cursors that have a direct correspondence to the token areaccepted.For example, given a function call \c f(x), Cursor() 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 functionand a variable, respectively, but the parentheses are just a small part of the full syntax of the function call expression, which isnot provided as an annotation.

Tokens is the set of tokens to annotate.

Returns Cursors an array of NumTokens cursors, whose contents will be replaced with the cursors corresponding to each token.

func (TranslationUnit)CodeCompleteAt

func (tuTranslationUnit) CodeCompleteAt(completeFilenamestring, completeLineuint32, completeColumnuint32, unsavedFiles []UnsavedFile, optionsuint32) *CodeCompleteResults

Perform code completion at a given location in a translation unit.

This function performs code completion at a particular file, line, andcolumn within source code, providing results that suggest potentialcode snippets based on the context of the completion. The basic modelfor code completion is that Clang will parse a complete source file,performing syntax checking up to the location where code-completion hasbeen requested. At that point, a special code-completion token is passedto the parser, which recognizes this token and determines, based on thecurrent location in the C/Objective-C/C++ grammar and the state ofsemantic analysis, what completions to provide. These completions arereturned via a new CXCodeCompleteResults structure.

Code completion itself is meant to be triggered by the client when theuser types punctuation characters or whitespace, at which point thecode-completion location will coincide with the cursor. For example, if pis a pointer, code-completion might be triggered after the "-" and thenafter the ">" in p->. When the code-completion location is after the ">",the completion results will provide, e.g., the members of the struct that"p" points to. The client is responsible for placing the cursor at thebeginning of the token currently being typed, then filtering the resultsbased on the contents of the token. For example, when code-completing forthe expression p->get, the client should provide the location just afterthe ">" (e.g., pointing at the "g") to this code-completion hook. Then, theclient can filter the results based on the current token text ("get"), onlyshowing those results that start with "get". The intent of this interfaceis to separate the relatively high-latency acquisition of code-completionresults from the filtering of results on a per-character basis, which musthave a lower latency.

Parameter TU The translation unit in which code-completion shouldoccur. The source files for this translation unit need not becompletely up-to-date (and the contents of those source files maybe overridden via \p unsaved_files). Cursors referring into thetranslation unit may be invalidated by this invocation.

Parameter complete_filename The name of the source file where codecompletion should be performed. This filename may be any fileincluded in the translation unit.

Parameter complete_line The line at which code-completion should occur.

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

Parameter unsaved_files the Files that have not yet been saved to diskbut may be required for parsing or code completion, including thecontents of those files. The contents and name of these files (asspecified by CXUnsavedFile) are copied when necessary, so theclient only needs to guarantee their validity until the call tothis function returns.

Parameter num_unsaved_files The number of unsaved file entries in \punsaved_files.

Parameter options Extra options that control the behavior of codecompletion, expressed as a bitwise OR of the enumerators of theCXCodeComplete_Flags enumeration. Theclang_defaultCodeCompleteOptions() function returns a default setof code-completion options.

Returns If successful, a new CXCodeCompleteResults structurecontaining code-completion results, which should eventually befreed with clang_disposeCodeCompleteResults(). If codecompletion fails, returns NULL.

func (TranslationUnit)Create

func (tuTranslationUnit) Create()Rewriter

Create CXRewriter.

func (TranslationUnit)Cursor

Map a source location to the cursor that describes the entity at thatlocation in the source code.

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

Returns a cursor representing the entity at the given source location, ora NULL cursor if no such entity can be found.

func (TranslationUnit)DefaultReparseOptions

func (tuTranslationUnit) DefaultReparseOptions()uint32

Returns the set of flags that is suitable for reparsing a translationunit.

The set of flags returned provide options forclang_reparseTranslationUnit() by default. The returned flagset contains an unspecified set of optimizations geared toward common usesof reparsing. The set of optimizations enabled may change from one versionto the next.

func (TranslationUnit)DefaultSaveOptions

func (tuTranslationUnit) DefaultSaveOptions()uint32

Returns the set of flags that is suitable for saving a translationunit.

The set of flags returned provide options forclang_saveTranslationUnit() by default. The returned flagset contains an unspecified set of options that save translation units withthe most commonly-requested data.

func (TranslationUnit)Diagnostic

func (tuTranslationUnit) Diagnostic(indexuint32)Diagnostic

Retrieve a diagnostic associated with the given translation unit.

Parameter Unit the translation unit to query.Parameter Index the zero-based diagnostic number to retrieve.

Returns the requested diagnostic. This diagnostic must be freedvia a call to clang_disposeDiagnostic().

func (TranslationUnit)DiagnosticSetFromTU

func (tuTranslationUnit) DiagnosticSetFromTU()DiagnosticSet

Retrieve the complete set of diagnostics associated with atranslation unit.

Parameter Unit the translation unit to query.

func (TranslationUnit)Diagnostics

func (tuTranslationUnit) Diagnostics() []Diagnostic

Diagnostics determine the number of diagnostics produced prior to thelocation where code completion was performed.

func (TranslationUnit)Dispose

func (tuTranslationUnit) Dispose()

Destroy the specified CXTranslationUnit object.

func (TranslationUnit)DisposeTokens

func (tuTranslationUnit) DisposeTokens(tokens []Token)

Free the given set of tokens.

func (TranslationUnit)File

func (tuTranslationUnit) File(fileNamestring)File

Retrieve a file handle within the given translation unit.

Parameter tu the translation unit

Parameter file_name the name of the file.

Returns the file handle for the named file in the translation unit \p tu,or a NULL file handle if the file was not a part of this translation unit.

func (TranslationUnit)FindIncludesInFile

func (tuTranslationUnit) FindIncludesInFile(fileFile, visitorCursorAndRangeVisitor)Result

Find #import/#include directives in a specific file.

Parameter TU translation unit containing the file to query.

Parameter file to search for #import/#include directives.

Parameter visitor callback that will receive pairs of CXCursor/CXSourceRange foreach directive found.

Returns one of the CXResult enumerators.

func (TranslationUnit)IsFileMultipleIncludeGuarded

func (tuTranslationUnit) IsFileMultipleIncludeGuarded(fileFile)bool

Determine whether the given header is guarded against multiple inclusions, either with the conventional \#ifndef/\#define/\#endif macro guards or with \#pragma once.

func (TranslationUnit)IsValid

func (tuTranslationUnit) IsValid()bool

IsValid reports whether the tu is valid.

func (TranslationUnit)Location

func (tuTranslationUnit) Location(fileFile, lineuint32, columnuint32)SourceLocation

Retrieves the source location associated with a given file/line/column in a particular translation unit.

func (TranslationUnit)LocationForOffset

func (tuTranslationUnit) LocationForOffset(fileFile, offsetuint32)SourceLocation

Retrieves the source location associated with a given character offset in a particular translation unit.

func (TranslationUnit)ModuleForFile

func (tuTranslationUnit) ModuleForFile(fFile)Module

Given a CXFile header file, return the module that contains it, if one exists.

func (TranslationUnit)Module_getNumTopLevelHeaders

func (tuTranslationUnit) Module_getNumTopLevelHeaders(moduleModule)uint32

Parameter Module a module object.

Returns the number of top level headers associated with this module.

func (TranslationUnit)Module_getTopLevelHeader

func (tuTranslationUnit) Module_getTopLevelHeader(moduleModule, indexuint32)File

Parameter Module a module object.

Parameter Index top level header index (zero-based).

Returns the specified top level header associated with the module.

func (TranslationUnit)NumDiagnostics

func (tuTranslationUnit) NumDiagnostics()uint32

Determine the number of diagnostics produced for the given translation unit.

func (TranslationUnit)ReparseTranslationUnit

func (tuTranslationUnit) ReparseTranslationUnit(unsavedFiles []UnsavedFile, optionsuint32)int32

Reparse the source files that produced this translation unit.

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

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

Parameter TU The translation unit whose contents will be re-parsed. Thetranslation unit must originally have been built withclang_createTranslationUnitFromSourceFile().

Parameter num_unsaved_files The number of unsaved file entries in \punsaved_files.

Parameter unsaved_files The files that have not yet been saved to diskbut may be required for parsing, including the contents ofthose files. The contents and name of these files (as specified byCXUnsavedFile) are copied when necessary, so the client only needs toguarantee their validity until the call to this function returns.

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

Returns 0 if the sources could be reparsed. A non-zero error code will bereturned if reparsing was impossible, such that the translation unit isinvalid. In such cases, the only valid call for TU isclang_disposeTranslationUnit(TU). The error codes returned by thisroutine are described by the CXErrorCode enum.

func (TranslationUnit)SaveTranslationUnit

func (tuTranslationUnit) SaveTranslationUnit(fileNamestring, optionsuint32)int32

Saves a translation unit into a serialized representation ofthat translation unit on disk.

Any translation unit that was parsed without error can be savedinto a file. The translation unit can then be deserialized into anew CXTranslationUnit with clang_createTranslationUnit() or,if it is an incomplete translation unit that corresponds to aheader, used as a precompiled header when parsing other translationunits.

Parameter TU The translation unit to save.

Parameter FileName The file to which the translation unit will be saved.

Parameter options A bitmask of options that affects how the translation unitis saved. This should be a bitwise OR of theCXSaveTranslationUnit_XXX flags.

Returns A value that will match one of the enumerators of the CXSaveErrorenumeration. Zero (CXSaveError_None) indicates that the translation unit wassaved successfully, while a non-zero value indicates that a problem occurred.

func (TranslationUnit)SkippedRanges

func (tuTranslationUnit) SkippedRanges(fileFile) *SourceRangeList

Retrieve all ranges that were skipped by the preprocessor.

The preprocessor will skip lines when they are surrounded by anif/ifdef/ifndef directive whose condition does not evaluate to true.

func (TranslationUnit)Spelling

func (tuTranslationUnit) Spelling()string

Get the original translation unit source file name.

func (TranslationUnit)SuspendTranslationUnit

func (tuTranslationUnit) SuspendTranslationUnit()uint32

Suspend a translation unit in order to free memory associated with it.

A suspended translation unit uses significantly less memory but on the otherside does not support any other calls than clang_reparseTranslationUnitto resume it or clang_disposeTranslationUnit to dispose it completely.

func (TranslationUnit)TUResourceUsage

func (tuTranslationUnit) TUResourceUsage()TUResourceUsage

Return the memory usage of a translation unit. This object should be released with clang_disposeCXTUResourceUsage().

func (TranslationUnit)TargetInfo

func (tuTranslationUnit) TargetInfo()TargetInfo

Get target information for this translation unit.

The CXTargetInfo object cannot outlive the CXTranslationUnit object.

func (TranslationUnit)Token

func (tuTranslationUnit) Token(locationSourceLocation) *Token

Get the raw lexical token starting with the given location.

Parameter TU the translation unit whose text is being tokenized.

Parameter Location the source location with which the token starts.

Returns The token starting with the given location or NULL if no such tokenexist. The returned pointer must be freed with clang_disposeTokens before thetranslation unit is destroyed.

func (TranslationUnit)TokenExtent

func (tuTranslationUnit) TokenExtent(tToken)SourceRange

Retrieve a source range that covers the given token.

func (TranslationUnit)TokenLocation

func (tuTranslationUnit) TokenLocation(tToken)SourceLocation

Retrieve the source location of the given token.

func (TranslationUnit)TokenSpelling

func (tuTranslationUnit) TokenSpelling(tToken)string

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.

func (TranslationUnit)Tokenize

func (tuTranslationUnit) Tokenize(rSourceRange) []Token

Tokenize the source code described by the given range into rawlexical tokens.

Parameter TU the translation unit whose text is being tokenized.

Parameter Range the source range in which text should be tokenized. All of thetokens produced by tokenization will fall within this source range,

Parameter Tokens this pointer will be set to point to the array of tokensthat occur within the given source range. The returned pointer must befreed with clang_disposeTokens() before the translation unit is destroyed.

Parameter NumTokens will be set to the number of tokens in the *Tokensarray.

func (TranslationUnit)TranslationUnitCursor

func (tuTranslationUnit) TranslationUnitCursor()Cursor

Retrieve the cursor that represents the given translation unit.

The translation unit cursor can be used to start traversing thevarious declarations within the given translation unit.

typeTranslationUnit_Flags

type TranslationUnit_Flagsuint32

Flags that control the creation of translation units.

The enumerators in this enumeration type are meant to be bitwiseORed together to specify which options should be used whenconstructing the translation unit.

func (TranslationUnit_Flags)Spelling

func (tufTranslationUnit_Flags) Spelling()string

func (TranslationUnit_Flags)String

func (tufTranslationUnit_Flags) String()string

typeType

type Type struct {// contains filtered or unexported fields}

The type of an element in the abstract syntax tree.

func (Type)AddressSpace

func (tType) AddressSpace()uint32

Returns the address space of the given type.

func (Type)AlignOf

func (tType) AlignOf()int64

Return the alignment of a type in bytes as per C++[expr.alignof]standard.

If the type declaration is invalid, CXTypeLayoutError_Invalid is returned.If the type declaration is an incomplete type, CXTypeLayoutError_Incompleteis returned.If the type declaration is a dependent type, CXTypeLayoutError_Dependent isreturned.If the type declaration is not a constant size type,CXTypeLayoutError_NotConstantSize is returned.

func (Type)ArgType

func (tType) ArgType(iuint32)Type

Retrieve the type of a parameter of a function type.

If a non-function type is passed in or the function does not have enoughparameters, an invalid type is returned.

func (Type)ArrayElementType

func (tType) ArrayElementType()Type

Return the element type of an array type.

If a non-array type is passed in, an invalid type is returned.

func (Type)ArraySize

func (tType) ArraySize()int64

Return the array size of a constant array.

If a non-array type is passed in, -1 is returned.

func (Type)CanonicalType

func (tType) CanonicalType()Type

Return the canonical type for a CXType.

Clang's type system explicitly models typedefs and all the waysa specific type can be represented. The canonical type is the underlyingtype with all the "sugar" removed. For example, if 'T' is a typedeffor 'int', the canonical type for 'T' would be 'int'.

func (Type)ClassType

func (tType) ClassType()Type

Return the class type of an member pointer type.

If a non-member-pointer type is passed in, an invalid type is returned.

func (Type)Declaration

func (tType) Declaration()Cursor

Return the cursor for the declaration of the given type.

func (Type)DefName

func (tType) DefName()string

Returns the typedef name of the given type.

func (Type)ElementType

func (tType) ElementType()Type

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.

func (Type)Encoding

func (tType) Encoding()string

Returns the Objective-C type encoding for the specified CXType.

func (Type)Equal

func (tType) Equal(t2Type)bool

Determine whether two CXTypes represent the same type.

Returns non-zero if the CXTypes represent the same type andzero otherwise.

func (Type)ExceptionSpecificationType

func (tType) ExceptionSpecificationType()int32

Retrieve the exception specification type associated with a function type.This is a value of type CXCursor_ExceptionSpecificationKind.

If a non-function type is passed in, an error code of -1 is returned.

func (Type)FunctionTypeCallingConv

func (tType) FunctionTypeCallingConv()CallingConv

Retrieve the calling convention associated with a function type.

If a non-function type is passed in, CXCallingConv_Invalid is returned.

func (Type)IsConstQualifiedType

func (tType) IsConstQualifiedType()bool

Determine whether a CXType has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.

func (Type)IsFunctionTypeVariadic

func (tType) IsFunctionTypeVariadic()bool

Return 1 if the CXType is a variadic function type, and 0 otherwise.

func (Type)IsPODType

func (tType) IsPODType()bool

Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise.

func (Type)IsRestrictQualifiedType

func (tType) IsRestrictQualifiedType()bool

Determine whether a CXType has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.

func (Type)IsTransparentTagTypedef

func (tType) IsTransparentTagTypedef()bool

Determine if a typedef is 'transparent' tag.

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

Returns non-zero if transparent and zero otherwise.

func (Type)IsVolatileQualifiedType

func (tType) IsVolatileQualifiedType()bool

Determine whether a CXType has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.

func (Type)Kind

func (tType) Kind()TypeKind

func (Type)ModifiedType

func (tType) ModifiedType()Type

Return the type that was modified by this attributed type.

If the type is not an attributed type, an invalid type is returned.

func (Type)NamedType

func (tType) NamedType()Type

Retrieve the type named by the qualified-id.

If a non-elaborated type is passed in, an invalid type is returned.

func (Type)Nullability

func (tType) Nullability()TypeNullabilityKind

Retrieve the nullability kind of a pointer type.

func (Type)NumArgTypes

func (tType) NumArgTypes()int32

Retrieve the number of non-variadic parameters associated with afunction type.

If a non-function type is passed in, -1 is returned.

func (Type)NumElements

func (tType) NumElements()int64

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.

func (Type)NumObjCProtocolRefs

func (tType) NumObjCProtocolRefs()uint32

Retrieve the number of protocol references associated with an ObjC object/id.

If the type is not an ObjC object, 0 is returned.

func (Type)NumObjCTypeArgs

func (tType) NumObjCTypeArgs()uint32

Retrieve the number of type arguments associated with an ObjC object.

If the type is not an ObjC object, 0 is returned.

func (Type)NumTemplateArguments

func (tType) NumTemplateArguments()int32

Returns the number of template arguments for given template specialization, or -1 if type T is not a template specialization.

func (Type)ObjectBaseType

func (tType) ObjectBaseType()Type

Retrieves the base type of the ObjCObjectType.

If the type is not an ObjC object, an invalid type is returned.

func (Type)OffsetOf

func (tType) OffsetOf(sstring)int64

Return the offset of a field named S in a record of type T in bitsas it would be returned by __offsetof__ as per C++11[18.2p4]

If the cursor is not a record field declaration, CXTypeLayoutError_Invalidis returned.If the field's type declaration is an incomplete type,CXTypeLayoutError_Incomplete is returned.If the field's type declaration is a dependent type,CXTypeLayoutError_Dependent is returned.If the field's name S is not found,CXTypeLayoutError_InvalidFieldName is returned.

func (Type)PointeeType

func (tType) PointeeType()Type

For pointer types, returns the type of the pointee.

func (Type)ProtocolDecl

func (tType) ProtocolDecl(iuint32)Cursor

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 protocolreferences, an invalid cursor is returned.

func (Type)RefQualifier

func (tType) RefQualifier()RefQualifierKind

Retrieve the ref-qualifier kind of a function or method.

The ref-qualifier is returned for C++ functions or methods. For other typesor non-C++ declarations, CXRefQualifier_None is returned.

func (Type)ResultType

func (tType) ResultType()Type

Retrieve the return type associated with a function type.

If a non-function type is passed in, an invalid type is returned.

func (Type)SizeOf

func (tType) SizeOf()int64

Return the size of a type in bytes as per C++[expr.sizeof] standard.

If the type declaration is invalid, CXTypeLayoutError_Invalid is returned.If the type declaration is an incomplete type, CXTypeLayoutError_Incompleteis returned.If the type declaration is a dependent type, CXTypeLayoutError_Dependent isreturned.

func (Type)Spelling

func (tType) Spelling()string

Pretty-print the underlying type using the rules of thelanguage of the translation unit from which it came.

If the type is invalid, an empty string is returned.

func (Type)TemplateArgumentAsType

func (tType) TemplateArgumentAsType(iuint32)Type

Returns the type template argument of a template class specializationat given index.

This function only returns template type arguments and does not handletemplate template arguments or variadic packs.

func (Type)TypeArg

func (tType) TypeArg(iuint32)Type

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.

func (Type)ValueType

func (tType) ValueType()Type

Gets the type contained by this atomic type.

If a non-atomic type is passed in, an invalid type is returned.

typeTypeKind

type TypeKinduint32

Describes the kind of type

func (TypeKind)Spelling

func (tkTypeKind) Spelling()string

Retrieve the spelling of a given CXTypeKind.

func (TypeKind)String

func (tkTypeKind) String()string

typeTypeLayoutError

type TypeLayoutErrorint32

List the possible error codes for clang_Type_getSizeOf,clang_Type_getAlignOf, clang_Type_getOffsetOf andclang_Cursor_getOffsetOf.

A value of this enumeration type can be returned if the target type is nota valid argument to sizeof, alignof or offsetof.

func (TypeLayoutError)Error

func (tleTypeLayoutError) Error()string

func (TypeLayoutError)Spelling

func (tleTypeLayoutError) Spelling()string

func (TypeLayoutError)String

func (tleTypeLayoutError) String()string

typeTypeNullabilityKind

type TypeNullabilityKinduint32

func (TypeNullabilityKind)Spelling

func (tnkTypeNullabilityKind) Spelling()string

func (TypeNullabilityKind)String

func (tnkTypeNullabilityKind) String()string

typeUnsavedFile

type UnsavedFile struct {// contains filtered or unexported fields}

Provides the contents of a file that has not yet been saved to disk.

Each CXUnsavedFile instance provides the name of a file on thesystem along with the current contents of that file that have notyet been saved to disk.

funcNewUnsavedFile

func NewUnsavedFile(filename, contentsstring)UnsavedFile

NewUnsavedFile returns the new UnsavedFile from filename and contents.

func (UnsavedFile)Contents

func (ufUnsavedFile) Contents()string

A buffer containing the unsaved contents of this file.

func (UnsavedFile)Filename

func (ufUnsavedFile) Filename()string

The file whose contents have not yet been saved.

This file must already exist in the file system.

func (UnsavedFile)Length

func (ufUnsavedFile) Length()uint64

The length of the unsaved contents of this buffer.

typeVersion

type Version struct {// contains filtered or unexported fields}

Describes a version number of the form major.minor.subminor.

func (Version)Major

func (vVersion) Major()int32

The major version number, e.g., the '10' in '10.7.3'. A negative value indicates that there is no version number at all.

func (Version)Minor

func (vVersion) Minor()int32

The minor version number, e.g., the '7' in '10.7.3'. This value will be negative if no minor version number was provided, e.g., for version '10'.

func (Version)Subminor

func (vVersion) Subminor()int32

The subminor version number, e.g., the '3' in '10.7.3'. This value will be negative if no minor or subminor version number was provided, e.g., in version '10' or '10.7'.

typeVirtualFileOverlay

type VirtualFileOverlay struct {// contains filtered or unexported fields}

Object encapsulating information about overlaying virtual file/directories over the real file system.

funcNewVirtualFileOverlay

func NewVirtualFileOverlay(optionsuint32)VirtualFileOverlay

Create a CXVirtualFileOverlay object.Must be disposed with clang_VirtualFileOverlay_dispose().

Parameter options is reserved, always pass 0.

func (VirtualFileOverlay)AddFileMapping

func (vfoVirtualFileOverlay) AddFileMapping(virtualPathstring, realPathstring)ErrorCode

Map an absolute virtual file path to an absolute real one. The virtual path must be canonicalized (not contain "."/".."). Returns 0 for success, non-zero to indicate an error.

func (VirtualFileOverlay)Dispose

func (vfoVirtualFileOverlay) Dispose()

Dispose a CXVirtualFileOverlay object.

func (VirtualFileOverlay)SetCaseSensitivity

func (vfoVirtualFileOverlay) SetCaseSensitivity(caseSensitiveint32)ErrorCode

Set the case sensitivity for the CXVirtualFileOverlay object. The CXVirtualFileOverlay object is case-sensitive by default, this option can be used to override the default. Returns 0 for success, non-zero to indicate an error.

func (VirtualFileOverlay)WriteToBuffer

func (vfoVirtualFileOverlay) WriteToBuffer(optionsuint32) (string,uint32,ErrorCode)

Write out the CXVirtualFileOverlay object to a char buffer.

Parameter options is reserved, always pass 0.Parameter out_buffer_ptr pointer to receive the buffer pointer, which should bedisposed using clang_free().Parameter out_buffer_size pointer to receive the buffer size.Returns 0 for success, non-zero to indicate an error.

typeVisibilityKind

type VisibilityKinduint32

func (VisibilityKind)Spelling

func (vkVisibilityKind) Spelling()string

func (VisibilityKind)String

func (vkVisibilityKind) String()string

typeVisitorResult

type VisitorResultuint32
const (Visit_BreakVisitorResult =C.CXVisit_BreakVisit_Continue               =C.CXVisit_Continue)

func (VisitorResult)Spelling

func (vrVisitorResult) Spelling()string

func (VisitorResult)String

func (vrVisitorResult) String()string

Source Files

View all Source files

Directories

PathSynopsis
Package clang_c holds clang binding C header files.
Package clang_c holds clang binding C header files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp