authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-05-29 10:47:23-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2019-05-29 10:47:23-04:00
logf9ada1cfba5140ef01baa138813241c6b93a1ea9
tree9cc4d638a0d9bc1315dc8bdf62640268b3849fd1
parentb66438eb8092ea93b255f0ba11f857b1d6ccb052
parent6547468af60be75e4256805dd2bdff4b14688262
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #2530 from gonzus/gonzus/improve-clang-zig

Add declarations missing from clang.zig

1 files changed, 217 insertions(+), 187 deletions(-)

src-self-hosted/clang.zig+217-187
......@@ -1,5 +1,6 @@
11pub const struct_ZigClangAPValue = @OpaqueType();
22pub const struct_ZigClangAPSInt = @OpaqueType();
3pub const struct_ZigClangAPFloat = @OpaqueType();
34pub const struct_ZigClangASTContext = @OpaqueType();
45pub const struct_ZigClangASTUnit = @OpaqueType();
56pub const struct_ZigClangArraySubscriptExpr = @OpaqueType();
......@@ -12,7 +13,7 @@ pub const struct_ZigClangCStyleCastExpr = @OpaqueType();
1213pub const struct_ZigClangCallExpr = @OpaqueType();
1314pub const struct_ZigClangCaseStmt = @OpaqueType();
1415pub const struct_ZigClangCompoundAssignOperator = @OpaqueType();
15pub const ZigClangCompoundStmt = @OpaqueType();
16pub const struct_ZigClangCompoundStmt = @OpaqueType();
1617pub const struct_ZigClangConditionalOperator = @OpaqueType();
1718pub const struct_ZigClangConstantArrayType = @OpaqueType();
1819pub const struct_ZigClangContinueStmt = @OpaqueType();
......@@ -33,7 +34,7 @@ pub const struct_ZigClangFieldDecl = @OpaqueType();
3334pub const struct_ZigClangFileID = @OpaqueType();
3435pub const struct_ZigClangForStmt = @OpaqueType();
3536pub const struct_ZigClangFullSourceLoc = @OpaqueType();
36pub const ZigClangFunctionDecl = @OpaqueType();
37pub const struct_ZigClangFunctionDecl = @OpaqueType();
3738pub const struct_ZigClangFunctionProtoType = @OpaqueType();
3839pub const struct_ZigClangIfStmt = @OpaqueType();
3940pub const struct_ZigClangImplicitCastExpr = @OpaqueType();
......@@ -68,7 +69,8 @@ pub const struct_ZigClangUnaryOperator = @OpaqueType();
6869pub const struct_ZigClangValueDecl = @OpaqueType();
6970pub const struct_ZigClangVarDecl = @OpaqueType();
7071pub const struct_ZigClangWhileStmt = @OpaqueType();
71pub const ZigClangFunctionType = @OpaqueType();
72pub const struct_ZigClangFunctionType = @OpaqueType();
73pub const struct_ZigClangPredefinedExpr = @OpaqueType();
7274
7375pub const ZigClangBO = extern enum {
7476 PtrMemD,
......@@ -450,186 +452,6 @@ pub const ZigClangAPValueKind = extern enum {
450452 AddrLabelDiff,
451453};
452454
453pub extern fn ZigClangSourceManager_getSpellingLoc(arg0: ?*const struct_ZigClangSourceManager, Loc: struct_ZigClangSourceLocation) struct_ZigClangSourceLocation;
454pub extern fn ZigClangSourceManager_getFilename(self: *const struct_ZigClangSourceManager, SpellingLoc: struct_ZigClangSourceLocation) ?[*]const u8;
455pub extern fn ZigClangSourceManager_getSpellingLineNumber(arg0: ?*const struct_ZigClangSourceManager, Loc: struct_ZigClangSourceLocation) c_uint;
456pub extern fn ZigClangSourceManager_getSpellingColumnNumber(arg0: ?*const struct_ZigClangSourceManager, Loc: struct_ZigClangSourceLocation) c_uint;
457pub extern fn ZigClangSourceManager_getCharacterData(arg0: ?*const struct_ZigClangSourceManager, SL: struct_ZigClangSourceLocation) [*c]const u8;
458pub extern fn ZigClangASTContext_getPointerType(arg0: ?*const struct_ZigClangASTContext, T: struct_ZigClangQualType) struct_ZigClangQualType;
459pub extern fn ZigClangASTUnit_getASTContext(arg0: ?*struct_ZigClangASTUnit) ?*struct_ZigClangASTContext;
460pub extern fn ZigClangASTUnit_getSourceManager(self: *struct_ZigClangASTUnit) *struct_ZigClangSourceManager;
461pub extern fn ZigClangASTUnit_visitLocalTopLevelDecls(self: *struct_ZigClangASTUnit, context: ?*c_void, Fn: ?extern fn (?*c_void, *const struct_ZigClangDecl) bool) bool;
462pub extern fn ZigClangRecordType_getDecl(record_ty: ?*const struct_ZigClangRecordType) ?*const struct_ZigClangRecordDecl;
463pub extern fn ZigClangEnumType_getDecl(record_ty: ?*const struct_ZigClangEnumType) ?*const struct_ZigClangEnumDecl;
464pub extern fn ZigClangRecordDecl_getCanonicalDecl(record_decl: ?*const struct_ZigClangRecordDecl) ?*const struct_ZigClangTagDecl;
465pub extern fn ZigClangEnumDecl_getCanonicalDecl(arg0: ?*const struct_ZigClangEnumDecl) ?*const struct_ZigClangTagDecl;
466pub extern fn ZigClangTypedefNameDecl_getCanonicalDecl(arg0: ?*const struct_ZigClangTypedefNameDecl) ?*const struct_ZigClangTypedefNameDecl;
467pub extern fn ZigClangRecordDecl_getDefinition(arg0: ?*const struct_ZigClangRecordDecl) ?*const struct_ZigClangRecordDecl;
468pub extern fn ZigClangEnumDecl_getDefinition(arg0: ?*const struct_ZigClangEnumDecl) ?*const struct_ZigClangEnumDecl;
469pub extern fn ZigClangRecordDecl_getLocation(arg0: ?*const struct_ZigClangRecordDecl) struct_ZigClangSourceLocation;
470pub extern fn ZigClangEnumDecl_getLocation(arg0: ?*const struct_ZigClangEnumDecl) struct_ZigClangSourceLocation;
471pub extern fn ZigClangTypedefNameDecl_getLocation(arg0: ?*const struct_ZigClangTypedefNameDecl) struct_ZigClangSourceLocation;
472pub extern fn ZigClangDecl_getLocation(self: *const ZigClangDecl) ZigClangSourceLocation;
473pub extern fn ZigClangRecordDecl_isUnion(record_decl: ?*const struct_ZigClangRecordDecl) bool;
474pub extern fn ZigClangRecordDecl_isStruct(record_decl: ?*const struct_ZigClangRecordDecl) bool;
475pub extern fn ZigClangRecordDecl_isAnonymousStructOrUnion(record_decl: ?*const struct_ZigClangRecordDecl) bool;
476pub extern fn ZigClangEnumDecl_getIntegerType(arg0: ?*const struct_ZigClangEnumDecl) struct_ZigClangQualType;
477pub extern fn ZigClangDecl_getName_bytes_begin(decl: ?*const struct_ZigClangDecl) [*c]const u8;
478pub extern fn ZigClangSourceLocation_eq(a: struct_ZigClangSourceLocation, b: struct_ZigClangSourceLocation) bool;
479pub extern fn ZigClangTypedefType_getDecl(arg0: ?*const struct_ZigClangTypedefType) ?*const struct_ZigClangTypedefNameDecl;
480pub extern fn ZigClangTypedefNameDecl_getUnderlyingType(arg0: ?*const struct_ZigClangTypedefNameDecl) struct_ZigClangQualType;
481pub extern fn ZigClangQualType_getCanonicalType(arg0: struct_ZigClangQualType) struct_ZigClangQualType;
482pub extern fn ZigClangQualType_getTypePtr(self: struct_ZigClangQualType) *const struct_ZigClangType;
483pub extern fn ZigClangQualType_addConst(arg0: [*c]struct_ZigClangQualType) void;
484pub extern fn ZigClangQualType_eq(arg0: struct_ZigClangQualType, arg1: struct_ZigClangQualType) bool;
485pub extern fn ZigClangQualType_isConstQualified(arg0: struct_ZigClangQualType) bool;
486pub extern fn ZigClangQualType_isVolatileQualified(arg0: struct_ZigClangQualType) bool;
487pub extern fn ZigClangQualType_isRestrictQualified(arg0: struct_ZigClangQualType) bool;
488pub extern fn ZigClangType_getTypeClass(self: ?*const struct_ZigClangType) ZigClangTypeClass;
489pub extern fn ZigClangType_isVoidType(self: ?*const struct_ZigClangType) bool;
490pub extern fn ZigClangType_getTypeClassName(self: *const struct_ZigClangType) [*]const u8;
491pub extern fn ZigClangStmt_getBeginLoc(self: *const struct_ZigClangStmt) struct_ZigClangSourceLocation;
492pub extern fn ZigClangStmt_getStmtClass(self: ?*const struct_ZigClangStmt) ZigClangStmtClass;
493pub extern fn ZigClangStmt_classof_Expr(self: ?*const struct_ZigClangStmt) bool;
494pub extern fn ZigClangExpr_getStmtClass(self: ?*const struct_ZigClangExpr) ZigClangStmtClass;
495pub extern fn ZigClangExpr_getType(self: ?*const struct_ZigClangExpr) struct_ZigClangQualType;
496pub extern fn ZigClangExpr_getBeginLoc(self: *const struct_ZigClangExpr) struct_ZigClangSourceLocation;
497pub extern fn ZigClangAPValue_getKind(self: ?*const struct_ZigClangAPValue) ZigClangAPValueKind;
498pub extern fn ZigClangAPValue_getInt(self: ?*const struct_ZigClangAPValue) ?*const struct_ZigClangAPSInt;
499pub extern fn ZigClangAPValue_getArrayInitializedElts(self: ?*const struct_ZigClangAPValue) c_uint;
500pub extern fn ZigClangAPValue_getArrayInitializedElt(self: ?*const struct_ZigClangAPValue, i: c_uint) ?*const struct_ZigClangAPValue;
501pub extern fn ZigClangAPValue_getArrayFiller(self: ?*const struct_ZigClangAPValue) ?*const struct_ZigClangAPValue;
502pub extern fn ZigClangAPValue_getArraySize(self: ?*const struct_ZigClangAPValue) c_uint;
503pub extern fn ZigClangAPValue_getLValueBase(self: ?*const struct_ZigClangAPValue) struct_ZigClangAPValueLValueBase;
504pub extern fn ZigClangAPSInt_isSigned(self: ?*const struct_ZigClangAPSInt) bool;
505pub extern fn ZigClangAPSInt_isNegative(self: ?*const struct_ZigClangAPSInt) bool;
506pub extern fn ZigClangAPSInt_negate(self: ?*const struct_ZigClangAPSInt) ?*const struct_ZigClangAPSInt;
507pub extern fn ZigClangAPSInt_free(self: ?*const struct_ZigClangAPSInt) void;
508pub extern fn ZigClangAPSInt_getRawData(self: ?*const struct_ZigClangAPSInt) [*c]const u64;
509pub extern fn ZigClangAPSInt_getNumWords(self: ?*const struct_ZigClangAPSInt) c_uint;
510pub extern fn ZigClangAPValueLValueBase_dyn_cast_Expr(self: struct_ZigClangAPValueLValueBase) ?*const struct_ZigClangExpr;
511pub extern fn ZigClangASTUnit_delete(arg0: ?*struct_ZigClangASTUnit) void;
512
513pub extern fn ZigClangFunctionDecl_getType(self: *const ZigClangFunctionDecl) struct_ZigClangQualType;
514pub extern fn ZigClangFunctionDecl_getLocation(self: *const ZigClangFunctionDecl) struct_ZigClangSourceLocation;
515pub extern fn ZigClangFunctionDecl_hasBody(self: *const ZigClangFunctionDecl) bool;
516pub extern fn ZigClangFunctionDecl_getStorageClass(self: *const ZigClangFunctionDecl) ZigClangStorageClass;
517pub extern fn ZigClangFunctionDecl_getParamDecl(self: *const ZigClangFunctionDecl, i: c_uint) *const struct_ZigClangParmVarDecl;
518pub extern fn ZigClangFunctionDecl_getBody(self: *const ZigClangFunctionDecl) *const struct_ZigClangStmt;
519
520pub extern fn ZigClangBuiltinType_getKind(self: *const struct_ZigClangBuiltinType) ZigClangBuiltinTypeKind;
521
522pub extern fn ZigClangFunctionType_getNoReturnAttr(self: *const ZigClangFunctionType) bool;
523pub extern fn ZigClangFunctionType_getCallConv(self: *const ZigClangFunctionType) ZigClangCallingConv;
524pub extern fn ZigClangFunctionType_getReturnType(self: *const ZigClangFunctionType) ZigClangQualType;
525
526pub extern fn ZigClangFunctionProtoType_isVariadic(self: *const struct_ZigClangFunctionProtoType) bool;
527pub extern fn ZigClangFunctionProtoType_getNumParams(self: *const struct_ZigClangFunctionProtoType) c_uint;
528pub extern fn ZigClangFunctionProtoType_getParamType(self: *const struct_ZigClangFunctionProtoType, i: c_uint) ZigClangQualType;
529
530pub const ZigClangSourceLocation = struct_ZigClangSourceLocation;
531pub const ZigClangQualType = struct_ZigClangQualType;
532pub const ZigClangAPValueLValueBase = struct_ZigClangAPValueLValueBase;
533pub const ZigClangAPValue = struct_ZigClangAPValue;
534pub const ZigClangAPSInt = struct_ZigClangAPSInt;
535pub const ZigClangASTContext = struct_ZigClangASTContext;
536pub const ZigClangASTUnit = struct_ZigClangASTUnit;
537pub const ZigClangArraySubscriptExpr = struct_ZigClangArraySubscriptExpr;
538pub const ZigClangArrayType = struct_ZigClangArrayType;
539pub const ZigClangAttributedType = struct_ZigClangAttributedType;
540pub const ZigClangBinaryOperator = struct_ZigClangBinaryOperator;
541pub const ZigClangBreakStmt = struct_ZigClangBreakStmt;
542pub const ZigClangBuiltinType = struct_ZigClangBuiltinType;
543pub const ZigClangCStyleCastExpr = struct_ZigClangCStyleCastExpr;
544pub const ZigClangCallExpr = struct_ZigClangCallExpr;
545pub const ZigClangCaseStmt = struct_ZigClangCaseStmt;
546pub const ZigClangCompoundAssignOperator = struct_ZigClangCompoundAssignOperator;
547pub const ZigClangConditionalOperator = struct_ZigClangConditionalOperator;
548pub const ZigClangConstantArrayType = struct_ZigClangConstantArrayType;
549pub const ZigClangContinueStmt = struct_ZigClangContinueStmt;
550pub const ZigClangDecayedType = struct_ZigClangDecayedType;
551pub const ZigClangDecl = struct_ZigClangDecl;
552pub const ZigClangDeclRefExpr = struct_ZigClangDeclRefExpr;
553pub const ZigClangDeclStmt = struct_ZigClangDeclStmt;
554pub const ZigClangDefaultStmt = struct_ZigClangDefaultStmt;
555pub const ZigClangDiagnosticOptions = struct_ZigClangDiagnosticOptions;
556pub const ZigClangDiagnosticsEngine = struct_ZigClangDiagnosticsEngine;
557pub const ZigClangDoStmt = struct_ZigClangDoStmt;
558pub const ZigClangElaboratedType = struct_ZigClangElaboratedType;
559pub const ZigClangEnumConstantDecl = struct_ZigClangEnumConstantDecl;
560pub const ZigClangEnumDecl = struct_ZigClangEnumDecl;
561pub const ZigClangEnumType = struct_ZigClangEnumType;
562pub const ZigClangExpr = struct_ZigClangExpr;
563pub const ZigClangFieldDecl = struct_ZigClangFieldDecl;
564pub const ZigClangFileID = struct_ZigClangFileID;
565pub const ZigClangForStmt = struct_ZigClangForStmt;
566pub const ZigClangFullSourceLoc = struct_ZigClangFullSourceLoc;
567pub const ZigClangFunctionProtoType = struct_ZigClangFunctionProtoType;
568pub const ZigClangIfStmt = struct_ZigClangIfStmt;
569pub const ZigClangImplicitCastExpr = struct_ZigClangImplicitCastExpr;
570pub const ZigClangIncompleteArrayType = struct_ZigClangIncompleteArrayType;
571pub const ZigClangIntegerLiteral = struct_ZigClangIntegerLiteral;
572pub const ZigClangMacroDefinitionRecord = struct_ZigClangMacroDefinitionRecord;
573pub const ZigClangMemberExpr = struct_ZigClangMemberExpr;
574pub const ZigClangNamedDecl = struct_ZigClangNamedDecl;
575pub const ZigClangNone = struct_ZigClangNone;
576pub const ZigClangPCHContainerOperations = struct_ZigClangPCHContainerOperations;
577pub const ZigClangParenExpr = struct_ZigClangParenExpr;
578pub const ZigClangParenType = struct_ZigClangParenType;
579pub const ZigClangParmVarDecl = struct_ZigClangParmVarDecl;
580pub const ZigClangPointerType = struct_ZigClangPointerType;
581pub const ZigClangPreprocessedEntity = struct_ZigClangPreprocessedEntity;
582pub const ZigClangRecordDecl = struct_ZigClangRecordDecl;
583pub const ZigClangRecordType = struct_ZigClangRecordType;
584pub const ZigClangReturnStmt = struct_ZigClangReturnStmt;
585pub const ZigClangSkipFunctionBodiesScope = struct_ZigClangSkipFunctionBodiesScope;
586pub const ZigClangSourceManager = struct_ZigClangSourceManager;
587pub const ZigClangSourceRange = struct_ZigClangSourceRange;
588pub const ZigClangStmt = struct_ZigClangStmt;
589pub const ZigClangStringLiteral = struct_ZigClangStringLiteral;
590pub const ZigClangStringRef = struct_ZigClangStringRef;
591pub const ZigClangSwitchStmt = struct_ZigClangSwitchStmt;
592pub const ZigClangTagDecl = struct_ZigClangTagDecl;
593pub const ZigClangType = struct_ZigClangType;
594pub const ZigClangTypedefNameDecl = struct_ZigClangTypedefNameDecl;
595pub const ZigClangTypedefType = struct_ZigClangTypedefType;
596pub const ZigClangUnaryExprOrTypeTraitExpr = struct_ZigClangUnaryExprOrTypeTraitExpr;
597pub const ZigClangUnaryOperator = struct_ZigClangUnaryOperator;
598pub const ZigClangValueDecl = struct_ZigClangValueDecl;
599pub const ZigClangVarDecl = struct_ZigClangVarDecl;
600pub const ZigClangWhileStmt = struct_ZigClangWhileStmt;
601
602pub const struct_ZigClangSourceLocation = extern struct {
603 ID: c_uint,
604};
605
606pub const Stage2ErrorMsg = extern struct {
607 filename_ptr: ?[*]const u8,
608 filename_len: usize,
609 msg_ptr: [*]const u8,
610 msg_len: usize,
611 // valid until the ASTUnit is freed
612 source: ?[*]const u8,
613 // 0 based
614 line: c_uint,
615 // 0 based
616 column: c_uint,
617 // byte offset into source
618 offset: c_uint,
619};
620pub extern fn ZigClangErrorMsg_delete(ptr: [*c]Stage2ErrorMsg, len: usize) void;
621
622pub extern fn ZigClangLoadFromCommandLine(
623 args_begin: [*]?[*]const u8,
624 args_end: [*]?[*]const u8,
625 errors_ptr: *[*]Stage2ErrorMsg,
626 errors_len: *usize,
627 resources_path: [*c]const u8,
628) ?*ZigClangASTUnit;
629
630pub extern fn ZigClangDecl_getKind(decl: *const ZigClangDecl) ZigClangDeclKind;
631pub extern fn ZigClangDecl_getDeclKindName(decl: *const struct_ZigClangDecl) [*]const u8;
632
633455pub const ZigClangDeclKind = extern enum {
634456 AccessSpec,
635457 Block,
......@@ -707,10 +529,6 @@ pub const ZigClangDeclKind = extern enum {
707529 TranslationUnit,
708530};
709531
710pub const struct_ZigClangQualType = extern struct {
711 ptr: ?*c_void,
712};
713
714532pub const ZigClangBuiltinTypeKind = extern enum {
715533 OCLImage1dRO,
716534 OCLImage1dArrayRO,
......@@ -860,6 +678,218 @@ pub const ZigClangStorageClass = extern enum {
860678 Register,
861679};
862680
681pub const ZigClangAPFloat_roundingMode = extern enum {
682 NearestTiesToEven,
683 TowardPositive,
684 TowardNegative,
685 TowardZero,
686 NearestTiesToAway,
687};
688
689pub const ZigClangStringLiteral_StringKind = extern enum {
690 Ascii,
691 Wide,
692 UTF8,
693 UTF16,
694 UTF32,
695};
696
697pub extern fn ZigClangSourceManager_getSpellingLoc(self: ?*const struct_ZigClangSourceManager, Loc: struct_ZigClangSourceLocation) struct_ZigClangSourceLocation;
698pub extern fn ZigClangSourceManager_getFilename(self: *const struct_ZigClangSourceManager, SpellingLoc: struct_ZigClangSourceLocation) ?[*]const u8;
699pub extern fn ZigClangSourceManager_getSpellingLineNumber(self: ?*const struct_ZigClangSourceManager, Loc: struct_ZigClangSourceLocation) c_uint;
700pub extern fn ZigClangSourceManager_getSpellingColumnNumber(self: ?*const struct_ZigClangSourceManager, Loc: struct_ZigClangSourceLocation) c_uint;
701pub extern fn ZigClangSourceManager_getCharacterData(self: ?*const struct_ZigClangSourceManager, SL: struct_ZigClangSourceLocation) [*c]const u8;
702pub extern fn ZigClangASTContext_getPointerType(self: ?*const struct_ZigClangASTContext, T: struct_ZigClangQualType) struct_ZigClangQualType;
703pub extern fn ZigClangASTUnit_getASTContext(self: ?*struct_ZigClangASTUnit) ?*struct_ZigClangASTContext;
704pub extern fn ZigClangASTUnit_getSourceManager(self: *struct_ZigClangASTUnit) *struct_ZigClangSourceManager;
705pub extern fn ZigClangASTUnit_visitLocalTopLevelDecls(self: *struct_ZigClangASTUnit, context: ?*c_void, Fn: ?extern fn (?*c_void, *const struct_ZigClangDecl) bool) bool;
706pub extern fn ZigClangRecordType_getDecl(record_ty: ?*const struct_ZigClangRecordType) ?*const struct_ZigClangRecordDecl;
707pub extern fn ZigClangEnumType_getDecl(record_ty: ?*const struct_ZigClangEnumType) ?*const struct_ZigClangEnumDecl;
708pub extern fn ZigClangRecordDecl_getCanonicalDecl(record_decl: ?*const struct_ZigClangRecordDecl) ?*const struct_ZigClangTagDecl;
709pub extern fn ZigClangEnumDecl_getCanonicalDecl(self: ?*const struct_ZigClangEnumDecl) ?*const struct_ZigClangTagDecl;
710pub extern fn ZigClangTypedefNameDecl_getCanonicalDecl(self: ?*const struct_ZigClangTypedefNameDecl) ?*const struct_ZigClangTypedefNameDecl;
711pub extern fn ZigClangRecordDecl_getDefinition(self: ?*const struct_ZigClangRecordDecl) ?*const struct_ZigClangRecordDecl;
712pub extern fn ZigClangEnumDecl_getDefinition(self: ?*const struct_ZigClangEnumDecl) ?*const struct_ZigClangEnumDecl;
713pub extern fn ZigClangRecordDecl_getLocation(self: ?*const struct_ZigClangRecordDecl) struct_ZigClangSourceLocation;
714pub extern fn ZigClangEnumDecl_getLocation(self: ?*const struct_ZigClangEnumDecl) struct_ZigClangSourceLocation;
715pub extern fn ZigClangTypedefNameDecl_getLocation(self: ?*const struct_ZigClangTypedefNameDecl) struct_ZigClangSourceLocation;
716pub extern fn ZigClangDecl_getLocation(self: *const ZigClangDecl) ZigClangSourceLocation;
717pub extern fn ZigClangRecordDecl_isUnion(record_decl: ?*const struct_ZigClangRecordDecl) bool;
718pub extern fn ZigClangRecordDecl_isStruct(record_decl: ?*const struct_ZigClangRecordDecl) bool;
719pub extern fn ZigClangRecordDecl_isAnonymousStructOrUnion(record_decl: ?*const struct_ZigClangRecordDecl) bool;
720pub extern fn ZigClangEnumDecl_getIntegerType(self: ?*const struct_ZigClangEnumDecl) struct_ZigClangQualType;
721pub extern fn ZigClangDecl_getName_bytes_begin(decl: ?*const struct_ZigClangDecl) [*c]const u8;
722pub extern fn ZigClangSourceLocation_eq(a: struct_ZigClangSourceLocation, b: struct_ZigClangSourceLocation) bool;
723pub extern fn ZigClangTypedefType_getDecl(self: ?*const struct_ZigClangTypedefType) ?*const struct_ZigClangTypedefNameDecl;
724pub extern fn ZigClangTypedefNameDecl_getUnderlyingType(self: ?*const struct_ZigClangTypedefNameDecl) struct_ZigClangQualType;
725pub extern fn ZigClangQualType_getCanonicalType(self: struct_ZigClangQualType) struct_ZigClangQualType;
726pub extern fn ZigClangQualType_getTypePtr(self: struct_ZigClangQualType) *const struct_ZigClangType;
727pub extern fn ZigClangQualType_addConst(self: [*c]struct_ZigClangQualType) void;
728pub extern fn ZigClangQualType_eq(self: struct_ZigClangQualType, arg1: struct_ZigClangQualType) bool;
729pub extern fn ZigClangQualType_isConstQualified(self: struct_ZigClangQualType) bool;
730pub extern fn ZigClangQualType_isVolatileQualified(self: struct_ZigClangQualType) bool;
731pub extern fn ZigClangQualType_isRestrictQualified(self: struct_ZigClangQualType) bool;
732pub extern fn ZigClangType_getTypeClass(self: ?*const struct_ZigClangType) ZigClangTypeClass;
733pub extern fn ZigClangType_isVoidType(self: ?*const struct_ZigClangType) bool;
734pub extern fn ZigClangType_getTypeClassName(self: *const struct_ZigClangType) [*]const u8;
735pub extern fn ZigClangStmt_getBeginLoc(self: *const struct_ZigClangStmt) struct_ZigClangSourceLocation;
736pub extern fn ZigClangStmt_getStmtClass(self: ?*const struct_ZigClangStmt) ZigClangStmtClass;
737pub extern fn ZigClangStmt_classof_Expr(self: ?*const struct_ZigClangStmt) bool;
738pub extern fn ZigClangExpr_getStmtClass(self: ?*const struct_ZigClangExpr) ZigClangStmtClass;
739pub extern fn ZigClangExpr_getType(self: ?*const struct_ZigClangExpr) struct_ZigClangQualType;
740pub extern fn ZigClangExpr_getBeginLoc(self: *const struct_ZigClangExpr) struct_ZigClangSourceLocation;
741pub extern fn ZigClangAPValue_getKind(self: ?*const struct_ZigClangAPValue) ZigClangAPValueKind;
742pub extern fn ZigClangAPValue_getInt(self: ?*const struct_ZigClangAPValue) ?*const struct_ZigClangAPSInt;
743pub extern fn ZigClangAPValue_getArrayInitializedElts(self: ?*const struct_ZigClangAPValue) c_uint;
744pub extern fn ZigClangAPValue_getArrayInitializedElt(self: ?*const struct_ZigClangAPValue, i: c_uint) ?*const struct_ZigClangAPValue;
745pub extern fn ZigClangAPValue_getArrayFiller(self: ?*const struct_ZigClangAPValue) ?*const struct_ZigClangAPValue;
746pub extern fn ZigClangAPValue_getArraySize(self: ?*const struct_ZigClangAPValue) c_uint;
747pub extern fn ZigClangAPValue_getLValueBase(self: ?*const struct_ZigClangAPValue) struct_ZigClangAPValueLValueBase;
748pub extern fn ZigClangAPSInt_isSigned(self: ?*const struct_ZigClangAPSInt) bool;
749pub extern fn ZigClangAPSInt_isNegative(self: ?*const struct_ZigClangAPSInt) bool;
750pub extern fn ZigClangAPSInt_negate(self: ?*const struct_ZigClangAPSInt) ?*const struct_ZigClangAPSInt;
751pub extern fn ZigClangAPSInt_free(self: ?*const struct_ZigClangAPSInt) void;
752pub extern fn ZigClangAPSInt_getRawData(self: ?*const struct_ZigClangAPSInt) [*c]const u64;
753pub extern fn ZigClangAPSInt_getNumWords(self: ?*const struct_ZigClangAPSInt) c_uint;
754pub extern fn ZigClangAPValueLValueBase_dyn_cast_Expr(self: struct_ZigClangAPValueLValueBase) ?*const struct_ZigClangExpr;
755pub extern fn ZigClangASTUnit_delete(self: ?*struct_ZigClangASTUnit) void;
756
757pub extern fn ZigClangFunctionDecl_getType(self: *const ZigClangFunctionDecl) struct_ZigClangQualType;
758pub extern fn ZigClangFunctionDecl_getLocation(self: *const ZigClangFunctionDecl) struct_ZigClangSourceLocation;
759pub extern fn ZigClangFunctionDecl_hasBody(self: *const ZigClangFunctionDecl) bool;
760pub extern fn ZigClangFunctionDecl_getStorageClass(self: *const ZigClangFunctionDecl) ZigClangStorageClass;
761pub extern fn ZigClangFunctionDecl_getParamDecl(self: *const ZigClangFunctionDecl, i: c_uint) *const struct_ZigClangParmVarDecl;
762pub extern fn ZigClangFunctionDecl_getBody(self: *const ZigClangFunctionDecl) *const struct_ZigClangStmt;
763
764pub extern fn ZigClangBuiltinType_getKind(self: *const struct_ZigClangBuiltinType) ZigClangBuiltinTypeKind;
765
766pub extern fn ZigClangFunctionType_getNoReturnAttr(self: *const ZigClangFunctionType) bool;
767pub extern fn ZigClangFunctionType_getCallConv(self: *const ZigClangFunctionType) ZigClangCallingConv;
768pub extern fn ZigClangFunctionType_getReturnType(self: *const ZigClangFunctionType) ZigClangQualType;
769
770pub extern fn ZigClangFunctionProtoType_isVariadic(self: *const struct_ZigClangFunctionProtoType) bool;
771pub extern fn ZigClangFunctionProtoType_getNumParams(self: *const struct_ZigClangFunctionProtoType) c_uint;
772pub extern fn ZigClangFunctionProtoType_getParamType(self: *const struct_ZigClangFunctionProtoType, i: c_uint) ZigClangQualType;
773
774pub const ZigClangSourceLocation = struct_ZigClangSourceLocation;
775pub const ZigClangQualType = struct_ZigClangQualType;
776pub const ZigClangAPValueLValueBase = struct_ZigClangAPValueLValueBase;
777pub const ZigClangAPValue = struct_ZigClangAPValue;
778pub const ZigClangAPSInt = struct_ZigClangAPSInt;
779pub const ZigClangAPFloat = struct_ZigClangAPFloat;
780pub const ZigClangASTContext = struct_ZigClangASTContext;
781pub const ZigClangASTUnit = struct_ZigClangASTUnit;
782pub const ZigClangArraySubscriptExpr = struct_ZigClangArraySubscriptExpr;
783pub const ZigClangArrayType = struct_ZigClangArrayType;
784pub const ZigClangAttributedType = struct_ZigClangAttributedType;
785pub const ZigClangBinaryOperator = struct_ZigClangBinaryOperator;
786pub const ZigClangBreakStmt = struct_ZigClangBreakStmt;
787pub const ZigClangBuiltinType = struct_ZigClangBuiltinType;
788pub const ZigClangCStyleCastExpr = struct_ZigClangCStyleCastExpr;
789pub const ZigClangCallExpr = struct_ZigClangCallExpr;
790pub const ZigClangCaseStmt = struct_ZigClangCaseStmt;
791pub const ZigClangCompoundAssignOperator = struct_ZigClangCompoundAssignOperator;
792pub const ZigClangCompoundStmt = struct_ZigClangCompoundStmt;
793pub const ZigClangConditionalOperator = struct_ZigClangConditionalOperator;
794pub const ZigClangConstantArrayType = struct_ZigClangConstantArrayType;
795pub const ZigClangContinueStmt = struct_ZigClangContinueStmt;
796pub const ZigClangDecayedType = struct_ZigClangDecayedType;
797pub const ZigClangDecl = struct_ZigClangDecl;
798pub const ZigClangDeclRefExpr = struct_ZigClangDeclRefExpr;
799pub const ZigClangDeclStmt = struct_ZigClangDeclStmt;
800pub const ZigClangDefaultStmt = struct_ZigClangDefaultStmt;
801pub const ZigClangDiagnosticOptions = struct_ZigClangDiagnosticOptions;
802pub const ZigClangDiagnosticsEngine = struct_ZigClangDiagnosticsEngine;
803pub const ZigClangDoStmt = struct_ZigClangDoStmt;
804pub const ZigClangElaboratedType = struct_ZigClangElaboratedType;
805pub const ZigClangEnumConstantDecl = struct_ZigClangEnumConstantDecl;
806pub const ZigClangEnumDecl = struct_ZigClangEnumDecl;
807pub const ZigClangEnumType = struct_ZigClangEnumType;
808pub const ZigClangExpr = struct_ZigClangExpr;
809pub const ZigClangFieldDecl = struct_ZigClangFieldDecl;
810pub const ZigClangFileID = struct_ZigClangFileID;
811pub const ZigClangForStmt = struct_ZigClangForStmt;
812pub const ZigClangFullSourceLoc = struct_ZigClangFullSourceLoc;
813pub const ZigClangFunctionDecl = struct_ZigClangFunctionDecl;
814pub const ZigClangFunctionProtoType = struct_ZigClangFunctionProtoType;
815pub const ZigClangIfStmt = struct_ZigClangIfStmt;
816pub const ZigClangImplicitCastExpr = struct_ZigClangImplicitCastExpr;
817pub const ZigClangIncompleteArrayType = struct_ZigClangIncompleteArrayType;
818pub const ZigClangIntegerLiteral = struct_ZigClangIntegerLiteral;
819pub const ZigClangMacroDefinitionRecord = struct_ZigClangMacroDefinitionRecord;
820pub const ZigClangMemberExpr = struct_ZigClangMemberExpr;
821pub const ZigClangNamedDecl = struct_ZigClangNamedDecl;
822pub const ZigClangNone = struct_ZigClangNone;
823pub const ZigClangPCHContainerOperations = struct_ZigClangPCHContainerOperations;
824pub const ZigClangParenExpr = struct_ZigClangParenExpr;
825pub const ZigClangParenType = struct_ZigClangParenType;
826pub const ZigClangParmVarDecl = struct_ZigClangParmVarDecl;
827pub const ZigClangPointerType = struct_ZigClangPointerType;
828pub const ZigClangPreprocessedEntity = struct_ZigClangPreprocessedEntity;
829pub const ZigClangRecordDecl = struct_ZigClangRecordDecl;
830pub const ZigClangRecordType = struct_ZigClangRecordType;
831pub const ZigClangReturnStmt = struct_ZigClangReturnStmt;
832pub const ZigClangSkipFunctionBodiesScope = struct_ZigClangSkipFunctionBodiesScope;
833pub const ZigClangSourceManager = struct_ZigClangSourceManager;
834pub const ZigClangSourceRange = struct_ZigClangSourceRange;
835pub const ZigClangStmt = struct_ZigClangStmt;
836pub const ZigClangStringLiteral = struct_ZigClangStringLiteral;
837pub const ZigClangStringRef = struct_ZigClangStringRef;
838pub const ZigClangSwitchStmt = struct_ZigClangSwitchStmt;
839pub const ZigClangTagDecl = struct_ZigClangTagDecl;
840pub const ZigClangType = struct_ZigClangType;
841pub const ZigClangTypedefNameDecl = struct_ZigClangTypedefNameDecl;
842pub const ZigClangTypedefType = struct_ZigClangTypedefType;
843pub const ZigClangUnaryExprOrTypeTraitExpr = struct_ZigClangUnaryExprOrTypeTraitExpr;
844pub const ZigClangUnaryOperator = struct_ZigClangUnaryOperator;
845pub const ZigClangValueDecl = struct_ZigClangValueDecl;
846pub const ZigClangVarDecl = struct_ZigClangVarDecl;
847pub const ZigClangWhileStmt = struct_ZigClangWhileStmt;
848pub const ZigClangFunctionType = struct_ZigClangFunctionType;
849pub const ZigClangPredefinedExpr = struct_ZigClangPredefinedExpr;
850
851pub const struct_ZigClangSourceLocation = extern struct {
852 ID: c_uint,
853};
854
855pub const Stage2ErrorMsg = extern struct {
856 filename_ptr: ?[*]const u8,
857 filename_len: usize,
858 msg_ptr: [*]const u8,
859 msg_len: usize,
860 // valid until the ASTUnit is freed
861 source: ?[*]const u8,
862 // 0 based
863 line: c_uint,
864 // 0 based
865 column: c_uint,
866 // byte offset into source
867 offset: c_uint,
868};
869
870pub const struct_ZigClangQualType = extern struct {
871 ptr: ?*c_void,
872};
873
874pub const struct_ZigClangAPValueLValueBase = extern struct {
875 Ptr: ?*c_void,
876 CallIndex: c_uint,
877 Version: c_uint,
878};
879
880pub extern fn ZigClangErrorMsg_delete(ptr: [*c]Stage2ErrorMsg, len: usize) void;
881
882pub extern fn ZigClangLoadFromCommandLine(
883 args_begin: [*]?[*]const u8,
884 args_end: [*]?[*]const u8,
885 errors_ptr: *[*]Stage2ErrorMsg,
886 errors_len: *usize,
887 resources_path: [*c]const u8,
888) ?*ZigClangASTUnit;
889
890pub extern fn ZigClangDecl_getKind(decl: *const ZigClangDecl) ZigClangDeclKind;
891pub extern fn ZigClangDecl_getDeclKindName(decl: *const struct_ZigClangDecl) [*]const u8;
892
863893pub const ZigClangCompoundStmt_const_body_iterator = [*c]const *struct_ZigClangStmt;
864894
865895pub extern fn ZigClangCompoundStmt_body_begin(self: *const ZigClangCompoundStmt) ZigClangCompoundStmt_const_body_iterator;