authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-10-16 11:41:51+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-10-19 19:21:33+01:00
log830230176df9d25c82980ba39790665e92eda13b
tree12f55b1552e13639d388a1a7c69820952afa9798
parent3ef8bb6354a4ffff18843c574b596b32d9b675e1
signaturelock-open Commit is signed but in an unrecognized format.

std: update uses of `.Inline` callconv


2 files changed, 6 insertions(+), 6 deletions(-)

lib/std/zig/c_builtins.zig+1-1
......@@ -265,4 +265,4 @@ pub fn __builtin_mul_overflow(a: anytype, b: anytype, result: *@TypeOf(a, b)) c_
265265// It is used in a run-translated-c test and a test-translate-c test to ensure that non-implemented
266266// builtins are correctly demoted. If you implement __builtin_alloca_with_align, please update the
267267// run-translated-c test and the test-translate-c test to use a different non-implemented builtin.
268// pub fn __builtin_alloca_with_align(size: usize, alignment: usize) callconv(.Inline) *anyopaque {}
268// pub inline fn __builtin_alloca_with_align(size: usize, alignment: usize) *anyopaque {}
lib/std/zig/parser_test.zig+5-5
......@@ -107,15 +107,15 @@ test "zig fmt: respect line breaks before functions" {
107107 );
108108}
109109
110test "zig fmt: rewrite callconv(.Inline) to the inline keyword" {
110test "zig fmt: rewrite callconv(.@\"inline\") to the inline keyword" {
111111 try testTransform(
112 \\fn foo() callconv(.Inline) void {}
113 \\const bar = .Inline;
112 \\fn foo() callconv(.@"inline") void {}
113 \\const bar: @import("std").builtin.CallingConvention = .@"inline";
114114 \\fn foo() callconv(bar) void {}
115115 \\
116116 ,
117117 \\inline fn foo() void {}
118 \\const bar = .Inline;
118 \\const bar: @import("std").builtin.CallingConvention = .@"inline";
119119 \\fn foo() callconv(bar) void {}
120120 \\
121121 );
......@@ -3062,7 +3062,7 @@ test "zig fmt: functions" {
30623062 \\pub export fn puts(s: *const u8) align(2 + 2) c_int;
30633063 \\pub inline fn puts(s: *const u8) align(2 + 2) c_int;
30643064 \\pub noinline fn puts(s: *const u8) align(2 + 2) c_int;
3065 \\pub fn callInlineFn(func: fn () callconv(.Inline) void) void {
3065 \\pub fn callInlineFn(func: fn () callconv(.@"inline") void) void {
30663066 \\ func();
30673067 \\}
30683068 \\