more conversion of translate_c.cpp to use zig_clang.h

Progress: 96%

See #1964
master
Andrew Kelley 2019-10-01 23:04:27 -04:00
parent a8d6954c23
commit f84086132f
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
3 changed files with 952 additions and 491 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1310,6 +1310,43 @@ static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind
static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF16 == clang::StringLiteral::UTF16, "");
static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF32 == clang::StringLiteral::UTF32, "");
void ZigClang_detect_enum_CharacterKind(clang::CharacterLiteral::CharacterKind x) {
switch (x) {
case clang::CharacterLiteral::Ascii:
case clang::CharacterLiteral::Wide:
case clang::CharacterLiteral::UTF8:
case clang::CharacterLiteral::UTF16:
case clang::CharacterLiteral::UTF32:
break;
}
}
static_assert((clang::CharacterLiteral::CharacterKind)ZigClangCharacterLiteral_CharacterKind_Ascii == clang::CharacterLiteral::Ascii, "");
static_assert((clang::CharacterLiteral::CharacterKind)ZigClangCharacterLiteral_CharacterKind_Wide == clang::CharacterLiteral::Wide, "");
static_assert((clang::CharacterLiteral::CharacterKind)ZigClangCharacterLiteral_CharacterKind_UTF8 == clang::CharacterLiteral::UTF8, "");
static_assert((clang::CharacterLiteral::CharacterKind)ZigClangCharacterLiteral_CharacterKind_UTF16 == clang::CharacterLiteral::UTF16, "");
static_assert((clang::CharacterLiteral::CharacterKind)ZigClangCharacterLiteral_CharacterKind_UTF32 == clang::CharacterLiteral::UTF32, "");
void ZigClang_detect_enum_ElaboratedTypeKeyword(clang::ElaboratedTypeKeyword x) {
switch (x) {
case clang::ETK_Struct:
case clang::ETK_Interface:
case clang::ETK_Union:
case clang::ETK_Class:
case clang::ETK_Enum:
case clang::ETK_Typename:
case clang::ETK_None:
break;
}
}
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_Struct == clang::ETK_Struct, "");
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_Interface == clang::ETK_Interface, "");
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_Union == clang::ETK_Union, "");
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_Class == clang::ETK_Class, "");
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_Enum == clang::ETK_Enum, "");
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_Typename == clang::ETK_Typename, "");
static_assert((clang::ElaboratedTypeKeyword)ZigClangETK_None == clang::ETK_None, "");
static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), "");
static_assert(sizeof(ZigClangSourceLocation) == sizeof(clang::SourceLocation), "");
@ -1741,6 +1778,11 @@ unsigned ZigClangAPSInt_getNumWords(const ZigClangAPSInt *self) {
return casted->getNumWords();
}
uint64_t ZigClangAPInt_getLimitedValue(const ZigClangAPInt *self, uint64_t limit) {
auto casted = reinterpret_cast<const llvm::APInt *>(self);
return casted->getLimitedValue(limit);
}
const ZigClangExpr *ZigClangAPValueLValueBase_dyn_cast_Expr(ZigClangAPValueLValueBase self) {
clang::APValue::LValueBase casted = bitcast(self);
const clang::Expr *expr = casted.dyn_cast<const clang::Expr *>();
@ -1916,6 +1958,11 @@ struct ZigClangQualType ZigClangFunctionProtoType_getParamType(const struct ZigC
return bitcast(casted->getParamType(index));
}
struct ZigClangQualType ZigClangFunctionProtoType_getReturnType(const struct ZigClangFunctionProtoType *self) {
auto casted = reinterpret_cast<const clang::FunctionProtoType *>(self);
return bitcast(casted->getReturnType());
}
ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_begin(const struct ZigClangCompoundStmt *self) {
auto casted = reinterpret_cast<const clang::CompoundStmt *>(self);
return bitcast(casted->body_begin());
@ -1936,6 +1983,11 @@ ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_end(const struct ZigC
return bitcast(casted->decl_end());
}
ZigClangSourceLocation ZigClangDeclStmt_getBeginLoc(const struct ZigClangDeclStmt *self) {
auto casted = reinterpret_cast<const clang::DeclStmt *>(self);
return bitcast(casted->getBeginLoc());
}
unsigned ZigClangAPFloat_convertToHexString(const ZigClangAPFloat *self, char *DST,
unsigned HexDigits, bool UpperCase, enum ZigClangAPFloat_roundingMode RM)
{
@ -1983,11 +2035,31 @@ struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangAr
return bitcast(casted->getElementType());
}
struct ZigClangQualType ZigClangIncompleteArrayType_getElementType(const struct ZigClangIncompleteArrayType *self) {
auto casted = reinterpret_cast<const clang::IncompleteArrayType *>(self);
return bitcast(casted->getElementType());
}
struct ZigClangQualType ZigClangConstantArrayType_getElementType(const struct ZigClangConstantArrayType *self) {
auto casted = reinterpret_cast<const clang::ConstantArrayType *>(self);
return bitcast(casted->getElementType());
}
const struct ZigClangAPInt *ZigClangConstantArrayType_getSize(const struct ZigClangConstantArrayType *self) {
auto casted = reinterpret_cast<const clang::ConstantArrayType *>(self);
return reinterpret_cast<const ZigClangAPInt *>(&casted->getSize());
}
const struct ZigClangValueDecl *ZigClangDeclRefExpr_getDecl(const struct ZigClangDeclRefExpr *self) {
auto casted = reinterpret_cast<const clang::DeclRefExpr *>(self);
return reinterpret_cast<const struct ZigClangValueDecl *>(casted->getDecl());
}
const struct ZigClangNamedDecl *ZigClangDeclRefExpr_getFoundDecl(const struct ZigClangDeclRefExpr *self) {
auto casted = reinterpret_cast<const clang::DeclRefExpr *>(self);
return reinterpret_cast<const struct ZigClangNamedDecl *>(casted->getFoundDecl());
}
struct ZigClangQualType ZigClangParenType_getInnerType(const struct ZigClangParenType *self) {
auto casted = reinterpret_cast<const clang::ParenType *>(self);
return bitcast(casted->getInnerType());
@ -2003,6 +2075,11 @@ struct ZigClangQualType ZigClangElaboratedType_getNamedType(const struct ZigClan
return bitcast(casted->getNamedType());
}
enum ZigClangElaboratedTypeKeyword ZigClangElaboratedType_getKeyword(const struct ZigClangElaboratedType *self) {
auto casted = reinterpret_cast<const clang::ElaboratedType *>(self);
return (ZigClangElaboratedTypeKeyword)casted->getKeyword();
}
struct ZigClangSourceLocation ZigClangCStyleCastExpr_getBeginLoc(const struct ZigClangCStyleCastExpr *self) {
auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
return bitcast(casted->getBeginLoc());
@ -2063,3 +2140,259 @@ struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBina
auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
return bitcast(casted->getType());
}
struct ZigClangQualType ZigClangDecayedType_getDecayedType(const struct ZigClangDecayedType *self) {
auto casted = reinterpret_cast<const clang::DecayedType *>(self);
return bitcast(casted->getDecayedType());
}
const struct ZigClangCompoundStmt *ZigClangStmtExpr_getSubStmt(const struct ZigClangStmtExpr *self) {
auto casted = reinterpret_cast<const clang::StmtExpr *>(self);
return reinterpret_cast<const ZigClangCompoundStmt *>(casted->getSubStmt());
}
struct ZigClangSourceLocation ZigClangCharacterLiteral_getBeginLoc(const struct ZigClangCharacterLiteral *self) {
auto casted = reinterpret_cast<const clang::CharacterLiteral *>(self);
return bitcast(casted->getBeginLoc());
}
enum ZigClangCharacterLiteral_CharacterKind ZigClangCharacterLiteral_getKind(const struct ZigClangCharacterLiteral *self) {
auto casted = reinterpret_cast<const clang::CharacterLiteral *>(self);
return (ZigClangCharacterLiteral_CharacterKind)casted->getKind();
}
unsigned ZigClangCharacterLiteral_getValue(const struct ZigClangCharacterLiteral *self) {
auto casted = reinterpret_cast<const clang::CharacterLiteral *>(self);
return casted->getValue();
}
const struct ZigClangExpr *ZigClangConditionalOperator_getCond(const struct ZigClangConditionalOperator *self) {
auto casted = reinterpret_cast<const clang::ConditionalOperator *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
}
const struct ZigClangExpr *ZigClangConditionalOperator_getTrueExpr(const struct ZigClangConditionalOperator *self) {
auto casted = reinterpret_cast<const clang::ConditionalOperator *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getTrueExpr());
}
const struct ZigClangExpr *ZigClangConditionalOperator_getFalseExpr(const struct ZigClangConditionalOperator *self) {
auto casted = reinterpret_cast<const clang::ConditionalOperator *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getFalseExpr());
}
struct ZigClangQualType ZigClangCompoundAssignOperator_getType(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return bitcast(casted->getType());
}
struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationLHSType(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return bitcast(casted->getComputationLHSType());
}
struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationResultType(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return bitcast(casted->getComputationResultType());
}
struct ZigClangSourceLocation ZigClangCompoundAssignOperator_getBeginLoc(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return bitcast(casted->getBeginLoc());
}
enum ZigClangBO ZigClangCompoundAssignOperator_getOpcode(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return (ZigClangBO)casted->getOpcode();
}
const struct ZigClangExpr *ZigClangCompoundAssignOperator_getLHS(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getLHS());
}
const struct ZigClangExpr *ZigClangCompoundAssignOperator_getRHS(const struct ZigClangCompoundAssignOperator *self) {
auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
}
enum ZigClangUO ZigClangUnaryOperator_getOpcode(const struct ZigClangUnaryOperator *self) {
auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
return (ZigClangUO)casted->getOpcode();
}
struct ZigClangQualType ZigClangUnaryOperator_getType(const struct ZigClangUnaryOperator *self) {
auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
return bitcast(casted->getType());
}
const struct ZigClangExpr *ZigClangUnaryOperator_getSubExpr(const struct ZigClangUnaryOperator *self) {
auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
}
struct ZigClangSourceLocation ZigClangUnaryOperator_getBeginLoc(const struct ZigClangUnaryOperator *self) {
auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
return bitcast(casted->getBeginLoc());
}
const struct ZigClangExpr *ZigClangWhileStmt_getCond(const struct ZigClangWhileStmt *self) {
auto casted = reinterpret_cast<const clang::WhileStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
}
const struct ZigClangStmt *ZigClangWhileStmt_getBody(const struct ZigClangWhileStmt *self) {
auto casted = reinterpret_cast<const clang::WhileStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
}
const struct ZigClangStmt *ZigClangIfStmt_getThen(const struct ZigClangIfStmt *self) {
auto casted = reinterpret_cast<const clang::IfStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getThen());
}
const struct ZigClangStmt *ZigClangIfStmt_getElse(const struct ZigClangIfStmt *self) {
auto casted = reinterpret_cast<const clang::IfStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getElse());
}
const struct ZigClangExpr *ZigClangIfStmt_getCond(const struct ZigClangIfStmt *self) {
auto casted = reinterpret_cast<const clang::IfStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
}
const struct ZigClangExpr *ZigClangCallExpr_getCallee(const struct ZigClangCallExpr *self) {
auto casted = reinterpret_cast<const clang::CallExpr *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCallee());
}
unsigned ZigClangCallExpr_getNumArgs(const struct ZigClangCallExpr *self) {
auto casted = reinterpret_cast<const clang::CallExpr *>(self);
return casted->getNumArgs();
}
const struct ZigClangExpr * const * ZigClangCallExpr_getArgs(const struct ZigClangCallExpr *self) {
auto casted = reinterpret_cast<const clang::CallExpr *>(self);
return reinterpret_cast<const struct ZigClangExpr * const*>(casted->getArgs());
}
const struct ZigClangExpr * ZigClangMemberExpr_getBase(const struct ZigClangMemberExpr *self) {
auto casted = reinterpret_cast<const clang::MemberExpr *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getBase());
}
bool ZigClangMemberExpr_isArrow(const struct ZigClangMemberExpr *self) {
auto casted = reinterpret_cast<const clang::MemberExpr *>(self);
return casted->isArrow();
}
const struct ZigClangValueDecl * ZigClangMemberExpr_getMemberDecl(const struct ZigClangMemberExpr *self) {
auto casted = reinterpret_cast<const clang::MemberExpr *>(self);
return reinterpret_cast<const struct ZigClangValueDecl *>(casted->getMemberDecl());
}
const struct ZigClangExpr *ZigClangArraySubscriptExpr_getBase(const struct ZigClangArraySubscriptExpr *self) {
auto casted = reinterpret_cast<const clang::ArraySubscriptExpr *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getBase());
}
const struct ZigClangExpr *ZigClangArraySubscriptExpr_getIdx(const struct ZigClangArraySubscriptExpr *self) {
auto casted = reinterpret_cast<const clang::ArraySubscriptExpr *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getIdx());
}
struct ZigClangQualType ZigClangUnaryExprOrTypeTraitExpr_getTypeOfArgument(
const struct ZigClangUnaryExprOrTypeTraitExpr *self)
{
auto casted = reinterpret_cast<const clang::UnaryExprOrTypeTraitExpr *>(self);
return bitcast(casted->getTypeOfArgument());
}
struct ZigClangSourceLocation ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc(
const struct ZigClangUnaryExprOrTypeTraitExpr *self)
{
auto casted = reinterpret_cast<const clang::UnaryExprOrTypeTraitExpr *>(self);
return bitcast(casted->getBeginLoc());
}
const struct ZigClangStmt *ZigClangDoStmt_getBody(const struct ZigClangDoStmt *self) {
auto casted = reinterpret_cast<const clang::DoStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
}
const struct ZigClangExpr *ZigClangDoStmt_getCond(const struct ZigClangDoStmt *self) {
auto casted = reinterpret_cast<const clang::DoStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
}
const struct ZigClangStmt *ZigClangForStmt_getInit(const struct ZigClangForStmt *self) {
auto casted = reinterpret_cast<const clang::ForStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getInit());
}
const struct ZigClangExpr *ZigClangForStmt_getCond(const struct ZigClangForStmt *self) {
auto casted = reinterpret_cast<const clang::ForStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
}
const struct ZigClangExpr *ZigClangForStmt_getInc(const struct ZigClangForStmt *self) {
auto casted = reinterpret_cast<const clang::ForStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getInc());
}
const struct ZigClangStmt *ZigClangForStmt_getBody(const struct ZigClangForStmt *self) {
auto casted = reinterpret_cast<const clang::ForStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
}
const struct ZigClangDeclStmt *ZigClangSwitchStmt_getConditionVariableDeclStmt(
const struct ZigClangSwitchStmt *self)
{
auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
return reinterpret_cast<const struct ZigClangDeclStmt *>(casted->getConditionVariableDeclStmt());
}
const struct ZigClangExpr *ZigClangSwitchStmt_getCond(const struct ZigClangSwitchStmt *self) {
auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
}
const struct ZigClangStmt *ZigClangSwitchStmt_getBody(const struct ZigClangSwitchStmt *self) {
auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
}
bool ZigClangSwitchStmt_isAllEnumCasesCovered(const struct ZigClangSwitchStmt *self) {
auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
return casted->isAllEnumCasesCovered();
}
const struct ZigClangExpr *ZigClangCaseStmt_getLHS(const struct ZigClangCaseStmt *self) {
auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getLHS());
}
const struct ZigClangExpr *ZigClangCaseStmt_getRHS(const struct ZigClangCaseStmt *self) {
auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
}
struct ZigClangSourceLocation ZigClangCaseStmt_getBeginLoc(const struct ZigClangCaseStmt *self) {
auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
return bitcast(casted->getBeginLoc());
}
const struct ZigClangStmt *ZigClangCaseStmt_getSubStmt(const struct ZigClangCaseStmt *self) {
auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getSubStmt());
}
const struct ZigClangStmt *ZigClangDefaultStmt_getSubStmt(const struct ZigClangDefaultStmt *self) {
auto casted = reinterpret_cast<const clang::DefaultStmt *>(self);
return reinterpret_cast<const struct ZigClangStmt *>(casted->getSubStmt());
}
const struct ZigClangExpr *ZigClangParenExpr_getSubExpr(const struct ZigClangParenExpr *self) {
auto casted = reinterpret_cast<const clang::ParenExpr *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
}

