[clang] [libclang/python] Derive library function types from annotations (PR #142120)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 30 03:59:39 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r HEAD~1...HEAD clang/bindings/python/clang/cindex.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- cindex.py 2025-05-30 10:54:15.000000 +0000
+++ cindex.py 2025-05-30 10:59:10.491593 +0000
@@ -4021,556 +4021,727 @@
return annotation_types
# Functions strictly alphabetical order.
class ClangLib(Protocol):
-
def clang_annotateTokens(
self,
arg1: TranslationUnit,
arg2: _Pointer[Token],
arg3: c_uint,
arg4: _Pointer[Cursor],
- ) -> None: ...
-
- def clang_CompilationDatabase_dispose(self, arg1: _Pointer[c_void_p]) -> None: ...
+ ) -> None:
+ ...
+
+ def clang_CompilationDatabase_dispose(self, arg1: _Pointer[c_void_p]) -> None:
+ ...
def clang_CompilationDatabase_fromDirectory(
self, arg1: c_interop_string, arg2: _Pointer[c_uint]
- ) -> _Pointer[c_void_p]: ...
+ ) -> _Pointer[c_void_p]:
+ ...
def clang_CompilationDatabase_getAllCompileCommands(
self, arg1: _Pointer[c_void_p]
- ) -> _Pointer[c_void_p]: ...
+ ) -> _Pointer[c_void_p]:
+ ...
def clang_CompilationDatabase_getCompileCommands(
self, arg1: _Pointer[c_void_p], arg2: c_interop_string
- ) -> _Pointer[c_void_p]: ...
-
- def clang_CompileCommands_dispose(self, arg1: _Pointer[c_void_p]) -> None: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_CompileCommands_dispose(self, arg1: _Pointer[c_void_p]) -> None:
+ ...
def clang_CompileCommands_getCommand(
self, arg1: _Pointer[c_void_p], arg2: c_uint
- ) -> _Pointer[c_void_p]: ...
-
- def clang_CompileCommands_getSize(self, arg1: _Pointer[c_void_p]) -> c_uint: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_CompileCommands_getSize(self, arg1: _Pointer[c_void_p]) -> c_uint:
+ ...
def clang_CompileCommand_getArg(
self, arg1: _Pointer[c_void_p], arg2: c_uint
- ) -> _CXString: ...
-
- def clang_CompileCommand_getDirectory(
- self, arg1: _Pointer[c_void_p]
- ) -> _CXString: ...
-
- def clang_CompileCommand_getFilename(
- self, arg1: _Pointer[c_void_p]
- ) -> _CXString: ...
-
- def clang_CompileCommand_getNumArgs(self, arg1: _Pointer[c_void_p]) -> c_uint: ...
+ ) -> _CXString:
+ ...
+
+ def clang_CompileCommand_getDirectory(self, arg1: _Pointer[c_void_p]) -> _CXString:
+ ...
+
+ def clang_CompileCommand_getFilename(self, arg1: _Pointer[c_void_p]) -> _CXString:
+ ...
+
+ def clang_CompileCommand_getNumArgs(self, arg1: _Pointer[c_void_p]) -> c_uint:
+ ...
def clang_codeCompleteAt(
self,
arg1: TranslationUnit,
arg2: c_interop_string,
arg3: c_int,
arg4: c_int,
arg5: c_void_p,
arg6: c_int,
arg7: c_int,
- ) -> _Pointer[CCRStructure]: ...
+ ) -> _Pointer[CCRStructure]:
+ ...
def clang_codeCompleteGetDiagnostic(
self, arg1: CodeCompletionResults, arg2: c_int
- ) -> Diagnostic: ...
-
- def clang_codeCompleteGetNumDiagnostics(
- self, arg1: CodeCompletionResults
- ) -> c_int: ...
-
- def clang_createIndex(self, arg1: c_int, arg2: c_int) -> _Pointer[c_void_p]: ...
+ ) -> Diagnostic:
+ ...
+
+ def clang_codeCompleteGetNumDiagnostics(self, arg1: CodeCompletionResults) -> c_int:
+ ...
+
+ def clang_createIndex(self, arg1: c_int, arg2: c_int) -> _Pointer[c_void_p]:
+ ...
def clang_createTranslationUnit(
self, arg1: Index, arg2: c_interop_string
- ) -> _Pointer[c_void_p]: ...
-
- def clang_CXRewriter_create(self, arg1: TranslationUnit) -> _Pointer[c_void_p]: ...
-
- def clang_CXRewriter_dispose(self, arg1: Rewriter) -> None: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_CXRewriter_create(self, arg1: TranslationUnit) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_CXRewriter_dispose(self, arg1: Rewriter) -> None:
+ ...
def clang_CXRewriter_insertTextBefore(
self, arg1: Rewriter, arg2: SourceLocation, arg3: c_interop_string
- ) -> None: ...
-
- def clang_CXRewriter_overwriteChangedFiles(self, arg1: Rewriter) -> c_int: ...
-
- def clang_CXRewriter_removeText(
- self, arg1: Rewriter, arg2: SourceRange
- ) -> None: ...
+ ) -> None:
+ ...
+
+ def clang_CXRewriter_overwriteChangedFiles(self, arg1: Rewriter) -> c_int:
+ ...
+
+ def clang_CXRewriter_removeText(self, arg1: Rewriter, arg2: SourceRange) -> None:
+ ...
def clang_CXRewriter_replaceText(
self, arg1: Rewriter, arg2: SourceRange, arg3: c_interop_string
- ) -> None: ...
-
- def clang_CXRewriter_writeMainFileToStdOut(self, arg1: Rewriter) -> None: ...
-
- def clang_CXXConstructor_isConvertingConstructor(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXConstructor_isCopyConstructor(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXConstructor_isDefaultConstructor(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXConstructor_isMoveConstructor(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXField_isMutable(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isConst(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isDefaulted(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isDeleted(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isCopyAssignmentOperator(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isMoveAssignmentOperator(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isExplicit(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isPureVirtual(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isStatic(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXMethod_isVirtual(self, arg1: Cursor) -> bool: ...
-
- def clang_CXXRecord_isAbstract(self, arg1: Cursor) -> bool: ...
-
- def clang_EnumDecl_isScoped(self, arg1: Cursor) -> bool: ...
-
- def clang_defaultDiagnosticDisplayOptions(self) -> c_uint: ...
-
- def clang_defaultSaveOptions(self, arg1: TranslationUnit) -> c_uint: ...
-
- def clang_disposeCodeCompleteResults(self, arg1: CodeCompletionResults) -> None: ...
-
- def clang_disposeDiagnostic(self, arg1: Diagnostic) -> None: ...
-
- def clang_disposeIndex(self, arg1: Index) -> None: ...
-
- def clang_disposeString(self, arg1: _CXString) -> None: ...
+ ) -> None:
+ ...
+
+ def clang_CXRewriter_writeMainFileToStdOut(self, arg1: Rewriter) -> None:
+ ...
+
+ def clang_CXXConstructor_isConvertingConstructor(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXConstructor_isCopyConstructor(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXConstructor_isDefaultConstructor(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXConstructor_isMoveConstructor(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXField_isMutable(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isConst(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isDefaulted(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isDeleted(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isCopyAssignmentOperator(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isMoveAssignmentOperator(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isExplicit(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isPureVirtual(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isStatic(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXMethod_isVirtual(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_CXXRecord_isAbstract(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_EnumDecl_isScoped(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_defaultDiagnosticDisplayOptions(self) -> c_uint:
+ ...
+
+ def clang_defaultSaveOptions(self, arg1: TranslationUnit) -> c_uint:
+ ...
+
+ def clang_disposeCodeCompleteResults(self, arg1: CodeCompletionResults) -> None:
+ ...
+
+ def clang_disposeDiagnostic(self, arg1: Diagnostic) -> None:
+ ...
+
+ def clang_disposeIndex(self, arg1: Index) -> None:
+ ...
+
+ def clang_disposeString(self, arg1: _CXString) -> None:
+ ...
def clang_disposeTokens(
self, arg1: TranslationUnit, arg2: _Pointer[Token], arg3: c_uint
- ) -> None: ...
-
- def clang_disposeTranslationUnit(self, arg1: TranslationUnit) -> None: ...
-
- def clang_equalCursors(self, arg1: Cursor, arg2: Cursor) -> bool: ...
-
- def clang_equalLocations(
- self, arg1: SourceLocation, arg2: SourceLocation
- ) -> bool: ...
-
- def clang_equalRanges(self, arg1: SourceRange, arg2: SourceRange) -> bool: ...
-
- def clang_equalTypes(self, arg1: Type, arg2: Type) -> bool: ...
-
- def clang_formatDiagnostic(self, arg1: Diagnostic, arg2: c_uint) -> _CXString: ...
-
- def clang_getAddressSpace(self, arg1: Type) -> c_uint: ...
-
- def clang_getArgType(self, arg1: Type, arg2: c_uint) -> Type: ...
-
- def clang_getArrayElementType(self, arg1: Type) -> Type: ...
-
- def clang_getArraySize(self, arg1: Type) -> c_longlong: ...
-
- def clang_getFieldDeclBitWidth(self, arg1: Cursor) -> c_int: ...
-
- def clang_getCanonicalCursor(self, arg1: Cursor) -> Cursor: ...
-
- def clang_getCanonicalType(self, arg1: Type) -> Type: ...
-
- def clang_getChildDiagnostics(self, arg1: Diagnostic) -> _Pointer[c_void_p]: ...
-
- def clang_getCompletionAvailability(self, arg1: c_void_p) -> c_int: ...
-
- def clang_getCompletionBriefComment(self, arg1: c_void_p) -> _CXString: ...
+ ) -> None:
+ ...
+
+ def clang_disposeTranslationUnit(self, arg1: TranslationUnit) -> None:
+ ...
+
+ def clang_equalCursors(self, arg1: Cursor, arg2: Cursor) -> bool:
+ ...
+
+ def clang_equalLocations(self, arg1: SourceLocation, arg2: SourceLocation) -> bool:
+ ...
+
+ def clang_equalRanges(self, arg1: SourceRange, arg2: SourceRange) -> bool:
+ ...
+
+ def clang_equalTypes(self, arg1: Type, arg2: Type) -> bool:
+ ...
+
+ def clang_formatDiagnostic(self, arg1: Diagnostic, arg2: c_uint) -> _CXString:
+ ...
+
+ def clang_getAddressSpace(self, arg1: Type) -> c_uint:
+ ...
+
+ def clang_getArgType(self, arg1: Type, arg2: c_uint) -> Type:
+ ...
+
+ def clang_getArrayElementType(self, arg1: Type) -> Type:
+ ...
+
+ def clang_getArraySize(self, arg1: Type) -> c_longlong:
+ ...
+
+ def clang_getFieldDeclBitWidth(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_getCanonicalCursor(self, arg1: Cursor) -> Cursor:
+ ...
+
+ def clang_getCanonicalType(self, arg1: Type) -> Type:
+ ...
+
+ def clang_getChildDiagnostics(self, arg1: Diagnostic) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_getCompletionAvailability(self, arg1: c_void_p) -> c_int:
+ ...
+
+ def clang_getCompletionBriefComment(self, arg1: c_void_p) -> _CXString:
+ ...
def clang_getCompletionChunkCompletionString(
self, arg1: c_void_p, arg2: c_int
- ) -> _Pointer[c_void_p]: ...
-
- def clang_getCompletionChunkKind(self, arg1: c_void_p, arg2: c_int) -> c_int: ...
-
- def clang_getCompletionChunkText(
- self, arg1: c_void_p, arg2: c_int
- ) -> _CXString: ...
-
- def clang_getCompletionPriority(self, arg1: c_void_p) -> c_int: ...
-
- def clang_getCString(self, arg1: _CXString) -> c_interop_string: ...
-
- def clang_getCursor(
- self, arg1: TranslationUnit, arg2: SourceLocation
- ) -> Cursor: ...
-
- def clang_getCursorAvailability(self, arg1: Cursor) -> c_int: ...
-
- def clang_getCursorDefinition(self, arg1: Cursor) -> Cursor: ...
-
- def clang_getCursorDisplayName(self, arg1: Cursor) -> _CXString: ...
-
- def clang_getCursorExceptionSpecificationType(self, arg1: Cursor) -> c_int: ...
-
- def clang_getCursorExtent(self, arg1: Cursor) -> SourceRange: ...
-
- def clang_getCursorLexicalParent(self, arg1: Cursor) -> Cursor: ...
-
- def clang_getCursorLinkage(self, arg1: Cursor) -> c_int: ...
-
- def clang_getCursorLocation(self, arg1: Cursor) -> SourceLocation: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_getCompletionChunkKind(self, arg1: c_void_p, arg2: c_int) -> c_int:
+ ...
+
+ def clang_getCompletionChunkText(self, arg1: c_void_p, arg2: c_int) -> _CXString:
+ ...
+
+ def clang_getCompletionPriority(self, arg1: c_void_p) -> c_int:
+ ...
+
+ def clang_getCString(self, arg1: _CXString) -> c_interop_string:
+ ...
+
+ def clang_getCursor(self, arg1: TranslationUnit, arg2: SourceLocation) -> Cursor:
+ ...
+
+ def clang_getCursorAvailability(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_getCursorDefinition(self, arg1: Cursor) -> Cursor:
+ ...
+
+ def clang_getCursorDisplayName(self, arg1: Cursor) -> _CXString:
+ ...
+
+ def clang_getCursorExceptionSpecificationType(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_getCursorExtent(self, arg1: Cursor) -> SourceRange:
+ ...
+
+ def clang_getCursorLexicalParent(self, arg1: Cursor) -> Cursor:
+ ...
+
+ def clang_getCursorLinkage(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_getCursorLocation(self, arg1: Cursor) -> SourceLocation:
+ ...
def clang_getCursorPrettyPrinted(
self, arg1: Cursor, arg2: PrintingPolicy
- ) -> _CXString: ...
-
- def clang_getCursorPrintingPolicy(self, arg1: Cursor) -> _Pointer[c_void_p]: ...
-
- def clang_getCursorReferenced(self, arg1: Cursor) -> Cursor: ...
+ ) -> _CXString:
+ ...
+
+ def clang_getCursorPrintingPolicy(self, arg1: Cursor) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_getCursorReferenced(self, arg1: Cursor) -> Cursor:
+ ...
def clang_getCursorReferenceNameRange(
self, arg1: Cursor, arg2: c_uint, arg3: c_uint
- ) -> SourceRange: ...
-
- def clang_getCursorResultType(self, arg1: Cursor) -> Type: ...
-
- def clang_getCursorSemanticParent(self, arg1: Cursor) -> Cursor: ...
-
- def clang_getCursorSpelling(self, arg1: Cursor) -> _CXString: ...
-
- def clang_getCursorTLSKind(self, arg1: Cursor) -> c_int: ...
-
- def clang_getCursorType(self, arg1: Cursor) -> Type: ...
-
- def clang_getCursorUSR(self, arg1: Cursor) -> _CXString: ...
-
- def clang_Cursor_getMangling(self, arg1: Cursor) -> _CXString: ...
-
- def clang_Cursor_hasAttrs(self, arg1: Cursor) -> c_uint: ...
-
- def clang_getCXXAccessSpecifier(self, arg1: Cursor) -> c_uint: ...
-
- def clang_getDeclObjCTypeEncoding(self, arg1: Cursor) -> _CXString: ...
+ ) -> SourceRange:
+ ...
+
+ def clang_getCursorResultType(self, arg1: Cursor) -> Type:
+ ...
+
+ def clang_getCursorSemanticParent(self, arg1: Cursor) -> Cursor:
+ ...
+
+ def clang_getCursorSpelling(self, arg1: Cursor) -> _CXString:
+ ...
+
+ def clang_getCursorTLSKind(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_getCursorType(self, arg1: Cursor) -> Type:
+ ...
+
+ def clang_getCursorUSR(self, arg1: Cursor) -> _CXString:
+ ...
+
+ def clang_Cursor_getMangling(self, arg1: Cursor) -> _CXString:
+ ...
+
+ def clang_Cursor_hasAttrs(self, arg1: Cursor) -> c_uint:
+ ...
+
+ def clang_getCXXAccessSpecifier(self, arg1: Cursor) -> c_uint:
+ ...
+
+ def clang_getDeclObjCTypeEncoding(self, arg1: Cursor) -> _CXString:
+ ...
def clang_getDiagnostic(
self, arg1: _Pointer[c_void_p], arg2: c_uint
- ) -> _Pointer[c_void_p]: ...
-
- def clang_getDiagnosticCategory(self, arg1: Diagnostic) -> c_uint: ...
-
- def clang_getDiagnosticCategoryText(self, arg1: Diagnostic) -> _CXString: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_getDiagnosticCategory(self, arg1: Diagnostic) -> c_uint:
+ ...
+
+ def clang_getDiagnosticCategoryText(self, arg1: Diagnostic) -> _CXString:
+ ...
def clang_getDiagnosticFixIt(
self, arg1: Diagnostic, arg2: c_uint, arg3: _Pointer[SourceRange]
- ) -> _CXString: ...
+ ) -> _CXString:
+ ...
def clang_getDiagnosticInSet(
self, arg1: _Pointer[c_void_p], arg2: c_uint
- ) -> _Pointer[c_void_p]: ...
-
- def clang_getDiagnosticLocation(self, arg1: Diagnostic) -> SourceLocation: ...
-
- def clang_getDiagnosticNumFixIts(self, arg1: Diagnostic) -> c_uint: ...
-
- def clang_getDiagnosticNumRanges(self, arg1: Diagnostic) -> c_uint: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_getDiagnosticLocation(self, arg1: Diagnostic) -> SourceLocation:
+ ...
+
+ def clang_getDiagnosticNumFixIts(self, arg1: Diagnostic) -> c_uint:
+ ...
+
+ def clang_getDiagnosticNumRanges(self, arg1: Diagnostic) -> c_uint:
+ ...
def clang_getDiagnosticOption(
self, arg1: Diagnostic, arg2: _Pointer[_CXString]
- ) -> _CXString: ...
-
- def clang_getDiagnosticRange(
- self, arg1: Diagnostic, arg2: c_uint
- ) -> SourceRange: ...
-
- def clang_getDiagnosticSeverity(self, arg1: Diagnostic) -> c_int: ...
-
- def clang_getDiagnosticSpelling(self, arg1: Diagnostic) -> _CXString: ...
-
- def clang_getElementType(self, arg1: Type) -> Type: ...
-
- def clang_getEnumConstantDeclUnsignedValue(self, arg1: Cursor) -> c_ulonglong: ...
-
- def clang_getEnumConstantDeclValue(self, arg1: Cursor) -> c_longlong: ...
-
- def clang_getEnumDeclIntegerType(self, arg1: Cursor) -> Type: ...
-
- def clang_getExceptionSpecificationType(self, arg1: Type) -> c_int: ...
+ ) -> _CXString:
+ ...
+
+ def clang_getDiagnosticRange(self, arg1: Diagnostic, arg2: c_uint) -> SourceRange:
+ ...
+
+ def clang_getDiagnosticSeverity(self, arg1: Diagnostic) -> c_int:
+ ...
+
+ def clang_getDiagnosticSpelling(self, arg1: Diagnostic) -> _CXString:
+ ...
+
+ def clang_getElementType(self, arg1: Type) -> Type:
+ ...
+
+ def clang_getEnumConstantDeclUnsignedValue(self, arg1: Cursor) -> c_ulonglong:
+ ...
+
+ def clang_getEnumConstantDeclValue(self, arg1: Cursor) -> c_longlong:
+ ...
+
+ def clang_getEnumDeclIntegerType(self, arg1: Cursor) -> Type:
+ ...
+
+ def clang_getExceptionSpecificationType(self, arg1: Type) -> c_int:
+ ...
def clang_getFile(
self, arg1: TranslationUnit, arg2: c_interop_string
- ) -> _Pointer[c_void_p]: ...
-
- def clang_getFileName(self, arg1: File) -> _CXString: ...
-
- def clang_getFileTime(self, arg1: File) -> c_uint: ...
-
- def clang_File_isEqual(self, arg1: File, arg2: File) -> bool: ...
-
- def clang_getIBOutletCollectionType(self, arg1: Cursor) -> Type: ...
-
- def clang_getIncludedFile(self, arg1: Cursor) -> _Pointer[c_void_p]: ...
+ ) -> _Pointer[c_void_p]:
+ ...
+
+ def clang_getFileName(self, arg1: File) -> _CXString:
+ ...
+
+ def clang_getFileTime(self, arg1: File) -> c_uint:
+ ...
+
+ def clang_File_isEqual(self, arg1: File, arg2: File) -> bool:
+ ...
+
+ def clang_getIBOutletCollectionType(self, arg1: Cursor) -> Type:
+ ...
+
+ def clang_getIncludedFile(self, arg1: Cursor) -> _Pointer[c_void_p]:
+ ...
def clang_getInclusions(
self,
arg1: TranslationUnit,
arg2: translation_unit_includes_callback,
arg3: py_object,
- ) -> None: ...
+ ) -> None:
+ ...
def clang_getInstantiationLocation(
self,
arg1: SourceLocation,
arg2: _Pointer[_Pointer[c_void_p]],
arg3: _Pointer[c_uint],
arg4: _Pointer[c_uint],
arg5: _Pointer[c_uint],
- ) -> None: ...
+ ) -> None:
+ ...
def clang_getLocation(
self, arg1: TranslationUnit, arg2: File, arg3: c_uint, arg4: c_uint
- ) -> SourceLocation: ...
+ ) -> SourceLocation:
+ ...
def clang_getLocationForOffset(
self, arg1: TranslationUnit, arg2: File, arg3: c_uint
- ) -> SourceLocation: ...
-
- def clang_getNullCursor(self) -> Cursor: ...
-
- def clang_getNumArgTypes(self, arg1: Type) -> c_uint: ...
-
- def clang_getNumCompletionChunks(self, arg1: c_void_p) -> c_int: ...
-
- def clang_getNumDiagnostics(self, arg1: _Pointer[c_void_p]) -> c_uint: ...
-
- def clang_getNumDiagnosticsInSet(self, arg1: _Pointer[c_void_p]) -> c_uint: ...
-
- def clang_getNumElements(self, arg1: Type) -> c_longlong: ...
-
- def clang_getNumOverloadedDecls(self, arg1: Cursor) -> c_uint: ...
-
- def clang_getOffsetOfBase(self, arg1: Cursor, arg2: Cursor) -> c_longlong: ...
-
- def clang_getOverloadedDecl(self, arg1: Cursor, arg2: c_uint) -> Cursor: ...
-
- def clang_getPointeeType(self, arg1: Type) -> Type: ...
-
- def clang_getRange(
- self, arg1: SourceLocation, arg2: SourceLocation
- ) -> SourceRange: ...
-
- def clang_getRangeEnd(self, arg1: SourceRange) -> SourceLocation: ...
-
- def clang_getRangeStart(self, arg1: SourceRange) -> SourceLocation: ...
-
- def clang_getResultType(self, arg1: Type) -> Type: ...
-
- def clang_getSpecializedCursorTemplate(self, arg1: Cursor) -> Cursor: ...
-
- def clang_getTemplateCursorKind(self, arg1: Cursor) -> c_uint: ...
-
- def clang_getTokenExtent(
- self, arg1: TranslationUnit, arg2: Token
- ) -> SourceRange: ...
-
- def clang_getTokenKind(self, arg1: Token) -> c_uint: ...
+ ) -> SourceLocation:
+ ...
+
+ def clang_getNullCursor(self) -> Cursor:
+ ...
+
+ def clang_getNumArgTypes(self, arg1: Type) -> c_uint:
+ ...
+
+ def clang_getNumCompletionChunks(self, arg1: c_void_p) -> c_int:
+ ...
+
+ def clang_getNumDiagnostics(self, arg1: _Pointer[c_void_p]) -> c_uint:
+ ...
+
+ def clang_getNumDiagnosticsInSet(self, arg1: _Pointer[c_void_p]) -> c_uint:
+ ...
+
+ def clang_getNumElements(self, arg1: Type) -> c_longlong:
+ ...
+
+ def clang_getNumOverloadedDecls(self, arg1: Cursor) -> c_uint:
+ ...
+
+ def clang_getOffsetOfBase(self, arg1: Cursor, arg2: Cursor) -> c_longlong:
+ ...
+
+ def clang_getOverloadedDecl(self, arg1: Cursor, arg2: c_uint) -> Cursor:
+ ...
+
+ def clang_getPointeeType(self, arg1: Type) -> Type:
+ ...
+
+ def clang_getRange(self, arg1: SourceLocation, arg2: SourceLocation) -> SourceRange:
+ ...
+
+ def clang_getRangeEnd(self, arg1: SourceRange) -> SourceLocation:
+ ...
+
+ def clang_getRangeStart(self, arg1: SourceRange) -> SourceLocation:
+ ...
+
+ def clang_getResultType(self, arg1: Type) -> Type:
+ ...
+
+ def clang_getSpecializedCursorTemplate(self, arg1: Cursor) -> Cursor:
+ ...
+
+ def clang_getTemplateCursorKind(self, arg1: Cursor) -> c_uint:
+ ...
+
+ def clang_getTokenExtent(self, arg1: TranslationUnit, arg2: Token) -> SourceRange:
+ ...
+
+ def clang_getTokenKind(self, arg1: Token) -> c_uint:
+ ...
def clang_getTokenLocation(
self, arg1: TranslationUnit, arg2: Token
- ) -> SourceLocation: ...
-
- def clang_getTokenSpelling(
- self, arg1: TranslationUnit, arg2: Token
- ) -> _CXString: ...
-
- def clang_getTranslationUnitCursor(self, arg1: TranslationUnit) -> Cursor: ...
-
- def clang_getTranslationUnitSpelling(self, arg1: TranslationUnit) -> _CXString: ...
-
- def clang_getTUResourceUsageName(self, arg1: c_uint) -> c_interop_string: ...
-
- def clang_getTypeDeclaration(self, arg1: Type) -> Cursor: ...
-
- def clang_getTypedefDeclUnderlyingType(self, arg1: Cursor) -> Type: ...
-
- def clang_getTypedefName(self, arg1: Type) -> _CXString: ...
-
- def clang_getTypeKindSpelling(self, arg1: c_uint) -> _CXString: ...
-
- def clang_getTypePrettyPrinted(
- self, arg1: Type, arg2: PrintingPolicy
- ) -> _CXString: ...
-
- def clang_getTypeSpelling(self, arg1: Type) -> _CXString: ...
-
- def clang_hashCursor(self, arg1: Cursor) -> c_uint: ...
-
- def clang_isAttribute(self, arg1: CursorKind) -> bool: ...
+ ) -> SourceLocation:
+ ...
+
+ def clang_getTokenSpelling(self, arg1: TranslationUnit, arg2: Token) -> _CXString:
+ ...
+
+ def clang_getTranslationUnitCursor(self, arg1: TranslationUnit) -> Cursor:
+ ...
+
+ def clang_getTranslationUnitSpelling(self, arg1: TranslationUnit) -> _CXString:
+ ...
+
+ def clang_getTUResourceUsageName(self, arg1: c_uint) -> c_interop_string:
+ ...
+
+ def clang_getTypeDeclaration(self, arg1: Type) -> Cursor:
+ ...
+
+ def clang_getTypedefDeclUnderlyingType(self, arg1: Cursor) -> Type:
+ ...
+
+ def clang_getTypedefName(self, arg1: Type) -> _CXString:
+ ...
+
+ def clang_getTypeKindSpelling(self, arg1: c_uint) -> _CXString:
+ ...
+
+ def clang_getTypePrettyPrinted(self, arg1: Type, arg2: PrintingPolicy) -> _CXString:
+ ...
+
+ def clang_getTypeSpelling(self, arg1: Type) -> _CXString:
+ ...
+
+ def clang_hashCursor(self, arg1: Cursor) -> c_uint:
+ ...
+
+ def clang_isAttribute(self, arg1: CursorKind) -> bool:
+ ...
def clang_getFullyQualifiedName(
self, arg1: Type, arg2: PrintingPolicy, arg3: c_uint
- ) -> _CXString: ...
-
- def clang_isConstQualifiedType(self, arg1: Type) -> bool: ...
-
- def clang_isCursorDefinition(self, arg1: Cursor) -> bool: ...
-
- def clang_isDeclaration(self, arg1: CursorKind) -> bool: ...
-
- def clang_isExpression(self, arg1: CursorKind) -> bool: ...
+ ) -> _CXString:
+ ...
+
+ def clang_isConstQualifiedType(self, arg1: Type) -> bool:
+ ...
+
+ def clang_isCursorDefinition(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_isDeclaration(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isExpression(self, arg1: CursorKind) -> bool:
+ ...
def clang_isFileMultipleIncludeGuarded(
self, arg1: TranslationUnit, arg2: File
- ) -> bool: ...
-
- def clang_isFunctionTypeVariadic(self, arg1: Type) -> bool: ...
-
- def clang_isInvalid(self, arg1: CursorKind) -> bool: ...
-
- def clang_isPODType(self, arg1: Type) -> bool: ...
-
- def clang_isPreprocessing(self, arg1: CursorKind) -> bool: ...
-
- def clang_isReference(self, arg1: CursorKind) -> bool: ...
-
- def clang_isRestrictQualifiedType(self, arg1: Type) -> bool: ...
-
- def clang_isStatement(self, arg1: CursorKind) -> bool: ...
-
- def clang_isTranslationUnit(self, arg1: CursorKind) -> bool: ...
-
- def clang_isUnexposed(self, arg1: CursorKind) -> bool: ...
-
- def clang_isVirtualBase(self, arg1: Cursor) -> bool: ...
-
- def clang_isVolatileQualifiedType(self, arg1: Type) -> bool: ...
+ ) -> bool:
+ ...
+
+ def clang_isFunctionTypeVariadic(self, arg1: Type) -> bool:
+ ...
+
+ def clang_isInvalid(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isPODType(self, arg1: Type) -> bool:
+ ...
+
+ def clang_isPreprocessing(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isReference(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isRestrictQualifiedType(self, arg1: Type) -> bool:
+ ...
+
+ def clang_isStatement(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isTranslationUnit(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isUnexposed(self, arg1: CursorKind) -> bool:
+ ...
+
+ def clang_isVirtualBase(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_isVolatileQualifiedType(self, arg1: Type) -> bool:
+ ...
def clang_isBeforeInTranslationUnit(
self, arg1: SourceLocation, arg2: SourceLocation
- ) -> bool: ...
+ ) -> bool:
+ ...
def clang_parseTranslationUnit(
self,
arg1: Index,
arg2: c_interop_string,
arg3: c_void_p,
arg4: c_int,
arg5: c_void_p,
arg6: c_int,
arg7: c_int,
- ) -> _Pointer[c_void_p]: ...
+ ) -> _Pointer[c_void_p]:
+ ...
def clang_reparseTranslationUnit(
self, arg1: TranslationUnit, arg2: c_int, arg3: c_void_p, arg4: c_int
- ) -> c_int: ...
+ ) -> c_int:
+ ...
def clang_saveTranslationUnit(
self, arg1: TranslationUnit, arg2: c_interop_string, arg3: c_uint
- ) -> c_int: ...
+ ) -> c_int:
+ ...
def clang_tokenize(
self,
arg1: TranslationUnit,
arg2: SourceRange,
arg3: _Pointer[_Pointer[Token]],
arg4: _Pointer[c_uint],
- ) -> None: ...
+ ) -> None:
+ ...
def clang_visitChildren(
self, arg1: Cursor, arg2: cursor_visit_callback, arg3: py_object
- ) -> c_uint: ...
+ ) -> c_uint:
+ ...
def clang_visitCXXBaseClasses(
self, arg1: Type, arg2: fields_visit_callback, arg3: py_object
- ) -> c_uint: ...
+ ) -> c_uint:
+ ...
def clang_visitCXXMethods(
self, arg1: Type, arg2: fields_visit_callback, arg3: py_object
- ) -> c_uint: ...
-
- def clang_Cursor_getNumArguments(self, arg1: Cursor) -> c_int: ...
-
- def clang_Cursor_getArgument(self, arg1: Cursor, arg2: c_uint) -> Cursor: ...
-
- def clang_Cursor_getNumTemplateArguments(self, arg1: Cursor) -> c_int: ...
+ ) -> c_uint:
+ ...
+
+ def clang_Cursor_getNumArguments(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_Cursor_getArgument(self, arg1: Cursor, arg2: c_uint) -> Cursor:
+ ...
+
+ def clang_Cursor_getNumTemplateArguments(self, arg1: Cursor) -> c_int:
+ ...
def clang_Cursor_getTemplateArgumentKind(
self, arg1: Cursor, arg2: c_uint
- ) -> c_uint: ...
-
- def clang_Cursor_getTemplateArgumentType(
- self, arg1: Cursor, arg2: c_uint
- ) -> Type: ...
+ ) -> c_uint:
+ ...
+
+ def clang_Cursor_getTemplateArgumentType(self, arg1: Cursor, arg2: c_uint) -> Type:
+ ...
def clang_Cursor_getTemplateArgumentValue(
self, arg1: Cursor, arg2: c_uint
- ) -> c_longlong: ...
+ ) -> c_longlong:
+ ...
def clang_Cursor_getTemplateArgumentUnsignedValue(
self, arg1: Cursor, arg2: c_uint
- ) -> c_ulonglong: ...
-
- def clang_getCursorBinaryOperatorKind(self, arg1: Cursor) -> c_int: ...
-
- def clang_Cursor_getBriefCommentText(self, arg1: Cursor) -> _CXString: ...
-
- def clang_Cursor_getRawCommentText(self, arg1: Cursor) -> _CXString: ...
-
- def clang_Cursor_getOffsetOfField(self, arg1: Cursor) -> c_longlong: ...
-
- def clang_Cursor_getStorageClass(self, arg1: Cursor) -> c_int: ...
-
- def clang_Cursor_isAnonymous(self, arg1: Cursor) -> bool: ...
-
- def clang_Cursor_isAnonymousRecordDecl(self, arg1: Cursor) -> bool: ...
-
- def clang_Cursor_isBitField(self, arg1: Cursor) -> bool: ...
-
- def clang_Location_isInSystemHeader(self, arg1: SourceLocation) -> bool: ...
-
- def clang_PrintingPolicy_dispose(self, arg1: PrintingPolicy) -> None: ...
+ ) -> c_ulonglong:
+ ...
+
+ def clang_getCursorBinaryOperatorKind(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_Cursor_getBriefCommentText(self, arg1: Cursor) -> _CXString:
+ ...
+
+ def clang_Cursor_getRawCommentText(self, arg1: Cursor) -> _CXString:
+ ...
+
+ def clang_Cursor_getOffsetOfField(self, arg1: Cursor) -> c_longlong:
+ ...
+
+ def clang_Cursor_getStorageClass(self, arg1: Cursor) -> c_int:
+ ...
+
+ def clang_Cursor_isAnonymous(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_Cursor_isAnonymousRecordDecl(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_Cursor_isBitField(self, arg1: Cursor) -> bool:
+ ...
+
+ def clang_Location_isInSystemHeader(self, arg1: SourceLocation) -> bool:
+ ...
+
+ def clang_PrintingPolicy_dispose(self, arg1: PrintingPolicy) -> None:
+ ...
def clang_PrintingPolicy_getProperty(
self, arg1: PrintingPolicy, arg2: c_int
- ) -> c_uint: ...
+ ) -> c_uint:
+ ...
def clang_PrintingPolicy_setProperty(
self, arg1: PrintingPolicy, arg2: c_int, arg3: c_uint
- ) -> None: ...
-
- def clang_Type_getAlignOf(self, arg1: Type) -> c_longlong: ...
-
- def clang_Type_getClassType(self, arg1: Type) -> Type: ...
-
- def clang_Type_getNumTemplateArguments(self, arg1: Type) -> c_int: ...
-
- def clang_Type_getTemplateArgumentAsType(
- self, arg1: Type, arg2: c_uint
- ) -> Type: ...
-
- def clang_Type_getOffsetOf(
- self, arg1: Type, arg2: c_interop_string
- ) -> c_longlong: ...
-
- def clang_Type_getSizeOf(self, arg1: Type) -> c_longlong: ...
-
- def clang_Type_getCXXRefQualifier(self, arg1: Type) -> c_uint: ...
-
- def clang_Type_getNamedType(self, arg1: Type) -> Type: ...
+ ) -> None:
+ ...
+
+ def clang_Type_getAlignOf(self, arg1: Type) -> c_longlong:
+ ...
+
+ def clang_Type_getClassType(self, arg1: Type) -> Type:
+ ...
+
+ def clang_Type_getNumTemplateArguments(self, arg1: Type) -> c_int:
+ ...
+
+ def clang_Type_getTemplateArgumentAsType(self, arg1: Type, arg2: c_uint) -> Type:
+ ...
+
+ def clang_Type_getOffsetOf(self, arg1: Type, arg2: c_interop_string) -> c_longlong:
+ ...
+
+ def clang_Type_getSizeOf(self, arg1: Type) -> c_longlong:
+ ...
+
+ def clang_Type_getCXXRefQualifier(self, arg1: Type) -> c_uint:
+ ...
+
+ def clang_Type_getNamedType(self, arg1: Type) -> Type:
+ ...
def clang_Type_visitFields(
self, arg1: Type, arg2: fields_visit_callback, arg3: py_object
- ) -> c_uint: ...
+ ) -> c_uint:
+ ...
class LibclangError(Exception):
def __init__(self, message: str):
self.m = message
``````````
</details>
https://github.com/llvm/llvm-project/pull/142120
More information about the cfe-commits
mailing list