commit cb012490eeae618b42361990872b9001e5672be1 (tree)
parent 57995c210064e954913d1f4ee16f315e78aa1a46
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 5 Dec 2022 14:05:40 -0700
translate-c: fix wrong logic adjustment
In ea9ad1e85dd5e2ba18e7d55f7a7f9694282159f1, I incorrectly applied
boolean logic to one of the pieces of logic, resulting in a regression
in translate-c.
Diffstat:
1 file changed, 0 insertions(+), 6 deletions(-)
diff --git a/src/translate_c/ast.zig b/src/translate_c/ast.zig
@@ -1434,12 +1434,6 @@ fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {
.optional_type => return renderPrefixOp(c, node, .optional_type, .question_mark, "?"),
.address_of => {
const payload = node.castTag(.address_of).?.data;
- if (payload.tag() == .fn_identifier)
- return try c.addNode(.{
- .tag = .identifier,
- .main_token = try c.addIdentifier(payload.castTag(.fn_identifier).?.data),
- .data = undefined,
- });
const ampersand = try c.addToken(.ampersand, "&");
const base = if (payload.tag() == .fn_identifier)