| ... | ... | @@ -116,16 +116,20 @@ static AstNode *resolve_record_decl(Context *c, const ZigClangRecordDecl *record |
| 116 | 116 | static AstNode *resolve_enum_decl(Context *c, const ZigClangEnumDecl *enum_decl); |
| 117 | 117 | static AstNode *resolve_typedef_decl(Context *c, const ZigClangTypedefNameDecl *typedef_decl); |
| 118 | 118 | |
| 119 | | static int trans_stmt_extra(Context *c, TransScope *scope, const clang::Stmt *stmt, |
| 119 | static int trans_stmt_extra(Context *c, TransScope *scope, const ZigClangStmt *stmt, |
| 120 | 120 | ResultUsed result_used, TransLRValue lrval, |
| 121 | 121 | AstNode **out_node, TransScope **out_child_scope, |
| 122 | 122 | TransScope **out_node_scope); |
| 123 | | static TransScope *trans_stmt(Context *c, TransScope *scope, const clang::Stmt *stmt, AstNode **out_node); |
| 123 | static TransScope *trans_stmt(Context *c, TransScope *scope, const ZigClangStmt *stmt, AstNode **out_node); |
| 124 | 124 | static AstNode *trans_expr(Context *c, ResultUsed result_used, TransScope *scope, const clang::Expr *expr, TransLRValue lrval); |
| 125 | 125 | static AstNode *trans_qual_type(Context *c, ZigClangQualType qt, ZigClangSourceLocation source_loc); |
| 126 | 126 | static AstNode *trans_bool_expr(Context *c, ResultUsed result_used, TransScope *scope, const clang::Expr *expr, TransLRValue lrval); |
| 127 | 127 | static AstNode *trans_ap_value(Context *c, clang::APValue *ap_value, ZigClangQualType qt, ZigClangSourceLocation source_loc); |
| 128 | 128 | |
| 129 | static const ZigClangStmt *bitcast(const clang::Stmt *src) { |
| 130 | return reinterpret_cast<const ZigClangStmt *>(src); |
| 131 | } |
| 132 | |
| 129 | 133 | static ZigClangSourceLocation bitcast(clang::SourceLocation src) { |
| 130 | 134 | ZigClangSourceLocation dest; |
| 131 | 135 | memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangSourceLocation)); |
| ... | ... | @@ -1217,9 +1221,11 @@ static int trans_compound_stmt_inline(Context *c, TransScope *scope, const clang |
| 1217 | 1221 | AstNode *block_node, TransScope **out_node_scope) |
| 1218 | 1222 | { |
| 1219 | 1223 | assert(block_node->type == NodeTypeBlock); |
| 1220 | | for (clang::CompoundStmt::const_body_iterator it = stmt->body_begin(), end_it = stmt->body_end(); it != end_it; ++it) { |
| 1224 | for (clang::CompoundStmt::const_body_iterator it = stmt->body_begin(), end_it = stmt->body_end(); |
| 1225 | it != end_it; ++it) |
| 1226 | { |
| 1221 | 1227 | AstNode *child_node; |
| 1222 | | scope = trans_stmt(c, scope, *it, &child_node); |
| 1228 | scope = trans_stmt(c, scope, bitcast(*it), &child_node); |
| 1223 | 1229 | if (scope == nullptr) |
| 1224 | 1230 | return ErrorUnexpected; |
| 1225 | 1231 | if (child_node != nullptr) |
| ... | ... | @@ -2750,7 +2756,7 @@ static AstNode *trans_while_loop(Context *c, TransScope *scope, const clang::Whi |
| 2750 | 2756 | if (while_scope->node->data.while_expr.condition == nullptr) |
| 2751 | 2757 | return nullptr; |
| 2752 | 2758 | |
| 2753 | | TransScope *body_scope = trans_stmt(c, &while_scope->base, stmt->getBody(), |
| 2759 | TransScope *body_scope = trans_stmt(c, &while_scope->base, bitcast(stmt->getBody()), |
| 2754 | 2760 | &while_scope->node->data.while_expr.body); |
| 2755 | 2761 | if (body_scope == nullptr) |
| 2756 | 2762 | return nullptr; |
| ... | ... | @@ -2763,12 +2769,12 @@ static AstNode *trans_if_statement(Context *c, TransScope *scope, const clang::I |
| 2763 | 2769 | // if (c) t else e |
| 2764 | 2770 | AstNode *if_node = trans_create_node(c, NodeTypeIfBoolExpr); |
| 2765 | 2771 | |
| 2766 | | TransScope *then_scope = trans_stmt(c, scope, stmt->getThen(), &if_node->data.if_bool_expr.then_block); |
| 2772 | TransScope *then_scope = trans_stmt(c, scope, bitcast(stmt->getThen()), &if_node->data.if_bool_expr.then_block); |
| 2767 | 2773 | if (then_scope == nullptr) |
| 2768 | 2774 | return nullptr; |
| 2769 | 2775 | |
| 2770 | 2776 | if (stmt->getElse() != nullptr) { |
| 2771 | | TransScope *else_scope = trans_stmt(c, scope, stmt->getElse(), &if_node->data.if_bool_expr.else_node); |
| 2777 | TransScope *else_scope = trans_stmt(c, scope, bitcast(stmt->getElse()), &if_node->data.if_bool_expr.else_node); |
| 2772 | 2778 | if (else_scope == nullptr) |
| 2773 | 2779 | return nullptr; |
| 2774 | 2780 | } |
| ... | ... | @@ -2911,7 +2917,7 @@ static AstNode *trans_do_loop(Context *c, TransScope *parent_scope, const clang: |
| 2911 | 2917 | // zig: } |
| 2912 | 2918 | |
| 2913 | 2919 | // We call the low level function so that we can set child_scope to the scope of the generated block. |
| 2914 | | if (trans_stmt_extra(c, &while_scope->base, stmt->getBody(), ResultUsedNo, TransRValue, &body_node, |
| 2920 | if (trans_stmt_extra(c, &while_scope->base, bitcast(stmt->getBody()), ResultUsedNo, TransRValue, &body_node, |
| 2915 | 2921 | nullptr, &child_scope)) |
| 2916 | 2922 | { |
| 2917 | 2923 | return nullptr; |
| ... | ... | @@ -2929,7 +2935,7 @@ static AstNode *trans_do_loop(Context *c, TransScope *parent_scope, const clang: |
| 2929 | 2935 | TransScopeBlock *child_block_scope = trans_scope_block_create(c, &while_scope->base); |
| 2930 | 2936 | body_node = child_block_scope->node; |
| 2931 | 2937 | AstNode *child_statement; |
| 2932 | | child_scope = trans_stmt(c, &child_block_scope->base, stmt->getBody(), &child_statement); |
| 2938 | child_scope = trans_stmt(c, &child_block_scope->base, bitcast(stmt->getBody()), &child_statement); |
| 2933 | 2939 | if (child_scope == nullptr) return nullptr; |
| 2934 | 2940 | if (child_statement != nullptr) { |
| 2935 | 2941 | body_node->data.block.statements.append(child_statement); |
| ... | ... | @@ -2955,7 +2961,7 @@ static AstNode *trans_for_loop(Context *c, TransScope *parent_scope, const clang |
| 2955 | 2961 | AstNode *loop_block_node; |
| 2956 | 2962 | TransScopeWhile *while_scope; |
| 2957 | 2963 | TransScope *cond_scope; |
| 2958 | | const clang::Stmt *init_stmt = stmt->getInit(); |
| 2964 | const ZigClangStmt *init_stmt = bitcast(stmt->getInit()); |
| 2959 | 2965 | if (init_stmt == nullptr) { |
| 2960 | 2966 | while_scope = trans_scope_while_create(c, parent_scope); |
| 2961 | 2967 | loop_block_node = while_scope->node; |
| ... | ... | @@ -2976,12 +2982,12 @@ static AstNode *trans_for_loop(Context *c, TransScope *parent_scope, const clang |
| 2976 | 2982 | child_scope->node->data.block.statements.append(while_scope->node); |
| 2977 | 2983 | } |
| 2978 | 2984 | |
| 2979 | | const clang::Stmt *cond_stmt = stmt->getCond(); |
| 2985 | const ZigClangStmt *cond_stmt = bitcast(stmt->getCond()); |
| 2980 | 2986 | if (cond_stmt == nullptr) { |
| 2981 | 2987 | while_scope->node->data.while_expr.condition = trans_create_node_bool(c, true); |
| 2982 | 2988 | } else { |
| 2983 | | if (clang::Expr::classof(cond_stmt)) { |
| 2984 | | const clang::Expr *cond_expr = static_cast<const clang::Expr*>(cond_stmt); |
| 2989 | if (ZigClangStmt_classof_Expr(cond_stmt)) { |
| 2990 | const clang::Expr *cond_expr = reinterpret_cast<const clang::Expr*>(cond_stmt); |
| 2985 | 2991 | while_scope->node->data.while_expr.condition = trans_bool_expr(c, ResultUsedYes, cond_scope, cond_expr, TransRValue); |
| 2986 | 2992 | |
| 2987 | 2993 | if (while_scope->node->data.while_expr.condition == nullptr) |
| ... | ... | @@ -2994,7 +3000,7 @@ static AstNode *trans_for_loop(Context *c, TransScope *parent_scope, const clang |
| 2994 | 3000 | } |
| 2995 | 3001 | } |
| 2996 | 3002 | |
| 2997 | | const clang::Stmt *inc_stmt = stmt->getInc(); |
| 3003 | const ZigClangStmt *inc_stmt = bitcast(stmt->getInc()); |
| 2998 | 3004 | if (inc_stmt != nullptr) { |
| 2999 | 3005 | AstNode *inc_node; |
| 3000 | 3006 | TransScope *inc_scope = trans_stmt(c, cond_scope, inc_stmt, &inc_node); |
| ... | ... | @@ -3004,7 +3010,7 @@ static AstNode *trans_for_loop(Context *c, TransScope *parent_scope, const clang |
| 3004 | 3010 | } |
| 3005 | 3011 | |
| 3006 | 3012 | AstNode *body_statement; |
| 3007 | | TransScope *body_scope = trans_stmt(c, &while_scope->base, stmt->getBody(), &body_statement); |
| 3013 | TransScope *body_scope = trans_stmt(c, &while_scope->base, bitcast(stmt->getBody()), &body_statement); |
| 3008 | 3014 | if (body_scope == nullptr) |
| 3009 | 3015 | return nullptr; |
| 3010 | 3016 | |
| ... | ... | @@ -3027,7 +3033,7 @@ static AstNode *trans_switch_stmt(Context *c, TransScope *parent_scope, const cl |
| 3027 | 3033 | switch_scope = trans_scope_switch_create(c, &block_scope->base); |
| 3028 | 3034 | } else { |
| 3029 | 3035 | AstNode *vars_node; |
| 3030 | | TransScope *var_scope = trans_stmt(c, &block_scope->base, var_decl_stmt, &vars_node); |
| 3036 | TransScope *var_scope = trans_stmt(c, &block_scope->base, (const ZigClangStmt *)var_decl_stmt, &vars_node); |
| 3031 | 3037 | if (var_scope == nullptr) |
| 3032 | 3038 | return nullptr; |
| 3033 | 3039 | if (vars_node != nullptr) |
| ... | ... | @@ -3050,8 +3056,8 @@ static AstNode *trans_switch_stmt(Context *c, TransScope *parent_scope, const cl |
| 3050 | 3056 | switch_scope->switch_node->data.switch_expr.expr = expr_node; |
| 3051 | 3057 | |
| 3052 | 3058 | AstNode *body_node; |
| 3053 | | const clang::Stmt *body_stmt = stmt->getBody(); |
| 3054 | | if ((ZigClangStmtClass)body_stmt->getStmtClass() == ZigClangStmt_CompoundStmtClass) { |
| 3059 | const ZigClangStmt *body_stmt = bitcast(stmt->getBody()); |
| 3060 | if (ZigClangStmt_getStmtClass(body_stmt) == ZigClangStmt_CompoundStmtClass) { |
| 3055 | 3061 | if (trans_compound_stmt_inline(c, &switch_scope->base, (const clang::CompoundStmt *)body_stmt, |
| 3056 | 3062 | block_scope->node, nullptr)) |
| 3057 | 3063 | { |
| ... | ... | @@ -3119,7 +3125,7 @@ static int trans_switch_case(Context *c, TransScope *parent_scope, const clang:: |
| 3119 | 3125 | scope_block->node->data.block.statements.append(case_block); |
| 3120 | 3126 | |
| 3121 | 3127 | AstNode *sub_stmt_node; |
| 3122 | | TransScope *new_scope = trans_stmt(c, parent_scope, stmt->getSubStmt(), &sub_stmt_node); |
| 3128 | TransScope *new_scope = trans_stmt(c, parent_scope, bitcast(stmt->getSubStmt()), &sub_stmt_node); |
| 3123 | 3129 | if (new_scope == nullptr) |
| 3124 | 3130 | return ErrorUnexpected; |
| 3125 | 3131 | if (sub_stmt_node != nullptr) |
| ... | ... | @@ -3156,7 +3162,7 @@ static int trans_switch_default(Context *c, TransScope *parent_scope, const clan |
| 3156 | 3162 | scope_block->node->data.block.statements.append(case_block); |
| 3157 | 3163 | |
| 3158 | 3164 | AstNode *sub_stmt_node; |
| 3159 | | TransScope *new_scope = trans_stmt(c, parent_scope, stmt->getSubStmt(), &sub_stmt_node); |
| 3165 | TransScope *new_scope = trans_stmt(c, parent_scope, bitcast(stmt->getSubStmt()), &sub_stmt_node); |
| 3160 | 3166 | if (new_scope == nullptr) |
| 3161 | 3167 | return ErrorUnexpected; |
| 3162 | 3168 | if (sub_stmt_node != nullptr) |
| ... | ... | @@ -3219,12 +3225,12 @@ static int wrap_stmt(AstNode **out_node, TransScope **out_scope, TransScope *in_ |
| 3219 | 3225 | return ErrorNone; |
| 3220 | 3226 | } |
| 3221 | 3227 | |
| 3222 | | static int trans_stmt_extra(Context *c, TransScope *scope, const clang::Stmt *stmt, |
| 3228 | static int trans_stmt_extra(Context *c, TransScope *scope, const ZigClangStmt *stmt, |
| 3223 | 3229 | ResultUsed result_used, TransLRValue lrvalue, |
| 3224 | 3230 | AstNode **out_node, TransScope **out_child_scope, |
| 3225 | 3231 | TransScope **out_node_scope) |
| 3226 | 3232 | { |
| 3227 | | ZigClangStmtClass sc = (ZigClangStmtClass)stmt->getStmtClass(); |
| 3233 | ZigClangStmtClass sc = ZigClangStmt_getStmtClass(stmt); |
| 3228 | 3234 | switch (sc) { |
| 3229 | 3235 | case ZigClangStmt_ReturnStmtClass: |
| 3230 | 3236 | return wrap_stmt(out_node, out_child_scope, scope, |
| ... | ... | @@ -3325,505 +3331,505 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const clang::Stmt *st |
| 3325 | 3331 | return wrap_stmt(out_node, out_child_scope, scope, |
| 3326 | 3332 | trans_stmt_expr(c, result_used, scope, (const clang::StmtExpr *)stmt, out_node_scope)); |
| 3327 | 3333 | case ZigClangStmt_NoStmtClass: |
| 3328 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C NoStmtClass"); |
| 3334 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C NoStmtClass"); |
| 3329 | 3335 | return ErrorUnexpected; |
| 3330 | 3336 | case ZigClangStmt_GCCAsmStmtClass: |
| 3331 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C GCCAsmStmtClass"); |
| 3337 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C GCCAsmStmtClass"); |
| 3332 | 3338 | return ErrorUnexpected; |
| 3333 | 3339 | case ZigClangStmt_MSAsmStmtClass: |
| 3334 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C MSAsmStmtClass"); |
| 3340 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C MSAsmStmtClass"); |
| 3335 | 3341 | return ErrorUnexpected; |
| 3336 | 3342 | case ZigClangStmt_AttributedStmtClass: |
| 3337 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C AttributedStmtClass"); |
| 3343 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C AttributedStmtClass"); |
| 3338 | 3344 | return ErrorUnexpected; |
| 3339 | 3345 | case ZigClangStmt_CXXCatchStmtClass: |
| 3340 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXCatchStmtClass"); |
| 3346 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXCatchStmtClass"); |
| 3341 | 3347 | return ErrorUnexpected; |
| 3342 | 3348 | case ZigClangStmt_CXXForRangeStmtClass: |
| 3343 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXForRangeStmtClass"); |
| 3349 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXForRangeStmtClass"); |
| 3344 | 3350 | return ErrorUnexpected; |
| 3345 | 3351 | case ZigClangStmt_CXXTryStmtClass: |
| 3346 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXTryStmtClass"); |
| 3352 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXTryStmtClass"); |
| 3347 | 3353 | return ErrorUnexpected; |
| 3348 | 3354 | case ZigClangStmt_CapturedStmtClass: |
| 3349 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CapturedStmtClass"); |
| 3355 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CapturedStmtClass"); |
| 3350 | 3356 | return ErrorUnexpected; |
| 3351 | 3357 | case ZigClangStmt_CoreturnStmtClass: |
| 3352 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CoreturnStmtClass"); |
| 3358 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CoreturnStmtClass"); |
| 3353 | 3359 | return ErrorUnexpected; |
| 3354 | 3360 | case ZigClangStmt_CoroutineBodyStmtClass: |
| 3355 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CoroutineBodyStmtClass"); |
| 3361 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CoroutineBodyStmtClass"); |
| 3356 | 3362 | return ErrorUnexpected; |
| 3357 | 3363 | case ZigClangStmt_BinaryConditionalOperatorClass: |
| 3358 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C BinaryConditionalOperatorClass"); |
| 3364 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C BinaryConditionalOperatorClass"); |
| 3359 | 3365 | return ErrorUnexpected; |
| 3360 | 3366 | case ZigClangStmt_AddrLabelExprClass: |
| 3361 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C AddrLabelExprClass"); |
| 3367 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C AddrLabelExprClass"); |
| 3362 | 3368 | return ErrorUnexpected; |
| 3363 | 3369 | case ZigClangStmt_ArrayInitIndexExprClass: |
| 3364 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ArrayInitIndexExprClass"); |
| 3370 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ArrayInitIndexExprClass"); |
| 3365 | 3371 | return ErrorUnexpected; |
| 3366 | 3372 | case ZigClangStmt_ArrayInitLoopExprClass: |
| 3367 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ArrayInitLoopExprClass"); |
| 3373 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ArrayInitLoopExprClass"); |
| 3368 | 3374 | return ErrorUnexpected; |
| 3369 | 3375 | case ZigClangStmt_ArrayTypeTraitExprClass: |
| 3370 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ArrayTypeTraitExprClass"); |
| 3376 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ArrayTypeTraitExprClass"); |
| 3371 | 3377 | return ErrorUnexpected; |
| 3372 | 3378 | case ZigClangStmt_AsTypeExprClass: |
| 3373 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C AsTypeExprClass"); |
| 3379 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C AsTypeExprClass"); |
| 3374 | 3380 | return ErrorUnexpected; |
| 3375 | 3381 | case ZigClangStmt_AtomicExprClass: |
| 3376 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C AtomicExprClass"); |
| 3382 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C AtomicExprClass"); |
| 3377 | 3383 | return ErrorUnexpected; |
| 3378 | 3384 | case ZigClangStmt_BlockExprClass: |
| 3379 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C BlockExprClass"); |
| 3385 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C BlockExprClass"); |
| 3380 | 3386 | return ErrorUnexpected; |
| 3381 | 3387 | case ZigClangStmt_CXXBindTemporaryExprClass: |
| 3382 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXBindTemporaryExprClass"); |
| 3388 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXBindTemporaryExprClass"); |
| 3383 | 3389 | return ErrorUnexpected; |
| 3384 | 3390 | case ZigClangStmt_CXXBoolLiteralExprClass: |
| 3385 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXBoolLiteralExprClass"); |
| 3391 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXBoolLiteralExprClass"); |
| 3386 | 3392 | return ErrorUnexpected; |
| 3387 | 3393 | case ZigClangStmt_CXXConstructExprClass: |
| 3388 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXConstructExprClass"); |
| 3394 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXConstructExprClass"); |
| 3389 | 3395 | return ErrorUnexpected; |
| 3390 | 3396 | case ZigClangStmt_CXXTemporaryObjectExprClass: |
| 3391 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXTemporaryObjectExprClass"); |
| 3397 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXTemporaryObjectExprClass"); |
| 3392 | 3398 | return ErrorUnexpected; |
| 3393 | 3399 | case ZigClangStmt_CXXDefaultArgExprClass: |
| 3394 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXDefaultArgExprClass"); |
| 3400 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXDefaultArgExprClass"); |
| 3395 | 3401 | return ErrorUnexpected; |
| 3396 | 3402 | case ZigClangStmt_CXXDefaultInitExprClass: |
| 3397 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXDefaultInitExprClass"); |
| 3403 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXDefaultInitExprClass"); |
| 3398 | 3404 | return ErrorUnexpected; |
| 3399 | 3405 | case ZigClangStmt_CXXDeleteExprClass: |
| 3400 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXDeleteExprClass"); |
| 3406 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXDeleteExprClass"); |
| 3401 | 3407 | return ErrorUnexpected; |
| 3402 | 3408 | case ZigClangStmt_CXXDependentScopeMemberExprClass: |
| 3403 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXDependentScopeMemberExprClass"); |
| 3409 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXDependentScopeMemberExprClass"); |
| 3404 | 3410 | return ErrorUnexpected; |
| 3405 | 3411 | case ZigClangStmt_CXXFoldExprClass: |
| 3406 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXFoldExprClass"); |
| 3412 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXFoldExprClass"); |
| 3407 | 3413 | return ErrorUnexpected; |
| 3408 | 3414 | case ZigClangStmt_CXXInheritedCtorInitExprClass: |
| 3409 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXInheritedCtorInitExprClass"); |
| 3415 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXInheritedCtorInitExprClass"); |
| 3410 | 3416 | return ErrorUnexpected; |
| 3411 | 3417 | case ZigClangStmt_CXXNewExprClass: |
| 3412 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXNewExprClass"); |
| 3418 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXNewExprClass"); |
| 3413 | 3419 | return ErrorUnexpected; |
| 3414 | 3420 | case ZigClangStmt_CXXNoexceptExprClass: |
| 3415 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXNoexceptExprClass"); |
| 3421 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXNoexceptExprClass"); |
| 3416 | 3422 | return ErrorUnexpected; |
| 3417 | 3423 | case ZigClangStmt_CXXNullPtrLiteralExprClass: |
| 3418 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXNullPtrLiteralExprClass"); |
| 3424 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXNullPtrLiteralExprClass"); |
| 3419 | 3425 | return ErrorUnexpected; |
| 3420 | 3426 | case ZigClangStmt_CXXPseudoDestructorExprClass: |
| 3421 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXPseudoDestructorExprClass"); |
| 3427 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXPseudoDestructorExprClass"); |
| 3422 | 3428 | return ErrorUnexpected; |
| 3423 | 3429 | case ZigClangStmt_CXXScalarValueInitExprClass: |
| 3424 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXScalarValueInitExprClass"); |
| 3430 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXScalarValueInitExprClass"); |
| 3425 | 3431 | return ErrorUnexpected; |
| 3426 | 3432 | case ZigClangStmt_CXXStdInitializerListExprClass: |
| 3427 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXStdInitializerListExprClass"); |
| 3433 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXStdInitializerListExprClass"); |
| 3428 | 3434 | return ErrorUnexpected; |
| 3429 | 3435 | case ZigClangStmt_CXXThisExprClass: |
| 3430 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXThisExprClass"); |
| 3436 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXThisExprClass"); |
| 3431 | 3437 | return ErrorUnexpected; |
| 3432 | 3438 | case ZigClangStmt_CXXThrowExprClass: |
| 3433 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXThrowExprClass"); |
| 3439 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXThrowExprClass"); |
| 3434 | 3440 | return ErrorUnexpected; |
| 3435 | 3441 | case ZigClangStmt_CXXTypeidExprClass: |
| 3436 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXTypeidExprClass"); |
| 3442 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXTypeidExprClass"); |
| 3437 | 3443 | return ErrorUnexpected; |
| 3438 | 3444 | case ZigClangStmt_CXXUnresolvedConstructExprClass: |
| 3439 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXUnresolvedConstructExprClass"); |
| 3445 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXUnresolvedConstructExprClass"); |
| 3440 | 3446 | return ErrorUnexpected; |
| 3441 | 3447 | case ZigClangStmt_CXXUuidofExprClass: |
| 3442 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXUuidofExprClass"); |
| 3448 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXUuidofExprClass"); |
| 3443 | 3449 | return ErrorUnexpected; |
| 3444 | 3450 | case ZigClangStmt_CUDAKernelCallExprClass: |
| 3445 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CUDAKernelCallExprClass"); |
| 3451 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CUDAKernelCallExprClass"); |
| 3446 | 3452 | return ErrorUnexpected; |
| 3447 | 3453 | case ZigClangStmt_CXXMemberCallExprClass: |
| 3448 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXMemberCallExprClass"); |
| 3454 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXMemberCallExprClass"); |
| 3449 | 3455 | return ErrorUnexpected; |
| 3450 | 3456 | case ZigClangStmt_CXXOperatorCallExprClass: |
| 3451 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXOperatorCallExprClass"); |
| 3457 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXOperatorCallExprClass"); |
| 3452 | 3458 | return ErrorUnexpected; |
| 3453 | 3459 | case ZigClangStmt_UserDefinedLiteralClass: |
| 3454 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C UserDefinedLiteralClass"); |
| 3460 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C UserDefinedLiteralClass"); |
| 3455 | 3461 | return ErrorUnexpected; |
| 3456 | 3462 | case ZigClangStmt_CXXFunctionalCastExprClass: |
| 3457 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXFunctionalCastExprClass"); |
| 3463 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXFunctionalCastExprClass"); |
| 3458 | 3464 | return ErrorUnexpected; |
| 3459 | 3465 | case ZigClangStmt_CXXConstCastExprClass: |
| 3460 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXConstCastExprClass"); |
| 3466 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXConstCastExprClass"); |
| 3461 | 3467 | return ErrorUnexpected; |
| 3462 | 3468 | case ZigClangStmt_CXXDynamicCastExprClass: |
| 3463 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXDynamicCastExprClass"); |
| 3469 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXDynamicCastExprClass"); |
| 3464 | 3470 | return ErrorUnexpected; |
| 3465 | 3471 | case ZigClangStmt_CXXReinterpretCastExprClass: |
| 3466 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXReinterpretCastExprClass"); |
| 3472 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXReinterpretCastExprClass"); |
| 3467 | 3473 | return ErrorUnexpected; |
| 3468 | 3474 | case ZigClangStmt_CXXStaticCastExprClass: |
| 3469 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CXXStaticCastExprClass"); |
| 3475 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CXXStaticCastExprClass"); |
| 3470 | 3476 | return ErrorUnexpected; |
| 3471 | 3477 | case ZigClangStmt_ObjCBridgedCastExprClass: |
| 3472 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCBridgedCastExprClass"); |
| 3478 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCBridgedCastExprClass"); |
| 3473 | 3479 | return ErrorUnexpected; |
| 3474 | 3480 | case ZigClangStmt_CharacterLiteralClass: |
| 3475 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CharacterLiteralClass"); |
| 3481 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CharacterLiteralClass"); |
| 3476 | 3482 | return ErrorUnexpected; |
| 3477 | 3483 | case ZigClangStmt_ChooseExprClass: |
| 3478 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ChooseExprClass"); |
| 3484 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ChooseExprClass"); |
| 3479 | 3485 | return ErrorUnexpected; |
| 3480 | 3486 | case ZigClangStmt_CompoundLiteralExprClass: |
| 3481 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CompoundLiteralExprClass"); |
| 3487 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CompoundLiteralExprClass"); |
| 3482 | 3488 | return ErrorUnexpected; |
| 3483 | 3489 | case ZigClangStmt_ConvertVectorExprClass: |
| 3484 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ConvertVectorExprClass"); |
| 3490 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ConvertVectorExprClass"); |
| 3485 | 3491 | return ErrorUnexpected; |
| 3486 | 3492 | case ZigClangStmt_CoawaitExprClass: |
| 3487 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CoawaitExprClass"); |
| 3493 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CoawaitExprClass"); |
| 3488 | 3494 | return ErrorUnexpected; |
| 3489 | 3495 | case ZigClangStmt_CoyieldExprClass: |
| 3490 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C CoyieldExprClass"); |
| 3496 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C CoyieldExprClass"); |
| 3491 | 3497 | return ErrorUnexpected; |
| 3492 | 3498 | case ZigClangStmt_DependentCoawaitExprClass: |
| 3493 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C DependentCoawaitExprClass"); |
| 3499 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C DependentCoawaitExprClass"); |
| 3494 | 3500 | return ErrorUnexpected; |
| 3495 | 3501 | case ZigClangStmt_DependentScopeDeclRefExprClass: |
| 3496 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C DependentScopeDeclRefExprClass"); |
| 3502 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C DependentScopeDeclRefExprClass"); |
| 3497 | 3503 | return ErrorUnexpected; |
| 3498 | 3504 | case ZigClangStmt_DesignatedInitExprClass: |
| 3499 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C DesignatedInitExprClass"); |
| 3505 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C DesignatedInitExprClass"); |
| 3500 | 3506 | return ErrorUnexpected; |
| 3501 | 3507 | case ZigClangStmt_DesignatedInitUpdateExprClass: |
| 3502 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C DesignatedInitUpdateExprClass"); |
| 3508 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C DesignatedInitUpdateExprClass"); |
| 3503 | 3509 | return ErrorUnexpected; |
| 3504 | 3510 | case ZigClangStmt_ExpressionTraitExprClass: |
| 3505 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ExpressionTraitExprClass"); |
| 3511 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ExpressionTraitExprClass"); |
| 3506 | 3512 | return ErrorUnexpected; |
| 3507 | 3513 | case ZigClangStmt_ExtVectorElementExprClass: |
| 3508 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ExtVectorElementExprClass"); |
| 3514 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ExtVectorElementExprClass"); |
| 3509 | 3515 | return ErrorUnexpected; |
| 3510 | 3516 | case ZigClangStmt_FixedPointLiteralClass: |
| 3511 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C FixedPointLiteralClass"); |
| 3517 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C FixedPointLiteralClass"); |
| 3512 | 3518 | return ErrorUnexpected; |
| 3513 | 3519 | case ZigClangStmt_FloatingLiteralClass: |
| 3514 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C FloatingLiteralClass"); |
| 3520 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C FloatingLiteralClass"); |
| 3515 | 3521 | return ErrorUnexpected; |
| 3516 | 3522 | case ZigClangStmt_ExprWithCleanupsClass: |
| 3517 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ExprWithCleanupsClass"); |
| 3523 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ExprWithCleanupsClass"); |
| 3518 | 3524 | return ErrorUnexpected; |
| 3519 | 3525 | case ZigClangStmt_FunctionParmPackExprClass: |
| 3520 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C FunctionParmPackExprClass"); |
| 3526 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C FunctionParmPackExprClass"); |
| 3521 | 3527 | return ErrorUnexpected; |
| 3522 | 3528 | case ZigClangStmt_GNUNullExprClass: |
| 3523 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C GNUNullExprClass"); |
| 3529 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C GNUNullExprClass"); |
| 3524 | 3530 | return ErrorUnexpected; |
| 3525 | 3531 | case ZigClangStmt_GenericSelectionExprClass: |
| 3526 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C GenericSelectionExprClass"); |
| 3532 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C GenericSelectionExprClass"); |
| 3527 | 3533 | return ErrorUnexpected; |
| 3528 | 3534 | case ZigClangStmt_ImaginaryLiteralClass: |
| 3529 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ImaginaryLiteralClass"); |
| 3535 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ImaginaryLiteralClass"); |
| 3530 | 3536 | return ErrorUnexpected; |
| 3531 | 3537 | case ZigClangStmt_ImplicitValueInitExprClass: |
| 3532 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ImplicitValueInitExprClass"); |
| 3538 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ImplicitValueInitExprClass"); |
| 3533 | 3539 | return ErrorUnexpected; |
| 3534 | 3540 | case ZigClangStmt_InitListExprClass: |
| 3535 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C InitListExprClass"); |
| 3541 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C InitListExprClass"); |
| 3536 | 3542 | return ErrorUnexpected; |
| 3537 | 3543 | case ZigClangStmt_LambdaExprClass: |
| 3538 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C LambdaExprClass"); |
| 3544 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C LambdaExprClass"); |
| 3539 | 3545 | return ErrorUnexpected; |
| 3540 | 3546 | case ZigClangStmt_MSPropertyRefExprClass: |
| 3541 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C MSPropertyRefExprClass"); |
| 3547 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C MSPropertyRefExprClass"); |
| 3542 | 3548 | return ErrorUnexpected; |
| 3543 | 3549 | case ZigClangStmt_MSPropertySubscriptExprClass: |
| 3544 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C MSPropertySubscriptExprClass"); |
| 3550 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C MSPropertySubscriptExprClass"); |
| 3545 | 3551 | return ErrorUnexpected; |
| 3546 | 3552 | case ZigClangStmt_MaterializeTemporaryExprClass: |
| 3547 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C MaterializeTemporaryExprClass"); |
| 3553 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C MaterializeTemporaryExprClass"); |
| 3548 | 3554 | return ErrorUnexpected; |
| 3549 | 3555 | case ZigClangStmt_NoInitExprClass: |
| 3550 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C NoInitExprClass"); |
| 3556 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C NoInitExprClass"); |
| 3551 | 3557 | return ErrorUnexpected; |
| 3552 | 3558 | case ZigClangStmt_OMPArraySectionExprClass: |
| 3553 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPArraySectionExprClass"); |
| 3559 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPArraySectionExprClass"); |
| 3554 | 3560 | return ErrorUnexpected; |
| 3555 | 3561 | case ZigClangStmt_ObjCArrayLiteralClass: |
| 3556 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCArrayLiteralClass"); |
| 3562 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCArrayLiteralClass"); |
| 3557 | 3563 | return ErrorUnexpected; |
| 3558 | 3564 | case ZigClangStmt_ObjCAvailabilityCheckExprClass: |
| 3559 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAvailabilityCheckExprClass"); |
| 3565 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAvailabilityCheckExprClass"); |
| 3560 | 3566 | return ErrorUnexpected; |
| 3561 | 3567 | case ZigClangStmt_ObjCBoolLiteralExprClass: |
| 3562 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCBoolLiteralExprClass"); |
| 3568 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCBoolLiteralExprClass"); |
| 3563 | 3569 | return ErrorUnexpected; |
| 3564 | 3570 | case ZigClangStmt_ObjCBoxedExprClass: |
| 3565 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCBoxedExprClass"); |
| 3571 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCBoxedExprClass"); |
| 3566 | 3572 | return ErrorUnexpected; |
| 3567 | 3573 | case ZigClangStmt_ObjCDictionaryLiteralClass: |
| 3568 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCDictionaryLiteralClass"); |
| 3574 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCDictionaryLiteralClass"); |
| 3569 | 3575 | return ErrorUnexpected; |
| 3570 | 3576 | case ZigClangStmt_ObjCEncodeExprClass: |
| 3571 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCEncodeExprClass"); |
| 3577 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCEncodeExprClass"); |
| 3572 | 3578 | return ErrorUnexpected; |
| 3573 | 3579 | case ZigClangStmt_ObjCIndirectCopyRestoreExprClass: |
| 3574 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCIndirectCopyRestoreExprClass"); |
| 3580 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCIndirectCopyRestoreExprClass"); |
| 3575 | 3581 | return ErrorUnexpected; |
| 3576 | 3582 | case ZigClangStmt_ObjCIsaExprClass: |
| 3577 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCIsaExprClass"); |
| 3583 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCIsaExprClass"); |
| 3578 | 3584 | return ErrorUnexpected; |
| 3579 | 3585 | case ZigClangStmt_ObjCIvarRefExprClass: |
| 3580 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCIvarRefExprClass"); |
| 3586 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCIvarRefExprClass"); |
| 3581 | 3587 | return ErrorUnexpected; |
| 3582 | 3588 | case ZigClangStmt_ObjCMessageExprClass: |
| 3583 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCMessageExprClass"); |
| 3589 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCMessageExprClass"); |
| 3584 | 3590 | return ErrorUnexpected; |
| 3585 | 3591 | case ZigClangStmt_ObjCPropertyRefExprClass: |
| 3586 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCPropertyRefExprClass"); |
| 3592 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCPropertyRefExprClass"); |
| 3587 | 3593 | return ErrorUnexpected; |
| 3588 | 3594 | case ZigClangStmt_ObjCProtocolExprClass: |
| 3589 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCProtocolExprClass"); |
| 3595 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCProtocolExprClass"); |
| 3590 | 3596 | return ErrorUnexpected; |
| 3591 | 3597 | case ZigClangStmt_ObjCSelectorExprClass: |
| 3592 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCSelectorExprClass"); |
| 3598 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCSelectorExprClass"); |
| 3593 | 3599 | return ErrorUnexpected; |
| 3594 | 3600 | case ZigClangStmt_ObjCStringLiteralClass: |
| 3595 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCStringLiteralClass"); |
| 3601 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCStringLiteralClass"); |
| 3596 | 3602 | return ErrorUnexpected; |
| 3597 | 3603 | case ZigClangStmt_ObjCSubscriptRefExprClass: |
| 3598 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCSubscriptRefExprClass"); |
| 3604 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCSubscriptRefExprClass"); |
| 3599 | 3605 | return ErrorUnexpected; |
| 3600 | 3606 | case ZigClangStmt_OffsetOfExprClass: |
| 3601 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OffsetOfExprClass"); |
| 3607 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OffsetOfExprClass"); |
| 3602 | 3608 | return ErrorUnexpected; |
| 3603 | 3609 | case ZigClangStmt_OpaqueValueExprClass: |
| 3604 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OpaqueValueExprClass"); |
| 3610 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OpaqueValueExprClass"); |
| 3605 | 3611 | return ErrorUnexpected; |
| 3606 | 3612 | case ZigClangStmt_UnresolvedLookupExprClass: |
| 3607 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C UnresolvedLookupExprClass"); |
| 3613 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C UnresolvedLookupExprClass"); |
| 3608 | 3614 | return ErrorUnexpected; |
| 3609 | 3615 | case ZigClangStmt_UnresolvedMemberExprClass: |
| 3610 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C UnresolvedMemberExprClass"); |
| 3616 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C UnresolvedMemberExprClass"); |
| 3611 | 3617 | return ErrorUnexpected; |
| 3612 | 3618 | case ZigClangStmt_PackExpansionExprClass: |
| 3613 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C PackExpansionExprClass"); |
| 3619 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C PackExpansionExprClass"); |
| 3614 | 3620 | return ErrorUnexpected; |
| 3615 | 3621 | case ZigClangStmt_ParenListExprClass: |
| 3616 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ParenListExprClass"); |
| 3622 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ParenListExprClass"); |
| 3617 | 3623 | return ErrorUnexpected; |
| 3618 | 3624 | case ZigClangStmt_PseudoObjectExprClass: |
| 3619 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C PseudoObjectExprClass"); |
| 3625 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C PseudoObjectExprClass"); |
| 3620 | 3626 | return ErrorUnexpected; |
| 3621 | 3627 | case ZigClangStmt_ShuffleVectorExprClass: |
| 3622 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ShuffleVectorExprClass"); |
| 3628 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ShuffleVectorExprClass"); |
| 3623 | 3629 | return ErrorUnexpected; |
| 3624 | 3630 | case ZigClangStmt_SizeOfPackExprClass: |
| 3625 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SizeOfPackExprClass"); |
| 3631 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SizeOfPackExprClass"); |
| 3626 | 3632 | return ErrorUnexpected; |
| 3627 | 3633 | case ZigClangStmt_SubstNonTypeTemplateParmExprClass: |
| 3628 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SubstNonTypeTemplateParmExprClass"); |
| 3634 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SubstNonTypeTemplateParmExprClass"); |
| 3629 | 3635 | return ErrorUnexpected; |
| 3630 | 3636 | case ZigClangStmt_SubstNonTypeTemplateParmPackExprClass: |
| 3631 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SubstNonTypeTemplateParmPackExprClass"); |
| 3637 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SubstNonTypeTemplateParmPackExprClass"); |
| 3632 | 3638 | return ErrorUnexpected; |
| 3633 | 3639 | case ZigClangStmt_TypeTraitExprClass: |
| 3634 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C TypeTraitExprClass"); |
| 3640 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C TypeTraitExprClass"); |
| 3635 | 3641 | return ErrorUnexpected; |
| 3636 | 3642 | case ZigClangStmt_TypoExprClass: |
| 3637 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C TypoExprClass"); |
| 3643 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C TypoExprClass"); |
| 3638 | 3644 | return ErrorUnexpected; |
| 3639 | 3645 | case ZigClangStmt_VAArgExprClass: |
| 3640 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C VAArgExprClass"); |
| 3646 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C VAArgExprClass"); |
| 3641 | 3647 | return ErrorUnexpected; |
| 3642 | 3648 | case ZigClangStmt_GotoStmtClass: |
| 3643 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C GotoStmtClass"); |
| 3649 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C GotoStmtClass"); |
| 3644 | 3650 | return ErrorUnexpected; |
| 3645 | 3651 | case ZigClangStmt_IndirectGotoStmtClass: |
| 3646 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C IndirectGotoStmtClass"); |
| 3652 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C IndirectGotoStmtClass"); |
| 3647 | 3653 | return ErrorUnexpected; |
| 3648 | 3654 | case ZigClangStmt_LabelStmtClass: |
| 3649 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C LabelStmtClass"); |
| 3655 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C LabelStmtClass"); |
| 3650 | 3656 | return ErrorUnexpected; |
| 3651 | 3657 | case ZigClangStmt_MSDependentExistsStmtClass: |
| 3652 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C MSDependentExistsStmtClass"); |
| 3658 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C MSDependentExistsStmtClass"); |
| 3653 | 3659 | return ErrorUnexpected; |
| 3654 | 3660 | case ZigClangStmt_OMPAtomicDirectiveClass: |
| 3655 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPAtomicDirectiveClass"); |
| 3661 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPAtomicDirectiveClass"); |
| 3656 | 3662 | return ErrorUnexpected; |
| 3657 | 3663 | case ZigClangStmt_OMPBarrierDirectiveClass: |
| 3658 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPBarrierDirectiveClass"); |
| 3664 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPBarrierDirectiveClass"); |
| 3659 | 3665 | return ErrorUnexpected; |
| 3660 | 3666 | case ZigClangStmt_OMPCancelDirectiveClass: |
| 3661 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPCancelDirectiveClass"); |
| 3667 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPCancelDirectiveClass"); |
| 3662 | 3668 | return ErrorUnexpected; |
| 3663 | 3669 | case ZigClangStmt_OMPCancellationPointDirectiveClass: |
| 3664 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPCancellationPointDirectiveClass"); |
| 3670 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPCancellationPointDirectiveClass"); |
| 3665 | 3671 | return ErrorUnexpected; |
| 3666 | 3672 | case ZigClangStmt_OMPCriticalDirectiveClass: |
| 3667 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPCriticalDirectiveClass"); |
| 3673 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPCriticalDirectiveClass"); |
| 3668 | 3674 | return ErrorUnexpected; |
| 3669 | 3675 | case ZigClangStmt_OMPFlushDirectiveClass: |
| 3670 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPFlushDirectiveClass"); |
| 3676 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPFlushDirectiveClass"); |
| 3671 | 3677 | return ErrorUnexpected; |
| 3672 | 3678 | case ZigClangStmt_OMPDistributeDirectiveClass: |
| 3673 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPDistributeDirectiveClass"); |
| 3679 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPDistributeDirectiveClass"); |
| 3674 | 3680 | return ErrorUnexpected; |
| 3675 | 3681 | case ZigClangStmt_OMPDistributeParallelForDirectiveClass: |
| 3676 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPDistributeParallelForDirectiveClass"); |
| 3682 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPDistributeParallelForDirectiveClass"); |
| 3677 | 3683 | return ErrorUnexpected; |
| 3678 | 3684 | case ZigClangStmt_OMPDistributeParallelForSimdDirectiveClass: |
| 3679 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPDistributeParallelForSimdDirectiveClass"); |
| 3685 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPDistributeParallelForSimdDirectiveClass"); |
| 3680 | 3686 | return ErrorUnexpected; |
| 3681 | 3687 | case ZigClangStmt_OMPDistributeSimdDirectiveClass: |
| 3682 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPDistributeSimdDirectiveClass"); |
| 3688 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPDistributeSimdDirectiveClass"); |
| 3683 | 3689 | return ErrorUnexpected; |
| 3684 | 3690 | case ZigClangStmt_OMPForDirectiveClass: |
| 3685 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPForDirectiveClass"); |
| 3691 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPForDirectiveClass"); |
| 3686 | 3692 | return ErrorUnexpected; |
| 3687 | 3693 | case ZigClangStmt_OMPForSimdDirectiveClass: |
| 3688 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPForSimdDirectiveClass"); |
| 3694 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPForSimdDirectiveClass"); |
| 3689 | 3695 | return ErrorUnexpected; |
| 3690 | 3696 | case ZigClangStmt_OMPParallelForDirectiveClass: |
| 3691 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPParallelForDirectiveClass"); |
| 3697 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPParallelForDirectiveClass"); |
| 3692 | 3698 | return ErrorUnexpected; |
| 3693 | 3699 | case ZigClangStmt_OMPParallelForSimdDirectiveClass: |
| 3694 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPParallelForSimdDirectiveClass"); |
| 3700 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPParallelForSimdDirectiveClass"); |
| 3695 | 3701 | return ErrorUnexpected; |
| 3696 | 3702 | case ZigClangStmt_OMPSimdDirectiveClass: |
| 3697 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPSimdDirectiveClass"); |
| 3703 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPSimdDirectiveClass"); |
| 3698 | 3704 | return ErrorUnexpected; |
| 3699 | 3705 | case ZigClangStmt_OMPTargetParallelForSimdDirectiveClass: |
| 3700 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetParallelForSimdDirectiveClass"); |
| 3706 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetParallelForSimdDirectiveClass"); |
| 3701 | 3707 | return ErrorUnexpected; |
| 3702 | 3708 | case ZigClangStmt_OMPTargetSimdDirectiveClass: |
| 3703 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetSimdDirectiveClass"); |
| 3709 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetSimdDirectiveClass"); |
| 3704 | 3710 | return ErrorUnexpected; |
| 3705 | 3711 | case ZigClangStmt_OMPTargetTeamsDistributeDirectiveClass: |
| 3706 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetTeamsDistributeDirectiveClass"); |
| 3712 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetTeamsDistributeDirectiveClass"); |
| 3707 | 3713 | return ErrorUnexpected; |
| 3708 | 3714 | case ZigClangStmt_OMPTargetTeamsDistributeParallelForDirectiveClass: |
| 3709 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetTeamsDistributeParallelForDirectiveClass"); |
| 3715 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetTeamsDistributeParallelForDirectiveClass"); |
| 3710 | 3716 | return ErrorUnexpected; |
| 3711 | 3717 | case ZigClangStmt_OMPTargetTeamsDistributeParallelForSimdDirectiveClass: |
| 3712 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetTeamsDistributeParallelForSimdDirectiveClass"); |
| 3718 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetTeamsDistributeParallelForSimdDirectiveClass"); |
| 3713 | 3719 | return ErrorUnexpected; |
| 3714 | 3720 | case ZigClangStmt_OMPTargetTeamsDistributeSimdDirectiveClass: |
| 3715 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetTeamsDistributeSimdDirectiveClass"); |
| 3721 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetTeamsDistributeSimdDirectiveClass"); |
| 3716 | 3722 | return ErrorUnexpected; |
| 3717 | 3723 | case ZigClangStmt_OMPTaskLoopDirectiveClass: |
| 3718 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTaskLoopDirectiveClass"); |
| 3724 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTaskLoopDirectiveClass"); |
| 3719 | 3725 | return ErrorUnexpected; |
| 3720 | 3726 | case ZigClangStmt_OMPTaskLoopSimdDirectiveClass: |
| 3721 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTaskLoopSimdDirectiveClass"); |
| 3727 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTaskLoopSimdDirectiveClass"); |
| 3722 | 3728 | return ErrorUnexpected; |
| 3723 | 3729 | case ZigClangStmt_OMPTeamsDistributeDirectiveClass: |
| 3724 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTeamsDistributeDirectiveClass"); |
| 3730 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTeamsDistributeDirectiveClass"); |
| 3725 | 3731 | return ErrorUnexpected; |
| 3726 | 3732 | case ZigClangStmt_OMPTeamsDistributeParallelForDirectiveClass: |
| 3727 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTeamsDistributeParallelForDirectiveClass"); |
| 3733 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTeamsDistributeParallelForDirectiveClass"); |
| 3728 | 3734 | return ErrorUnexpected; |
| 3729 | 3735 | case ZigClangStmt_OMPTeamsDistributeParallelForSimdDirectiveClass: |
| 3730 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTeamsDistributeParallelForSimdDirectiveClass"); |
| 3736 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTeamsDistributeParallelForSimdDirectiveClass"); |
| 3731 | 3737 | return ErrorUnexpected; |
| 3732 | 3738 | case ZigClangStmt_OMPTeamsDistributeSimdDirectiveClass: |
| 3733 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTeamsDistributeSimdDirectiveClass"); |
| 3739 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTeamsDistributeSimdDirectiveClass"); |
| 3734 | 3740 | return ErrorUnexpected; |
| 3735 | 3741 | case ZigClangStmt_OMPMasterDirectiveClass: |
| 3736 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPMasterDirectiveClass"); |
| 3742 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPMasterDirectiveClass"); |
| 3737 | 3743 | return ErrorUnexpected; |
| 3738 | 3744 | case ZigClangStmt_OMPOrderedDirectiveClass: |
| 3739 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPOrderedDirectiveClass"); |
| 3745 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPOrderedDirectiveClass"); |
| 3740 | 3746 | return ErrorUnexpected; |
| 3741 | 3747 | case ZigClangStmt_OMPParallelDirectiveClass: |
| 3742 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPParallelDirectiveClass"); |
| 3748 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPParallelDirectiveClass"); |
| 3743 | 3749 | return ErrorUnexpected; |
| 3744 | 3750 | case ZigClangStmt_OMPParallelSectionsDirectiveClass: |
| 3745 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPParallelSectionsDirectiveClass"); |
| 3751 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPParallelSectionsDirectiveClass"); |
| 3746 | 3752 | return ErrorUnexpected; |
| 3747 | 3753 | case ZigClangStmt_OMPSectionDirectiveClass: |
| 3748 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPSectionDirectiveClass"); |
| 3754 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPSectionDirectiveClass"); |
| 3749 | 3755 | return ErrorUnexpected; |
| 3750 | 3756 | case ZigClangStmt_OMPSectionsDirectiveClass: |
| 3751 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPSectionsDirectiveClass"); |
| 3757 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPSectionsDirectiveClass"); |
| 3752 | 3758 | return ErrorUnexpected; |
| 3753 | 3759 | case ZigClangStmt_OMPSingleDirectiveClass: |
| 3754 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPSingleDirectiveClass"); |
| 3760 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPSingleDirectiveClass"); |
| 3755 | 3761 | return ErrorUnexpected; |
| 3756 | 3762 | case ZigClangStmt_OMPTargetDataDirectiveClass: |
| 3757 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetDataDirectiveClass"); |
| 3763 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetDataDirectiveClass"); |
| 3758 | 3764 | return ErrorUnexpected; |
| 3759 | 3765 | case ZigClangStmt_OMPTargetDirectiveClass: |
| 3760 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetDirectiveClass"); |
| 3766 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetDirectiveClass"); |
| 3761 | 3767 | return ErrorUnexpected; |
| 3762 | 3768 | case ZigClangStmt_OMPTargetEnterDataDirectiveClass: |
| 3763 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetEnterDataDirectiveClass"); |
| 3769 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetEnterDataDirectiveClass"); |
| 3764 | 3770 | return ErrorUnexpected; |
| 3765 | 3771 | case ZigClangStmt_OMPTargetExitDataDirectiveClass: |
| 3766 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetExitDataDirectiveClass"); |
| 3772 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetExitDataDirectiveClass"); |
| 3767 | 3773 | return ErrorUnexpected; |
| 3768 | 3774 | case ZigClangStmt_OMPTargetParallelDirectiveClass: |
| 3769 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetParallelDirectiveClass"); |
| 3775 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetParallelDirectiveClass"); |
| 3770 | 3776 | return ErrorUnexpected; |
| 3771 | 3777 | case ZigClangStmt_OMPTargetParallelForDirectiveClass: |
| 3772 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetParallelForDirectiveClass"); |
| 3778 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetParallelForDirectiveClass"); |
| 3773 | 3779 | return ErrorUnexpected; |
| 3774 | 3780 | case ZigClangStmt_OMPTargetTeamsDirectiveClass: |
| 3775 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetTeamsDirectiveClass"); |
| 3781 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetTeamsDirectiveClass"); |
| 3776 | 3782 | return ErrorUnexpected; |
| 3777 | 3783 | case ZigClangStmt_OMPTargetUpdateDirectiveClass: |
| 3778 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTargetUpdateDirectiveClass"); |
| 3784 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTargetUpdateDirectiveClass"); |
| 3779 | 3785 | return ErrorUnexpected; |
| 3780 | 3786 | case ZigClangStmt_OMPTaskDirectiveClass: |
| 3781 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTaskDirectiveClass"); |
| 3787 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTaskDirectiveClass"); |
| 3782 | 3788 | return ErrorUnexpected; |
| 3783 | 3789 | case ZigClangStmt_OMPTaskgroupDirectiveClass: |
| 3784 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTaskgroupDirectiveClass"); |
| 3790 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTaskgroupDirectiveClass"); |
| 3785 | 3791 | return ErrorUnexpected; |
| 3786 | 3792 | case ZigClangStmt_OMPTaskwaitDirectiveClass: |
| 3787 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTaskwaitDirectiveClass"); |
| 3793 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTaskwaitDirectiveClass"); |
| 3788 | 3794 | return ErrorUnexpected; |
| 3789 | 3795 | case ZigClangStmt_OMPTaskyieldDirectiveClass: |
| 3790 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTaskyieldDirectiveClass"); |
| 3796 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTaskyieldDirectiveClass"); |
| 3791 | 3797 | return ErrorUnexpected; |
| 3792 | 3798 | case ZigClangStmt_OMPTeamsDirectiveClass: |
| 3793 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C OMPTeamsDirectiveClass"); |
| 3799 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C OMPTeamsDirectiveClass"); |
| 3794 | 3800 | return ErrorUnexpected; |
| 3795 | 3801 | case ZigClangStmt_ObjCAtCatchStmtClass: |
| 3796 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAtCatchStmtClass"); |
| 3802 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAtCatchStmtClass"); |
| 3797 | 3803 | return ErrorUnexpected; |
| 3798 | 3804 | case ZigClangStmt_ObjCAtFinallyStmtClass: |
| 3799 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAtFinallyStmtClass"); |
| 3805 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAtFinallyStmtClass"); |
| 3800 | 3806 | return ErrorUnexpected; |
| 3801 | 3807 | case ZigClangStmt_ObjCAtSynchronizedStmtClass: |
| 3802 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAtSynchronizedStmtClass"); |
| 3808 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAtSynchronizedStmtClass"); |
| 3803 | 3809 | return ErrorUnexpected; |
| 3804 | 3810 | case ZigClangStmt_ObjCAtThrowStmtClass: |
| 3805 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAtThrowStmtClass"); |
| 3811 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAtThrowStmtClass"); |
| 3806 | 3812 | return ErrorUnexpected; |
| 3807 | 3813 | case ZigClangStmt_ObjCAtTryStmtClass: |
| 3808 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAtTryStmtClass"); |
| 3814 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAtTryStmtClass"); |
| 3809 | 3815 | return ErrorUnexpected; |
| 3810 | 3816 | case ZigClangStmt_ObjCAutoreleasePoolStmtClass: |
| 3811 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCAutoreleasePoolStmtClass"); |
| 3817 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCAutoreleasePoolStmtClass"); |
| 3812 | 3818 | return ErrorUnexpected; |
| 3813 | 3819 | case ZigClangStmt_ObjCForCollectionStmtClass: |
| 3814 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C ObjCForCollectionStmtClass"); |
| 3820 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C ObjCForCollectionStmtClass"); |
| 3815 | 3821 | return ErrorUnexpected; |
| 3816 | 3822 | case ZigClangStmt_SEHExceptStmtClass: |
| 3817 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SEHExceptStmtClass"); |
| 3823 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SEHExceptStmtClass"); |
| 3818 | 3824 | return ErrorUnexpected; |
| 3819 | 3825 | case ZigClangStmt_SEHFinallyStmtClass: |
| 3820 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SEHFinallyStmtClass"); |
| 3826 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SEHFinallyStmtClass"); |
| 3821 | 3827 | return ErrorUnexpected; |
| 3822 | 3828 | case ZigClangStmt_SEHLeaveStmtClass: |
| 3823 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SEHLeaveStmtClass"); |
| 3829 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SEHLeaveStmtClass"); |
| 3824 | 3830 | return ErrorUnexpected; |
| 3825 | 3831 | case ZigClangStmt_SEHTryStmtClass: |
| 3826 | | emit_warning(c, bitcast(stmt->getBeginLoc()), "TODO handle C SEHTryStmtClass"); |
| 3832 | emit_warning(c, ZigClangStmt_getBeginLoc(stmt), "TODO handle C SEHTryStmtClass"); |
| 3827 | 3833 | return ErrorUnexpected; |
| 3828 | 3834 | } |
| 3829 | 3835 | zig_unreachable(); |
| ... | ... | @@ -3835,7 +3841,7 @@ static AstNode *trans_expr(Context *c, ResultUsed result_used, TransScope *scope |
| 3835 | 3841 | { |
| 3836 | 3842 | AstNode *result_node; |
| 3837 | 3843 | TransScope *result_scope; |
| 3838 | | if (trans_stmt_extra(c, scope, expr, result_used, lrval, &result_node, &result_scope, nullptr)) { |
| 3844 | if (trans_stmt_extra(c, scope, (const ZigClangStmt *)expr, result_used, lrval, &result_node, &result_scope, nullptr)) { |
| 3839 | 3845 | return nullptr; |
| 3840 | 3846 | } |
| 3841 | 3847 | return result_node; |
| ... | ... | @@ -3843,7 +3849,7 @@ static AstNode *trans_expr(Context *c, ResultUsed result_used, TransScope *scope |
| 3843 | 3849 | |
| 3844 | 3850 | // Statements have no result and no concept of L or R value. |
| 3845 | 3851 | // Returns child scope, or null if there was an error |
| 3846 | | static TransScope *trans_stmt(Context *c, TransScope *scope, const clang::Stmt *stmt, AstNode **out_node) { |
| 3852 | static TransScope *trans_stmt(Context *c, TransScope *scope, const ZigClangStmt *stmt, AstNode **out_node) { |
| 3847 | 3853 | TransScope *child_scope; |
| 3848 | 3854 | if (trans_stmt_extra(c, scope, stmt, ResultUsedNo, TransRValue, out_node, &child_scope, nullptr)) { |
| 3849 | 3855 | return nullptr; |
| ... | ... | @@ -3913,7 +3919,7 @@ static void visit_fn_decl(Context *c, const clang::FunctionDecl *fn_decl) { |
| 3913 | 3919 | |
| 3914 | 3920 | // actual function definition with body |
| 3915 | 3921 | c->ptr_params.clear(); |
| 3916 | | clang::Stmt *body = fn_decl->getBody(); |
| 3922 | const ZigClangStmt *body = bitcast(fn_decl->getBody()); |
| 3917 | 3923 | AstNode *actual_body_node; |
| 3918 | 3924 | TransScope *result_scope = trans_stmt(c, scope, body, &actual_body_node); |
| 3919 | 3925 | if (result_scope == nullptr) { |