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.
This commit is contained in:
Andrew Kelley
2022-12-05 14:05:40 -07:00
parent 57995c2100
commit cb012490ee

View File

@@ -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)