| ... | ... | @@ -118,7 +118,7 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const Stmt *stmt, |
| 118 | 118 | static TransScope *trans_stmt(Context *c, TransScope *scope, const Stmt *stmt, AstNode **out_node); |
| 119 | 119 | static AstNode *trans_expr(Context *c, ResultUsed result_used, TransScope *scope, const Expr *expr, TransLRValue lrval); |
| 120 | 120 | static AstNode *trans_qual_type(Context *c, QualType qt, const SourceLocation &source_loc); |
| 121 | | |
| 121 | static AstNode *trans_to_bool_expr(Context *c, TransScope *scope, AstNode *expr); |
| 122 | 122 | |
| 123 | 123 | ATTRIBUTE_PRINTF(3, 4) |
| 124 | 124 | static void emit_warning(Context *c, const SourceLocation &sl, const char *format, ...) { |
| ... | ... | @@ -632,7 +632,7 @@ static bool c_is_signed_integer(Context *c, QualType qt) { |
| 632 | 632 | case BuiltinType::Int128: |
| 633 | 633 | case BuiltinType::WChar_S: |
| 634 | 634 | return true; |
| 635 | | default: |
| 635 | default: |
| 636 | 636 | return false; |
| 637 | 637 | } |
| 638 | 638 | } |
| ... | ... | @@ -653,7 +653,7 @@ static bool c_is_unsigned_integer(Context *c, QualType qt) { |
| 653 | 653 | case BuiltinType::UInt128: |
| 654 | 654 | case BuiltinType::WChar_U: |
| 655 | 655 | return true; |
| 656 | | default: |
| 656 | default: |
| 657 | 657 | return false; |
| 658 | 658 | } |
| 659 | 659 | } |
| ... | ... | @@ -678,7 +678,7 @@ static bool c_is_float(Context *c, QualType qt) { |
| 678 | 678 | case BuiltinType::Float128: |
| 679 | 679 | case BuiltinType::LongDouble: |
| 680 | 680 | return true; |
| 681 | | default: |
| 681 | default: |
| 682 | 682 | return false; |
| 683 | 683 | } |
| 684 | 684 | } |
| ... | ... | @@ -1389,7 +1389,7 @@ static AstNode *trans_create_compound_assign_shift(Context *c, ResultUsed result |
| 1389 | 1389 | if (result_used == ResultUsedYes) { |
| 1390 | 1390 | // break :x *_ref |
| 1391 | 1391 | child_scope->node->data.block.statements.append( |
| 1392 | | trans_create_node_break(c, label_name, |
| 1392 | trans_create_node_break(c, label_name, |
| 1393 | 1393 | trans_create_node_prefix_op(c, PrefixOpDereference, |
| 1394 | 1394 | trans_create_node_symbol(c, tmp_var_name)))); |
| 1395 | 1395 | } |
| ... | ... | @@ -1918,7 +1918,7 @@ static AstNode *trans_unary_operator(Context *c, ResultUsed result_used, TransSc |
| 1918 | 1918 | switch (stmt->getOpcode()) { |
| 1919 | 1919 | case UO_LNot: |
| 1920 | 1920 | // TODO: Handle int, float, pointer negation |
| 1921 | | return trans_create_node_prefix_op(c, PrefixOpBoolNot, sub_node); |
| 1921 | return trans_create_node_prefix_op(c, PrefixOpBoolNot, trans_to_bool_expr(c, scope, sub_node)); |
| 1922 | 1922 | case UO_Not: |
| 1923 | 1923 | return trans_create_node_prefix_op(c, PrefixOpBinNot, sub_node); |
| 1924 | 1924 | default: |
| ... | ... | @@ -2291,7 +2291,7 @@ static AstNode *trans_while_loop(Context *c, TransScope *scope, const WhileStmt |
| 2291 | 2291 | |
| 2292 | 2292 | TransScope *body_scope = trans_stmt(c, &while_scope->base, stmt->getBody(), |
| 2293 | 2293 | &while_scope->node->data.while_expr.body); |
| 2294 | | if (body_scope == nullptr) |
| 2294 | if (body_scope == nullptr) |
| 2295 | 2295 | return nullptr; |
| 2296 | 2296 | |
| 2297 | 2297 | return while_scope->node; |