authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-25 21:27:56-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-25 21:27:56-07:00
log70e935db5bc16e5a7144dd0de3176d53dd892301
tree2bf0334734b9e2ae30a17f0af31f4066c2b8bbb5
parent0b58b617998b79a765b54f88fbe90ca2798b3d3e

translate-c: fix botched merge conflict

Previous commit failed to correctly solve the translate-c merge conflict; this commit fixes it.

1 files changed, 2 insertions(+), 2 deletions(-)

src/translate_c.zig+2-2
......@@ -2449,8 +2449,8 @@ fn transSwitchProngStmtInline(
24492449
24502450fn transConstantExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node {
24512451 var result: clang.ExprEvalResult = undefined;
2452 if (!expr.evaluateAsConstantExpr(&result, .Normal, rp.c.clang_context))
2453 return revertAndWarn(rp, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid constant expression", .{});
2452 if (!expr.evaluateAsConstantExpr(&result, .Normal, c.clang_context))
2453 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid constant expression", .{});
24542454
24552455 switch (result.Val.getKind()) {
24562456 .Int => {