Translate C: Add comment containing c source location for failed decls
This commit is contained in:
parent
abe7305e16
commit
0db108101a
|
@ -4687,6 +4687,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…
Reference in New Issue
Block a user