mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[qfcc] Get ?: working for references
And spir-v (missed test_expr, and test_expr wasn't dereferencing the test).
This commit is contained in:
parent
1e58ca394b
commit
e179b10455
2 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,9 @@ test_expr (const expr_t *e)
|
|||
}
|
||||
return error (e, "void has no value");
|
||||
}
|
||||
if (is_reference (type)) {
|
||||
e = pointer_deref (e);
|
||||
}
|
||||
e = current_target.test_expr (e);
|
||||
fold_constants (e);
|
||||
return edag_add_expr (e);
|
||||
|
|
|
@ -609,6 +609,7 @@ proc_cond (const expr_t *expr, rua_ctx_t *ctx)
|
|||
{
|
||||
scoped_src_loc (expr);
|
||||
auto test = expr_process (expr->cond.test, ctx);
|
||||
test = test_expr (test);
|
||||
auto true_expr = expr_process (expr->cond.true_expr, ctx);
|
||||
auto false_expr = expr_process (expr->cond.false_expr, ctx);
|
||||
if (is_error (test)) {
|
||||
|
|
Loading…
Reference in a new issue