| ... | @@ -5939,10 +5939,11 @@ pub fn argSrc( | ... | @@ -5939,10 +5939,11 @@ pub fn argSrc( |
| 5939 | call_node_offset: i32, | 5939 | call_node_offset: i32, |
| 5940 | gpa: Allocator, | 5940 | gpa: Allocator, |
| 5941 | decl: *Decl, | 5941 | decl: *Decl, |
| 5942 | arg_i: usize, | 5942 | start_arg_i: usize, |
| 5943 | bound_arg_src: ?LazySrcLoc, | 5943 | bound_arg_src: ?LazySrcLoc, |
| 5944 | ) LazySrcLoc { | 5944 | ) LazySrcLoc { |
| 5945 | if (arg_i == 0 and bound_arg_src != null) return bound_arg_src.?; | 5945 | if (start_arg_i == 0 and bound_arg_src != null) return bound_arg_src.?; |
| | 5946 | const arg_i = start_arg_i - @boolToInt(bound_arg_src != null); |
| 5946 | @setCold(true); | 5947 | @setCold(true); |
| 5947 | const tree = decl.getFileScope().getTree(gpa) catch |err| { | 5948 | const tree = decl.getFileScope().getTree(gpa) catch |err| { |
| 5948 | // In this case we emit a warning + a less precise source location. | 5949 | // In this case we emit a warning + a less precise source location. |
| ... | @@ -5957,6 +5958,12 @@ pub fn argSrc( | ... | @@ -5957,6 +5958,12 @@ pub fn argSrc( |
| 5957 | const full = switch (node_tags[node]) { | 5958 | const full = switch (node_tags[node]) { |
| 5958 | .call_one, .call_one_comma, .async_call_one, .async_call_one_comma => tree.callOne(&args, node), | 5959 | .call_one, .call_one_comma, .async_call_one, .async_call_one_comma => tree.callOne(&args, node), |
| 5959 | .call, .call_comma, .async_call, .async_call_comma => tree.callFull(node), | 5960 | .call, .call_comma, .async_call, .async_call_comma => tree.callFull(node), |
| | 5961 | .builtin_call => { |
| | 5962 | const node_datas = tree.nodes.items(.data); |
| | 5963 | const call_args_node = tree.extra_data[node_datas[node].rhs - 1]; |
| | 5964 | const call_args_offset = decl.nodeIndexToRelative(call_args_node); |
| | 5965 | return initSrc(call_args_offset, gpa, decl, arg_i); |
| | 5966 | }, |
| 5960 | else => unreachable, | 5967 | else => unreachable, |
| 5961 | }; | 5968 | }; |
| 5962 | return LazySrcLoc.nodeOffset(decl.nodeIndexToRelative(full.ast.params[arg_i])); | 5969 | return LazySrcLoc.nodeOffset(decl.nodeIndexToRelative(full.ast.params[arg_i])); |
| ... | @@ -5989,7 +5996,7 @@ pub fn initSrc( | ... | @@ -5989,7 +5996,7 @@ pub fn initSrc( |
| 5989 | .struct_init_dot_two, .struct_init_dot_two_comma => tree.structInitDotTwo(&buf, node).ast.fields, | 5996 | .struct_init_dot_two, .struct_init_dot_two_comma => tree.structInitDotTwo(&buf, node).ast.fields, |
| 5990 | .struct_init_dot, .struct_init_dot_comma => tree.structInitDot(node).ast.fields, | 5997 | .struct_init_dot, .struct_init_dot_comma => tree.structInitDot(node).ast.fields, |
| 5991 | .struct_init, .struct_init_comma => tree.structInit(node).ast.fields, | 5998 | .struct_init, .struct_init_comma => tree.structInit(node).ast.fields, |
| 5992 | else => unreachable, | 5999 | else => return LazySrcLoc.nodeOffset(init_node_offset), |
| 5993 | }; | 6000 | }; |
| 5994 | switch (node_tags[node]) { | 6001 | switch (node_tags[node]) { |
| 5995 | .array_init_one, | 6002 | .array_init_one, |