Commit Graph

1419 Commits

Author SHA1 Message Date
Ben Langmuir
e08c31759e [sourcekit] Remove dead UID value
This was renamed at some point and the usage in complete-test has become
dead anyway, so clean it up.
2018-04-13 13:49:57 -07:00
swift-ci
c34d9349ca Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 22:53:54 -07:00
Rintaro Ishizaki
ad3e6b9471 [SourceKit] Make sourcekitd-test -req=demangle STDIN mode actually work
This didn't work at all because it didn't advance cursor after regex
matching.
Align regex with swift-demangle.
2018-04-11 20:08:52 +09:00
Rintaro Ishizaki
e9988589fb [SourceKit] Update demangle for new mangling
Use 'swift::Demangle::isSwiftSymbol()' instead of homemade function

rdar://problem/39286958
2018-04-11 20:08:27 +09:00
swift-ci
26651895b2 Merge remote-tracking branch 'origin/master' into master-next 2018-04-10 12:31:11 -07:00
Argyrios Kyrtzidis
3156180c08 [SourceKit] For the XPC service identifier, also include the platform name
This is useful because the embedded platforms may have the same toolchain version but they contain
different stdlibs. We need to make sure the XPC service name is unique between them, otherwise we may load
and use the incorrect toolchain service.

rdar://39077520
2018-04-10 11:24:55 -07:00
swift-ci
46b8a35b7a Merge remote-tracking branch 'origin/master' into master-next 2018-04-06 12:50:53 -07:00
Ben Langmuir
969f0f41f4 [sourcekitd] Capture diagnostics with invalid locations for compile notifications
Stop filtering out diagnostics with invalid locations in the editor
diagnostic consumer, and instead capture them separately so that we can
include them in did-compile notifications.

rdar://39225000
2018-04-06 11:36:01 -07:00
Ben Langmuir
cc51a8778f [sourcekitd] Remove dead method for checking invalid loc diagnostics 2018-04-05 16:02:32 -07:00
swift-ci
c21089ff19 Merge remote-tracking branch 'origin/master' into master-next 2018-03-30 17:29:07 -07:00
Ben Langmuir
10f21c77f3 Merge pull request #15641 from benlangmuir/compile-note-diags
[sourcekit] Add diagnostics to compile notification callback
2018-03-30 17:20:32 -07:00
swift-ci
77b3c53402 Merge remote-tracking branch 'origin/master' into master-next 2018-03-30 16:49:02 -07:00
Ben Langmuir
8c4c1863fc [sourcekit] Include diagnostics from code-completion in notification
The only interesting change here is that I stopped filtering out
non-note diagnostics from outside the "inputs".  This matches better how
code-completion gets inputs, and shouldn't hurt anything else since only
the tracing code will look at diagnostics that aren't in specific
buffers anyway.

rdar://38438512
2018-03-30 16:33:19 -07:00
Ben Langmuir
b78987a8c5 [sourcekit] Add diagnostics to compile notification callback
Compilations can now pass captured diagnostics as part of the
did-compile notification, and this was added to the SwiftASTManager.

rdar://38438512
2018-03-30 16:07:51 -07:00
Ben Langmuir
d8bb7d1c44 [sourcekitd-test] Synchronize notification printing
Notifications that we want to print for testing (e.g. with FileCheck)
are now buffered and drained explicitly from the queue that performs
requests.  This should prevent output intervleaving and ensure that we
actually print all the notifications that have been posted before
exiting (observed as rare test failures).

rdar://39048773
2018-03-30 15:31:33 -07:00
Ben Langmuir
8c78533e57 [sourcekit] Factor out common code for serializing diagnostics
Other than the extra field for the diagnostic stage in the editor
diagnostic handler, this code was byte-for-byte identical.
2018-03-30 10:19:29 -07:00
swift-ci
a597ade11b Merge remote-tracking branch 'origin/master' into master-next 2018-03-29 16:49:12 -07:00
Ben Langmuir
79d641d89b [sourcekit] Add optional compile notifications
When enabled, send a notification before/after every "compilation",
which for now means `performSema`. This piggy-backs and modifies some
existing code that we had for "tracing" operations in sourcekitd that
unfortunately was untested.  At least now some of the basic parts are
tested via the new notifications.

Part of rdar://38438512
2018-03-29 14:59:30 -07:00
Ben Langmuir
38963ce883 [sourcekit] Tweak traced operation to be single-operator per RAII object
This is how it was used in all but one place anyway, and makes it easier
to understand.  It also aligns better with some further refactoring I
want to do...
2018-03-29 14:05:57 -07:00
swift-ci
a2243aeb9c Merge remote-tracking branch 'origin/master' into master-next 2018-03-27 08:07:18 -07:00
Harlan
527cce409a [Syntax] Don't pretty-print -emit-syntax JSON output (#15380) 2018-03-27 10:55:59 -04:00
swift-ci
29011402dd Merge remote-tracking branch 'origin/master' into master-next 2018-03-26 09:11:11 -07:00
Doug Gregor
b2b69e8abf Rename BoundNameAliasType to NameAliasType.
NameAliasType is dead! Long live NameAliasType!
2018-03-25 21:35:17 -07:00
Doug Gregor
c43f96a855 [AST] Remove now-unused NameAliasType. 2018-03-25 21:35:16 -07:00
swift-ci
77ebdb3f51 Merge remote-tracking branch 'origin/master' into master-next 2018-03-23 10:30:51 -07:00
Argyrios Kyrtzidis
4dcfae7d39 Merge pull request #15440 from akyrtzi/sourcekitd-swift-version-as-string
[SourceKit] For the swift header interface request, accept the swift version as a string
2018-03-23 10:16:21 -07:00
Argyrios Kyrtzidis
455e87bd96 [SourceKit] For the swift header interface request, accept the swift version as a string
This is so we can pass the version as "4.2".

