mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
translate-c: fix botched merge conflict
Previous commit failed to correctly solve the translate-c merge conflict; this commit fixes it.
This commit is contained in:
parent
0b58b61799
commit
70e935db5b
@ -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 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user