| ... | ... | @@ -2449,8 +2449,8 @@ fn transSwitchProngStmtInline( |
| 2449 | 2449 | |
| 2450 | 2450 | fn transConstantExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node { |
| 2451 | 2451 | 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", .{}); |
| 2454 | 2454 | |
| 2455 | 2455 | switch (result.Val.getKind()) { |
| 2456 | 2456 | .Int => { |