diff options
| author | 2026-10-15 10:11:56 +0330 | |
|---|---|---|
| committer | 2026-10-15 10:11:56 +0330 | |
| commit | e1e0a265e931637f452ac05bb7d912e07bcee574 (patch) | |
| tree | 60289bb1fc3d812dfc576f01e0f8a83091a495c1 /src/compiler/analyzer.zc | |
| parent | analyzer: check borrow returns of forward-called functions at the unit's end;... (diff) | |
lsp: borrow errors ranged on the use, with related information for where the owner ended and was declared; vscode client passes relatedInformation through
Diffstat (limited to 'src/compiler/analyzer.zc')
| -rw-r--r-- | src/compiler/analyzer.zc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/analyzer.zc b/src/compiler/analyzer.zc index 103f732..ff6a6c1 100644 --- a/src/compiler/analyzer.zc +++ b/src/compiler/analyzer.zc @@ -1002,9 +1002,10 @@ int lend_drop(int dep, int from) { // or untracked memory, 7 freed by reassigning it, 8 pushed into end_whom. int end_why; char* end_whom; int end_owner(int i) { - int j = lbase; word info = talloc(5); + int j = lbase; word info = talloc(6); lend_check(i); info[0] = lname[i]; info[1] = lpos[i]; info[2] = tpack(); info[3] = end_why; info[4] = end_whom; + info[5] = lreadpos[i]; if (!info[5]) info[5] = info[2]; // the owner's own token where it ended, for the editor end_why = 0; end_whom = 0; local_ended[i] = info[2]; local_end_info[i] = info; lstate[i] = S_DEAD; while (j < nloc) { |