rdar://38673625
2018-03-22 16:32:24 -07:00
swift-ci
4c1d212192 Merge remote-tracking branch 'origin/master' into master-next 2018-03-22 13:29:26 -07:00
Doug Gregor
253bd10bd3 Cope with BoundNameAliasType in more places that handle NameAliasType. 2018-03-21 23:49:33 -07:00
swift-ci
2c0e422cc6 Merge remote-tracking branch 'origin/master' into master-next 2018-03-19 11:56:44 -07:00
Ray Fix
ac1f785b5f [SourceKit] Use WriteableMemoryBuffer to do the const_cast dirty work.
Based on PR feedback from @CodaFi
2018-03-19 00:05:51 -07:00
Ray Fix
055fa926be [SourceKit] Fix compiler warning.
Use const_cast instead of C style cast.
2018-03-18 18:09:56 -07:00
swift-ci
b8c1245d7e Merge remote-tracking branch 'origin/master' into master-next 2018-03-16 14:48:10 -07:00
Nathan Hawes
60a6c02328 Merge pull request #15301 from nathawes/rdar38550117-range-info-on-comment-mark-crashing
[refactoring] fix RangeInfo crash inside comment, due to unhandled invalid CharSourceRange
2018-03-16 14:46:10 -07:00
Nathan Hawes
ff76c265f3 [refactoring] fix RangeInfo crash inside comment, due to unhandled invalid CharSourceRange.
Resolves rdar://problem/38550117
2018-03-16 11:24:44 -07:00
swift-ci
d80ce649ed Merge remote-tracking branch 'origin/master' into master-next 2018-03-16 03:09:03 -07:00
Slava Pestov
34fd4ae512 AST: Use DeclBaseName::Kind::Constructor
Fixes <rdar://problem/35852727>, <https://bugs.swift.org/browse/SR-1660>,
<https://bugs.swift.org/browse/SR-6557>.
2018-03-16 00:25:56 -07:00
swift-ci
851b5679a0 Merge remote-tracking branch 'origin/master' into master-next 2018-03-15 01:49:32 -07:00
Slava Pestov
615d068d63 Sema: Replace some uses of getBaseIdentifier() with userFacingName() 2018-03-14 22:26:58 -07:00
swift-ci
e7610782ca Merge remote-tracking branch 'origin/master' into master-next 2018-03-13 12:09:54 -07:00
Nathan Hawes
9746a284cd Merge pull request #15135 from nathawes/rdar38314383-ignore-llvm-args-for-sourcekit-ast-manager-invocation
Clear any LLVMArgs when initializing the CompilerInvocation for SourceKit's ASTManager
2018-03-13 12:07:12 -07:00
swift-ci
ea9057590a Merge remote-tracking branch 'origin/master' into master-next 2018-03-12 09:09:40 -07:00
Sho Ikeda
422136e1a2 [gardening][enum class] Replace unsigned char with uint8_t for consistency
Before the changes:

- `git grep -E "enum class .+ : uint8_t \{" | wc -l`: 90
- `git grep -E "enum class .+ : unsigned char \{" | wc -l`: 26
2018-03-12 13:57:36 +09:00
Nathan Hawes
17a6ef5c6e Clear any LLVMArgs when initializing the CompilerInvocation for SourceKit's ASTManager
SourceKit doesn't use them and if any unrecognised LLVM options are
passed to llvm::cl::ParseCommandLineOptions() it calls exit(), bringing
down SourceKit.

Also use fprintf instead of llvm::errs() in Logging.cpp as it uses a
global C++ object that had already been destructed when logging the
above failure.

Resolves rdar://problem/38314383
2018-03-09 18:56:57 -08:00
swift-ci
36b254df94 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-03-08 01:58:15 -08:00
swift-ci
52a9d71e70 Merge remote-tracking branch 'origin/master' into master-next 2018-03-08 01:49:10 -08:00
Sho Ikeda
cea6c03eb2 [gardening] Use !empty() over size() > 0 2018-03-08 09:21:09 +09:00
swift-ci
79f4cdbcc1 Merge remote-tracking branch 'origin/master' into master-next 2018-02-28 22:52:16 -08:00
swift-ci
1fc9db0035 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-28 22:40:32 -08:00
Xi Ge
2b464c8e61 SwiftSourceKit: Add an API for sending request asynchronously. NFC 2018-02-28 17:11:54 -08:00