Commit 98eea963de
Changed files (3)
src/translate_c.zig
@@ -1969,7 +1969,7 @@ fn transBuiltinFnExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used:
const node = try transExpr(c, scope, expr, used);
if (node.castTag(.identifier)) |ident| {
const name = ident.data;
- if (!isBuiltinDefined(name)) return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "TODO implement function '{s}' in std.c.builtins", .{name});
+ if (!isBuiltinDefined(name)) return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "TODO implement function '{s}' in std.zig.c_builtins", .{name});
}
return node;
}
@@ -5574,7 +5574,7 @@ fn parseCPrimaryExprInner(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!N
.Identifier => {
const mangled_name = scope.getAlias(slice);
if (mem.startsWith(u8, mangled_name, "__builtin_") and !isBuiltinDefined(mangled_name)) {
- try m.fail(c, "TODO implement function '{s}' in std.c.builtins", .{mangled_name});
+ try m.fail(c, "TODO implement function '{s}' in std.zig.c_builtins", .{mangled_name});
return error.ParseError;
}
const identifier = try Tag.identifier.create(c.arena, builtin_typedef_map.get(mangled_name) orelse mangled_name);
test/run_translated_c.zig
@@ -1243,7 +1243,7 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void {
\\}
, "");
- // See __builtin_alloca_with_align comment in std.c.builtins
+ // See __builtin_alloca_with_align comment in std.zig.c_builtins
cases.add("use of unimplemented builtin in unused function does not prevent compilation",
\\#include <stdlib.h>
\\void unused() {
test/translate_c.zig
@@ -3461,11 +3461,11 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
\\pub const MAY_NEED_PROMOTION_OCT = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0o20000000000, .octal);
});
- // See __builtin_alloca_with_align comment in std.c.builtins
+ // See __builtin_alloca_with_align comment in std.zig.c_builtins
cases.add("demote un-implemented builtins",
\\#define FOO(X) __builtin_alloca_with_align((X), 8)
, &[_][]const u8{
- \\pub const FOO = @compileError("TODO implement function '__builtin_alloca_with_align' in std.c.builtins");
+ \\pub const FOO = @compileError("TODO implement function '__builtin_alloca_with_align' in std.zig.c_builtins");
});
cases.add("null sentinel arrays when initialized from string literal. Issue #8256",