Commit Graph

5 Commits

Author SHA1 Message Date
Alex Hoppen
e5c521c999 [CursorInfo] Fix issues found by the stress tester 2023-03-20 08:09:10 -07:00
Alex Hoppen
05b59d1462 [IDE] Support reporting multiple cursor results
This hooks up the cursor info infrastructure to be able to pass through multiple, ambiguous results. There are still minor issues that cause solver-based cursor info to not actually report the ambiguous results but those will be fixed in a follow-up PR.
2023-03-20 08:09:10 -07:00
Alex Hoppen
ee26b4b299 [SourceKit] Pass ResolvedCursorInfo as shared pointer instead of by value
This allows us to model the `ResolvedCursorInfo` types as a proper type hierarchy instead of having to store all values in the base `ResolvedCursorInfo` type.

rdar://102853071
2023-02-14 22:40:45 +01:00
Alex Hoppen
fe2ae72ad2 [IDE] Rename CodeCompletion to IDEInspection in cases where the code path no longer exclusively applies to code completion
The code completio infrastructure is also being used for cursor info now, so it should no longer be called code completion.

rdar://103251187
2022-12-13 11:41:05 +01:00
Alex Hoppen
a8dd6819b5 [IDE] Implement completion-like cursor info for ValueDecls
This brings up the ability to compute cursor info results using the completion-like type checking paradigm, which an reuse ASTContexts and doesn’t need to type check the entire file.

For now, the new implementation only supports cursor info on `ValueDecl`s (not on references) because they were easiest to implement. More cursor info kinds are coming soon.

At the moment, we only run the new implementation in a verification mode: It is only invoked in assert toolchains and when run, we check that the results are equivalent to the old implementation. Once more cursor info kinds are implemented and if the SourceKit stress tester doesn’t find any verification issues, we can enable the new implementation, falling back to the old implementation if the new one didn’t produce any results.
2022-12-08 14:39:14 +01:00