Commit Graph

2384 Commits

Author SHA1 Message Date
Egor Zhdan
62d388a09f Merge pull request #84435 from egorzhdan/egorzhdan/do-not-generate-interface-twice
[cxx-interop] Avoid trying to generate module interfaces twice
2025-10-07 17:50:11 +01:00
swift-ci
499f4ff714 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-29 06:15:20 -07:00
Egor Zhdan
a610bcd752 [cxx-interop] Avoid trying to generate module interfaces twice
This reverts most of 72050c5385, which led to decreased performance of jump-to-definition.

Instead of re-attempting to generate a module interface with C++ interop enabled, Swift should rely on the IDE to pass the correct `-cxx-interoperability-mode=` value to SourceKit.

rdar://149061322
2025-09-22 18:48:20 +01:00
Ahmed Mahmoud
2f6064675e [IDE] Move signature help formatting to IDE instead of SourceKit 2025-09-19 18:24:57 +03:00
swift-ci
0d2c4ca9be Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 10:29:21 -07:00
Meghana Gupta
c764244df0 Merge pull request #84180 from meg-gupta/borrowandmutatepr
Add preliminary support for borrow accessors
2025-09-15 10:01:15 -07:00
swift-ci
4c7c8c2e22 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-15 06:58:07 -07:00
Hamish Knight
607abb99f9 Merge pull request #84272 from a7medev/add-parameter-name-to-signature
[IDE] Add internal parameter names in signature help
2025-09-15 14:46:13 +01:00
swift-ci
4bbfc9db04 Merge remote-tracking branch 'origin/main' into rebranch 2025-09-13 17:40:42 -07:00
Ahmed Mahmoud
cb9afaa106 [IDE] Add doc comments for SignatureHelpResponse 2025-09-13 15:27:23 +03:00
Ahmed Mahmoud
7dcc341a82 [IDE] Add internal parameter names in signature help 2025-09-13 15:26:33 +03:00
Meghana Gupta
9fe489ce22 Introduce borrow and mutate as new accessor kinds
And handle them in various covered switches
2025-09-09 14:30:26 -07:00
Ahmed Mahmoud
b1375f753a [Test] Add signaturehelp to supported requests list in sourcekitd-test 2025-09-06 01:00:31 +03:00
Anthony Latsis
e1450e011e Manually merge remote-tracking branch 'origin/main' into rebranch
Conflicts:
*	utils/build_swift/build_swift/defaults.py
2025-09-04 14:07:50 +01:00
Ahmed Elrefaey
9d1436c1c8 [IDE] [Signature Help] Add basic signature help request to SourceKit (#83378) 2025-09-04 10:09:02 +01:00
Ahmed Elrefaey
1bc96857a8 Merge pull request #82464 from a7medev/feat/full-documentation-in-code-completion
[IDE] Add full documentation to code completion result
2025-09-04 10:06:21 +01:00
swift-ci
8309156358 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-31 09:55:24 -07:00
Owen Voorhees
57062d85ae Merge pull request #84031 from owenv/owenv/sourcekit-remarks 2025-08-31 09:47:02 -07:00
Owen Voorhees
593346ab0d Include remarks in SourceKit diagnostics responses 2025-08-30 22:17:00 -07:00
swift-ci
5ed4b2a070 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-28 13:06:19 -07:00
Hamish Knight
a3edf17b24 [SourceKit] Fix assertion failure in sortTopN
With the unqualified fallback we start to hit this assertion for
`return nil` in failable intializers. We ought to be able to just
skip over literal buckets though.
2025-08-25 11:13:40 +01:00
swift-ci
e93ab979eb Merge remote-tracking branch 'origin/main' into rebranch 2025-08-14 05:15:47 -07:00
Kavon Farvardin
771c99f895 cmake: add support for bootstrapping with swiftly
For hosts that have a swiftly-managed Swift compiler, we could not
bootstrap using those tools, because of some hardcoded assumptions
about where the `/lib` directory lives, relative to the `/bin`
directory that contains the detected `swiftc`.

This patch adds specific support for detecting when the `swiftc`
is coming from a swiftly install and uses the correct paths.

I've tested this patch on my Linux machine that has swiftly 1.0.1,
with the Swift 6.1.2 toolchain.
2025-08-13 14:41:01 -07:00
swift-ci
5c840b6e1a Merge remote-tracking branch 'origin/main' into rebranch 2025-08-07 18:54:54 -07:00
Alex Hoppen
2d2adfb017 Merge pull request #82947 from ahoppen/compress-index
[Index] Add an option to compress the record and unit files
2025-08-07 21:12:39 +02:00
swift-ci
3998a187f9 Merge remote-tracking branch 'origin/main' into rebranch 2025-07-30 09:36:41 -07:00
Anthony Latsis
fec049e5e4 Address llvm::PointerUnion::{is,get} deprecations
These were deprecated in
https://github.com/llvm/llvm-project/pull/122623.
2025-07-29 18:37:48 +01:00
swift-ci
367f0082fc Merge remote-tracking branch 'origin/main' into rebranch 2025-07-22 22:17:45 -07:00
Anthony Latsis
2920ea84d1 Address llvm::(Mutable)ArrayRef ctor deprecations
See:
- https://github.com/llvm/llvm-project/pull/146113
- https://github.com/llvm/llvm-project/pull/146011
2025-07-21 12:36:53 +01:00
Alex Hoppen
ed3b64af2c [Index] Add an option to compress the record and unit files
Companion of https://github.com/swiftlang/llvm-project/pull/10977.
2025-07-10 15:23:51 +02:00
swift-ci
922f9bf099 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-26 04:35:23 -07:00
Hamish Knight
55ef1bcaf0 [SourceKit] Print backticks if needed in printDisplayName
Ensure we print raw identifier names with backticks for e.g the
document structure request.

rdar://152524780
2025-06-25 15:15:17 +01:00
swift-ci
601c7fa8f4 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-24 09:17:51 -07:00
Evan Wilde
90eed66da0 FreeBSD: Set sourcekitInProc rpaths
The sourcekit in proc dynamic library looks up runtimes in a spot
relative to the Swift compiler. Set this location on freebsd, fixing the
sourcekit tests.
2025-06-23 14:16:14 -07:00
swift-ci
789bd8bd9c Merge remote-tracking branch 'origin/main' into rebranch 2025-06-19 02:17:51 -07:00
John Hui
a0d3ad7bd0 Merge pull request #82006 from j-hui/jump-to-def-for-macro-expanded-clang-imports
[SourceKit] Support location info for macro-expanded Clang imports
2025-06-19 02:01:40 -07:00
swift-ci
a626a79577 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-18 20:55:46 -07:00
John Hui
6b36996081 [NFC] Refactor setLocationInfo to return LocationInfo instead 2025-06-18 02:26:15 -07:00
(null)
d6811260a9 Merge commit '665515c781999a81094bbe4f8302a7cb1a6a6b39' into mchiu/freebsd 2025-06-17 15:12:23 -04:00
John Hui
44aba1382d [SourceKit] Support location info for macro-expanded Clang imports
Currently, when we jump-to-definition for decls that are macro-expanded
from Clang imported decls (e.g., safe overloads generated by
@_SwiftifyImport), setLocationInfo() emits a bongus location pointing to
a generated buffer, leading the IDE to try to jump to a file that does
not exist.

The root cause here is that setLocationInfo() calls getOriginalRange()
(earlier, getOriginalLocation()), which was not written to account for
such cases where a macro is generated from another generated buffer
whose kind is 'AttributeFromClang'.

This patch fixes setLocationInfo() with some refactoring:

-   getOriginalRange() is inlined into setLocationInfo(), so that the
    generated buffer-handling logic is localized to that function. This
    includes how it handles buffers generated for ReplacedFunctionBody.

-   getOriginalLocation() is used in a couple of other places that only
    care about macros expanded from the same buffer (so other generated
    buffers not not relevant). This "macro-chasing" logic is simplified
    and moved from ModuleDecl::getOriginalRange() to a free-standing
    function, getMacroUnexpandedRange() (there is no reason for it to be
    a method of ModuleDecl).

-   GeneratedSourceInfo now carries an extra ClangNode field, which is
    populated by getClangSwiftAttrSourceFile() when constructing
    a generated buffer for an 'AttributeFromClang'. This could probably
    be union'ed with one or more of the other fields in the future.

rdar://151020332
2025-06-12 18:22:06 -07:00
swift-ci
464b9ece6d Merge remote-tracking branch 'origin/main' into rebranch 2025-06-10 08:35:01 -07:00
Hamish Knight
8f4fbe3d9a [cmake] Remove remaining XCODE checks
I missed these when ripping out support for CMake Xcode project
generation.
2025-06-09 22:16:12 +01:00
swift-ci
161f6727b7 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-05 04:53:29 -07:00
Alex Hoppen
021cdd4416 Merge pull request #81975 from ahoppen/sema-annotate-source-range 2025-06-05 13:49:54 +02:00
Alex Hoppen
c6c40de73d [IDE] Pass a SourceRange instead of a CharSourceRange in SemaAnnotator::passReference
Most `SemaAnnotator`s don’t actually care about the char source range. Instead, they only care about the start location of the reference, which is also included in `SourceRange`. Computing a `CharSourceRange` from a `SourceRange` is kind of expensive because it needs to start a new lexer.

To avoid this overhead, pass `SourceRange` to `SemaAnnotator::passReference` and related functions and let the clients compute the `CharSourceRange` when needed.

This reduces the overhead of index-while-building by about 10%.
2025-06-04 18:01:47 +02:00
Michael Chiu
7bbafc599d Merge branch 'main' into mchiu/freebsd 2025-06-02 13:33:18 -04:00
swift-ci
f6526c0013 Merge remote-tracking branch 'origin/main' into rebranch 2025-06-02 10:00:43 -07:00
Pavel Yaskevich
816ea9fda6 [CodeCompletion] Implement completions in using declaration's specifier position 2025-05-30 00:39:06 -07:00
swift-ci
82545aecbb Merge remote-tracking branch 'origin/main' into rebranch 2025-05-29 12:37:25 -07:00
michael-yuji
8738e722bd Merge branch 'main' into mchiu/freebsd 2025-05-28 14:44:11 -07:00