| ... | @@ -3058,7 +3058,6 @@ fn transCreateCompoundAssign( | ... | @@ -3058,7 +3058,6 @@ fn transCreateCompoundAssign( |
| 3058 | // common case | 3058 | // common case |
| 3059 | // c: lhs += rhs | 3059 | // c: lhs += rhs |
| 3060 | // zig: lhs += rhs | 3060 | // zig: lhs += rhs |
| 3061 | | | |
| 3062 | if ((is_mod or is_div) and is_signed) { | 3061 | if ((is_mod or is_div) and is_signed) { |
| 3063 | const op_token = try appendToken(rp.c, .Equal, "="); | 3062 | const op_token = try appendToken(rp.c, .Equal, "="); |
| 3064 | const op_node = try rp.c.a().create(ast.Node.InfixOp); | 3063 | const op_node = try rp.c.a().create(ast.Node.InfixOp); |
| ... | @@ -4773,7 +4772,6 @@ pub fn failDecl(c: *Context, loc: ZigClangSourceLocation, name: []const u8, comp | ... | @@ -4773,7 +4772,6 @@ pub fn failDecl(c: *Context, loc: ZigClangSourceLocation, name: []const u8, comp |
| 4773 | const msg_tok = try appendTokenFmt(c, .StringLiteral, "\"" ++ format ++ "\"", args); | 4772 | const msg_tok = try appendTokenFmt(c, .StringLiteral, "\"" ++ format ++ "\"", args); |
| 4774 | const rparen_tok = try appendToken(c, .RParen, ")"); | 4773 | const rparen_tok = try appendToken(c, .RParen, ")"); |
| 4775 | const semi_tok = try appendToken(c, .Semicolon, ";"); | 4774 | const semi_tok = try appendToken(c, .Semicolon, ";"); |
| 4776 | _ = try appendTokenFmt(c, .LineComment, "// {}", .{c.locStr(loc)}); | | |
| 4777 | | 4775 | |
| 4778 | const msg_node = try c.a().create(ast.Node.StringLiteral); | 4776 | const msg_node = try c.a().create(ast.Node.StringLiteral); |
| 4779 | msg_node.* = ast.Node.StringLiteral{ | 4777 | msg_node.* = ast.Node.StringLiteral{ |
| ... | @@ -5442,7 +5440,7 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, | ... | @@ -5442,7 +5440,7 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, |
| 5442 | }; | 5440 | }; |
| 5443 | return &node.base; | 5441 | return &node.base; |
| 5444 | } else { | 5442 | } else { |
| 5445 | const token = try appendTokenFmt(c, .IntegerLiteral, "0x{x}", .{source[tok.start+1..tok.end-1]}); | 5443 | const token = try appendTokenFmt(c, .IntegerLiteral, "0x{x}", .{source[tok.start + 1 .. tok.end - 1]}); |
| 5446 | const node = try c.a().create(ast.Node.IntegerLiteral); | 5444 | const node = try c.a().create(ast.Node.IntegerLiteral); |
| 5447 | node.* = .{ | 5445 | node.* = .{ |
| 5448 | .token = token, | 5446 | .token = token, |