fix translate-c regression

master
Andrew Kelley 2019-03-18 20:09:27 -04:00
parent a581f4f0e2
commit 85256521ba
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 4 additions and 1 deletions

View File

@ -1292,7 +1292,8 @@ static AstNode *trans_integer_literal(Context *c, ResultUsed result_used, const
emit_warning(c, stmt->getBeginLoc(), "invalid integer literal");
return nullptr;
}
return trans_create_node_apint(c, result.Val.getInt());
AstNode *node = trans_create_node_apint(c, result.Val.getInt());
return maybe_suppress_result(c, result_used, node);
}
static AstNode *trans_constant_expr(Context *c, ResultUsed result_used, const clang::ConstantExpr *expr) {

View File

@ -1015,6 +1015,7 @@ pub const TranslateCContext = struct {
\\============================================
\\
, stderr);
printInvocation(zig_args.toSliceConst());
return error.TestFailed;
}
@ -1028,6 +1029,7 @@ pub const TranslateCContext = struct {
\\{}
\\
, expected_line, stdout);
printInvocation(zig_args.toSliceConst());
return error.TestFailed;
}
}