From 0e57f694be4fd6694be6599636adfe6e95b17987 Mon Sep 17 00:00:00 2001 From: Techarix <19954306+Techatrix@users.noreply.github.com> Date: Fri, 23 Jun 2023 21:50:04 +0200 Subject: [PATCH] update analysis of builtin functions --- src/analysis.zig | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/analysis.zig b/src/analysis.zig index 8b8aeb4..f63861d 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -989,16 +989,22 @@ fn resolveTypeOfNodeUncached(analyser: *Analyser, node_handle: NodeWithHandle) e const cast_map = std.ComptimeStringMap(void, .{ .{"@as"}, + .{"@atomicLoad"}, + .{"@atomicRmw"}, + .{"@atomicStore"}, .{"@bitCast"}, - .{"@fieldParentPtr"}, + .{"@mulAdd"}, + .{"@errSetCast"}, + .{"@fieldParentPtr"}, // the return type is actually a pointer .{"@floatCast"}, - .{"@floatToInt"}, + .{"@intFromFloat"}, .{"@intCast"}, - .{"@intToEnum"}, - .{"@intToFloat"}, - .{"@intToPtr"}, - .{"@truncate"}, + .{"@enumFromInt"}, + .{"@floatFromInt"}, + .{"@ptrFromInt"}, .{"@ptrCast"}, + .{"@truncate"}, + .{"@unionInit"}, }); if (cast_map.has(call_name)) { if (params.len < 1) return null;