aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorCasey Banner <kcbanner@gmail.com>2023-04-26 10:30:46 -0400
committerGitHub <noreply@github.com>2023-04-26 17:30:46 +0300
commitbc4d9f3aa93ad58f9cbc75021dc297f29dcf2961 (patch)
tree3b4a79951526d1e603018144c93e467ef412fc87 /lib/std/debug.zig
parent7285eedcd26b92afb03c313a167133103a78ded5 (diff)
downloadzig-bc4d9f3aa93ad58f9cbc75021dc297f29dcf2961.tar.gz
zig-bc4d9f3aa93ad58f9cbc75021dc297f29dcf2961.zip
translate-c: fix codegen when C source has variables named the same as mangling prefixes
If the C code had variables that were named the same as the prefixes used for name mangling, such as "tmp" or "ref", then the codegen would generate incorrect code in some cases. This was because these aliases were immediately visible to expressions that actually needed to use the original name. I introduced the concept of reserving aliases without enabling them. An alias that isn't enabled isn't visible to expression translation, but is still reserved so that sub-expressions generate aliases that don't overlap. Add test cases to cover the cases that would break before this change. Co-authored-by: Veikka Tuominen <git@vexu.eu>
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions