mirror of
https://github.com/ziglang/zig.git
synced 2025-12-26 08:03:08 +00:00
Merge pull request #4684 from LakeByTheWoods/comment_failed_decls
Translate C: Add comment containing c source location for failed decls
This commit is contained in:
commit
adaf7ad672
@ -4773,6 +4773,7 @@ pub fn failDecl(c: *Context, loc: ZigClangSourceLocation, name: []const u8, comp
|
||||
const msg_tok = try appendTokenFmt(c, .StringLiteral, "\"" ++ format ++ "\"", args);
|
||||
const rparen_tok = try appendToken(c, .RParen, ")");
|
||||
const semi_tok = try appendToken(c, .Semicolon, ";");
|
||||
_ = try appendTokenFmt(c, .LineComment, "// {}", .{c.locStr(loc)});
|
||||
|
||||
const msg_node = try c.a().create(ast.Node.StringLiteral);
|
||||
msg_node.* = ast.Node.StringLiteral{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user