View File

@ -64,9 +64,10 @@ struct ZigClangExprEvalResult {
ZigClangAPValue Val;
};
struct ZigClangAPValue;
struct ZigClangAPSInt;
struct ZigClangAPFloat;
struct ZigClangAPInt;
struct ZigClangAPSInt;
struct ZigClangAPValue;
struct ZigClangASTContext;
struct ZigClangASTUnit;
struct ZigClangArraySubscriptExpr;
@ -78,10 +79,12 @@ struct ZigClangBuiltinType;
struct ZigClangCStyleCastExpr;
struct ZigClangCallExpr;
struct ZigClangCaseStmt;
struct ZigClangCharacterLiteral;
struct ZigClangCompoundAssignOperator;
struct ZigClangCompoundStmt;
struct ZigClangConditionalOperator;
struct ZigClangConstantArrayType;
struct ZigClangConstantExpr;
struct ZigClangContinueStmt;
struct ZigClangDecayedType;
struct ZigClangDecl;
@ -98,10 +101,12 @@ struct ZigClangEnumType;
struct ZigClangExpr;
struct ZigClangFieldDecl;
struct ZigClangFileID;
struct ZigClangFloatingLiteral;
struct ZigClangForStmt;
struct ZigClangFullSourceLoc;
struct ZigClangFunctionDecl;
struct ZigClangFunctionProtoType;
struct ZigClangFunctionType;
struct ZigClangIfStmt;
struct ZigClangImplicitCastExpr;
struct ZigClangIncompleteArrayType;
@ -115,6 +120,7 @@ struct ZigClangParenExpr;
struct ZigClangParenType;
struct ZigClangParmVarDecl;
struct ZigClangPointerType;
struct ZigClangPredefinedExpr;
struct ZigClangPreprocessedEntity;
struct ZigClangRecordDecl;
struct ZigClangRecordType;
@ -123,6 +129,7 @@ struct ZigClangSkipFunctionBodiesScope;
struct ZigClangSourceManager;
struct ZigClangSourceRange;
struct ZigClangStmt;
struct ZigClangStmtExpr;
struct ZigClangStringLiteral;
struct ZigClangStringRef;
struct ZigClangSwitchStmt;
@ -135,8 +142,6 @@ struct ZigClangUnaryOperator;
struct ZigClangValueDecl;
struct ZigClangVarDecl;
struct ZigClangWhileStmt;
struct ZigClangFunctionType;
struct ZigClangPredefinedExpr;
typedef struct ZigClangStmt *const * ZigClangCompoundStmt_const_body_iterator;
typedef struct ZigClangDecl *const * ZigClangDeclStmt_const_decl_iterator;
@ -761,12 +766,30 @@ enum ZigClangStringLiteral_StringKind {
ZigClangStringLiteral_StringKind_UTF32,
};
enum ZigClangCharacterLiteral_CharacterKind {
ZigClangCharacterLiteral_CharacterKind_Ascii,
ZigClangCharacterLiteral_CharacterKind_Wide,
ZigClangCharacterLiteral_CharacterKind_UTF8,
ZigClangCharacterLiteral_CharacterKind_UTF16,
ZigClangCharacterLiteral_CharacterKind_UTF32,
};
enum ZigClangVarDecl_TLSKind {
ZigClangVarDecl_TLSKind_None,
ZigClangVarDecl_TLSKind_Static,
ZigClangVarDecl_TLSKind_Dynamic,
};
enum ZigClangElaboratedTypeKeyword {
ZigClangETK_Struct,
ZigClangETK_Interface,
ZigClangETK_Union,
ZigClangETK_Class,
ZigClangETK_Enum,
ZigClangETK_Typename,
ZigClangETK_None,
};
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangSourceManager_getSpellingLoc(const struct ZigClangSourceManager *,
struct ZigClangSourceLocation Loc);
ZIG_EXTERN_C const char *ZigClangSourceManager_getFilename(const struct ZigClangSourceManager *,
@ -872,6 +895,8 @@ ZIG_EXTERN_C void ZigClangAPSInt_free(const struct ZigClangAPSInt *self);
ZIG_EXTERN_C const uint64_t *ZigClangAPSInt_getRawData(const struct ZigClangAPSInt *self);
ZIG_EXTERN_C unsigned ZigClangAPSInt_getNumWords(const struct ZigClangAPSInt *self);
ZIG_EXTERN_C uint64_t ZigClangAPInt_getLimitedValue(const struct ZigClangAPInt *self, uint64_t limit);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangAPValueLValueBase_dyn_cast_Expr(struct ZigClangAPValueLValueBase self);
ZIG_EXTERN_C enum ZigClangBuiltinTypeKind ZigClangBuiltinType_getKind(const struct ZigClangBuiltinType *self);
@ -883,6 +908,7 @@ ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionType_getReturnType(const st
ZIG_EXTERN_C bool ZigClangFunctionProtoType_isVariadic(const struct ZigClangFunctionProtoType *self);
ZIG_EXTERN_C unsigned ZigClangFunctionProtoType_getNumParams(const struct ZigClangFunctionProtoType *self);
ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionProtoType_getParamType(const struct ZigClangFunctionProtoType *self, unsigned i);
ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionProtoType_getReturnType(const struct ZigClangFunctionProtoType *self);
ZIG_EXTERN_C ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_begin(const struct ZigClangCompoundStmt *self);
@ -890,6 +916,7 @@ ZIG_EXTERN_C ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_
ZIG_EXTERN_C ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_begin(const struct ZigClangDeclStmt *self);
ZIG_EXTERN_C ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_end(const struct ZigClangDeclStmt *self);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangDeclStmt_getBeginLoc(const struct ZigClangDeclStmt *self);
ZIG_EXTERN_C unsigned ZigClangAPFloat_convertToHexString(const struct ZigClangAPFloat *self, char *DST,
unsigned HexDigits, bool UpperCase, enum ZigClangAPFloat_roundingMode RM);
@ -907,13 +934,20 @@ ZIG_EXTERN_C const struct ZigClangExpr *ZigClangImplicitCastExpr_getSubExpr(cons
ZIG_EXTERN_C struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangArrayType *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangIncompleteArrayType_getElementType(const struct ZigClangIncompleteArrayType *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangConstantArrayType_getElementType(const struct ZigClangConstantArrayType *);
ZIG_EXTERN_C const struct ZigClangAPInt *ZigClangConstantArrayType_getSize(const struct ZigClangConstantArrayType *);
ZIG_EXTERN_C const struct ZigClangValueDecl *ZigClangDeclRefExpr_getDecl(const struct ZigClangDeclRefExpr *);
ZIG_EXTERN_C const struct ZigClangNamedDecl *ZigClangDeclRefExpr_getFoundDecl(const struct ZigClangDeclRefExpr *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangParenType_getInnerType(const struct ZigClangParenType *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangAttributedType_getEquivalentType(const struct ZigClangAttributedType *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangElaboratedType_getNamedType(const struct ZigClangElaboratedType *);
ZIG_EXTERN_C enum ZigClangElaboratedTypeKeyword ZigClangElaboratedType_getKeyword(const struct ZigClangElaboratedType *);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCStyleCastExpr_getBeginLoc(const struct ZigClangCStyleCastExpr *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCStyleCastExpr_getSubExpr(const struct ZigClangCStyleCastExpr *);
@ -930,4 +964,71 @@ ZIG_EXTERN_C const struct ZigClangExpr *ZigClangBinaryOperator_getLHS(const stru
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangBinaryOperator_getRHS(const struct ZigClangBinaryOperator *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBinaryOperator *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangDecayedType_getDecayedType(const struct ZigClangDecayedType *);
ZIG_EXTERN_C const struct ZigClangCompoundStmt *ZigClangStmtExpr_getSubStmt(const struct ZigClangStmtExpr *);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCharacterLiteral_getBeginLoc(const struct ZigClangCharacterLiteral *);
ZIG_EXTERN_C enum ZigClangCharacterLiteral_CharacterKind ZigClangCharacterLiteral_getKind(const struct ZigClangCharacterLiteral *);
ZIG_EXTERN_C unsigned ZigClangCharacterLiteral_getValue(const struct ZigClangCharacterLiteral *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangConditionalOperator_getCond(const struct ZigClangConditionalOperator *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangConditionalOperator_getTrueExpr(const struct ZigClangConditionalOperator *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangConditionalOperator_getFalseExpr(const struct ZigClangConditionalOperator *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangCompoundAssignOperator_getType(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationLHSType(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationResultType(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCompoundAssignOperator_getBeginLoc(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C enum ZigClangBO ZigClangCompoundAssignOperator_getOpcode(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCompoundAssignOperator_getLHS(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCompoundAssignOperator_getRHS(const struct ZigClangCompoundAssignOperator *);
ZIG_EXTERN_C enum ZigClangUO ZigClangUnaryOperator_getOpcode(const struct ZigClangUnaryOperator *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangUnaryOperator_getType(const struct ZigClangUnaryOperator *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangUnaryOperator_getSubExpr(const struct ZigClangUnaryOperator *);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangUnaryOperator_getBeginLoc(const struct ZigClangUnaryOperator *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangWhileStmt_getCond(const struct ZigClangWhileStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangWhileStmt_getBody(const struct ZigClangWhileStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangIfStmt_getThen(const struct ZigClangIfStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangIfStmt_getElse(const struct ZigClangIfStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangIfStmt_getCond(const struct ZigClangIfStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCallExpr_getCallee(const struct ZigClangCallExpr *);
ZIG_EXTERN_C unsigned ZigClangCallExpr_getNumArgs(const struct ZigClangCallExpr *);
ZIG_EXTERN_C const struct ZigClangExpr * const * ZigClangCallExpr_getArgs(const struct ZigClangCallExpr *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangMemberExpr_getBase(const struct ZigClangMemberExpr *);
ZIG_EXTERN_C bool ZigClangMemberExpr_isArrow(const struct ZigClangMemberExpr *);
ZIG_EXTERN_C const struct ZigClangValueDecl * ZigClangMemberExpr_getMemberDecl(const struct ZigClangMemberExpr *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangArraySubscriptExpr_getBase(const struct ZigClangArraySubscriptExpr *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangArraySubscriptExpr_getIdx(const struct ZigClangArraySubscriptExpr *);
ZIG_EXTERN_C struct ZigClangQualType ZigClangUnaryExprOrTypeTraitExpr_getTypeOfArgument(const struct ZigClangUnaryExprOrTypeTraitExpr *);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc(const struct ZigClangUnaryExprOrTypeTraitExpr *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangDoStmt_getBody(const struct ZigClangDoStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangDoStmt_getCond(const struct ZigClangDoStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangForStmt_getInit(const struct ZigClangForStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangForStmt_getCond(const struct ZigClangForStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangForStmt_getInc(const struct ZigClangForStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangForStmt_getBody(const struct ZigClangForStmt *);
ZIG_EXTERN_C const struct ZigClangDeclStmt *ZigClangSwitchStmt_getConditionVariableDeclStmt(const struct ZigClangSwitchStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangSwitchStmt_getCond(const struct ZigClangSwitchStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangSwitchStmt_getBody(const struct ZigClangSwitchStmt *);
ZIG_EXTERN_C bool ZigClangSwitchStmt_isAllEnumCasesCovered(const struct ZigClangSwitchStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCaseStmt_getLHS(const struct ZigClangCaseStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCaseStmt_getRHS(const struct ZigClangCaseStmt *);
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCaseStmt_getBeginLoc(const struct ZigClangCaseStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangCaseStmt_getSubStmt(const struct ZigClangCaseStmt *);
ZIG_EXTERN_C const struct ZigClangStmt *ZigClangDefaultStmt_getSubStmt(const struct ZigClangDefaultStmt *);
ZIG_EXTERN_C const struct ZigClangExpr *ZigClangParenExpr_getSubExpr(const struct ZigClangParenExpr *);
#endif