gh-98390: Fix source locations of boolean sub-expressions (GH-98396)

This commit is contained in:
Irit Katriel 2022-10-18 17:18:38 +01:00 committed by GitHub
parent debacd9ad5
commit c051d55ddb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View file

@ -2953,7 +2953,7 @@ compiler_jump_if(struct compiler *c, location *ploc,
/* general implementation */
VISIT(c, expr, e);
ADDOP_JUMP(c, *ploc, cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next);
ADDOP_JUMP(c, LOC(e), cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next);
return 1;
}