Commit e2cb977
Automerge: [clangd] Strip invalid fromRanges for outgoing calls (#134657)
`CallHierarchyOutgoingCall::fromRanges` are interpreted as ranges in the
same file as the item for which 'outgoingCalls' was called.
It's possible for outgoing calls to be in a different file than that
item if the item is just a declaration (e.g. in a header file). Now,
such calls are dropped instead of being returned to the client.
This is the same as the change made in #111616, but now for outgoing
calls.
Fixes clangd/clangd#2350
---------
Co-authored-by: Nathan Ridge <[email protected]>File tree
2 files changed
+35
-11
lines changed- clang-tools-extra/clangd
- unittests
2 files changed
+35
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2380 | 2380 | | |
2381 | 2381 | | |
2382 | 2382 | | |
2383 | | - | |
| 2383 | + | |
2384 | 2384 | | |
2385 | 2385 | | |
2386 | 2386 | | |
| |||
2390 | 2390 | | |
2391 | 2391 | | |
2392 | 2392 | | |
2393 | | - | |
2394 | | - | |
| 2393 | + | |
| 2394 | + | |
2395 | 2395 | | |
2396 | 2396 | | |
2397 | 2397 | | |
| |||
2411 | 2411 | | |
2412 | 2412 | | |
2413 | 2413 | | |
2414 | | - | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
2415 | 2427 | | |
2416 | | - | |
| 2428 | + | |
| 2429 | + | |
2417 | 2430 | | |
2418 | 2431 | | |
2419 | 2432 | | |
| |||
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
386 | | - | |
| 387 | + | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
390 | 396 | | |
391 | 397 | | |
392 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
393 | 402 | | |
394 | 403 | | |
395 | | - | |
| 404 | + | |
| 405 | + | |
396 | 406 | | |
397 | | - | |
| 407 | + | |
| 408 | + | |
398 | 409 | | |
399 | 410 | | |
400 | 411 | | |
| |||
423 | 434 | | |
424 | 435 | | |
425 | 436 | | |
426 | | - | |
| 437 | + | |
427 | 438 | | |
428 | 439 | | |
429 | 440 | | |
430 | 441 | | |
431 | 442 | | |
432 | 443 | | |
433 | 444 | | |
434 | | - | |
| 445 | + | |
435 | 446 | | |
436 | 447 | | |
437 | 448 | | |
| |||
0 commit comments