| ... | @@ -1875,8 +1875,13 @@ static AstNode *trans_unary_operator(Context *c, ResultUsed result_used, TransSc | ... | @@ -1875,8 +1875,13 @@ static AstNode *trans_unary_operator(Context *c, ResultUsed result_used, TransSc |
| 1875 | } | 1875 | } |
| 1876 | } | 1876 | } |
| 1877 | case UO_Not: | 1877 | case UO_Not: |
| 1878 | emit_warning(c, stmt->getLocStart(), "TODO handle C translation UO_Not"); | 1878 | { |
| 1879 | return nullptr; | 1879 | Expr *op_expr = stmt->getSubExpr(); |
| | 1880 | AstNode *sub_node = trans_expr(c, ResultUsedYes, scope, op_expr, TransRValue); |
| | 1881 | if (sub_node == nullptr) |
| | 1882 | return nullptr; |
| | 1883 | return trans_create_node_prefix_op(c, PrefixOpBinNot, sub_node); |
| | 1884 | } |
| 1880 | case UO_LNot: | 1885 | case UO_LNot: |
| 1881 | emit_warning(c, stmt->getLocStart(), "TODO handle C translation UO_LNot"); | 1886 | emit_warning(c, stmt->getLocStart(), "TODO handle C translation UO_LNot"); |
| 1882 | return nullptr; | 1887 | return nullptr; |