From 70e935db5bc16e5a7144dd0de3176d53dd892301 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 25 Feb 2021 21:27:56 -0700 Subject: [PATCH] translate-c: fix botched merge conflict Previous commit failed to correctly solve the translate-c merge conflict; this commit fixes it. --- src/translate_c.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/translate_c.zig b/src/translate_c.zig index 22dacce696..616e6340b8 100644 --- a/src/translate_c.zig +++ b/src/translate_c.zig @@ -2449,8 +2449,8 @@ fn transSwitchProngStmtInline( fn transConstantExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node { var result: clang.ExprEvalResult = undefined; - if (!expr.evaluateAsConstantExpr(&result, .Normal, rp.c.clang_context)) - return revertAndWarn(rp, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid constant expression", .{}); + if (!expr.evaluateAsConstantExpr(&result, .Normal, c.clang_context)) + return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid constant expression", .{}); switch (result.Val.getKind()) { .Int => {