Commit Graph

1541 Commits

Author SHA1 Message Date
swift-ci
6fc15527f8 Merge remote-tracking branch 'origin/master' into master-next 2018-05-02 19:29:35 -07:00
swift-ci
d037d29944 Merge pull request #16329 from nkcsgexi/doc-info-std-lib 2018-05-02 19:18:19 -07:00
Xi Ge
714775eb0a DocSupport: don't assume we've printed the first extension when merging several together. rdar://39887195
When printing the content of several extensions into a
synthesized one, we shouldn't assume the first extension in the
group always gets printed.
2018-05-02 17:46:41 -07:00
swift-ci
7056b65bf5 Merge remote-tracking branch 'origin/master' into master-next 2018-05-02 15:09:04 -07:00
Jordan Rose
df2e63d07d Diagnose modules with circular dependencies (#16075)
This can't arise from a clean build, but it can happen if you have
products lingering in a search path and then either rebuild one of
the modules in the cycle, or change the search paths.

The way this is implemented is for each module to track whether its
imports have all been resolved. If, when loading a module, one of its
dependencies hasn't resolved all of its imports yet, then we know
there's a cycle.

This doesn't produce the best diagnostics, but it's hard to get into
this state in the first place, so that's probably okay.

https://bugs.swift.org/browse/SR-7483
2018-05-02 15:01:09 -07:00
swift-ci
6cc68b46e7 Merge remote-tracking branch 'origin/master' into master-next 2018-04-19 22:09:52 -07:00
Ben Langmuir
773cd93812 Merge pull request #16042 from benlangmuir/sourcekitd-warnings
[sourcekitd] Fix some compiler warnings
2018-04-19 22:00:43 -07:00
Ben Langmuir
0aa11cb6b2 [sourcekitd] Fix some compiler warnings
* remove nullability attribute from a non-pointer argument
* const-correctness on custom buffer casts
* remove statically unreachable code
2018-04-19 14:27:08 -07:00
Ben Langmuir
23ab43c941 [sourcekitd] Change compile notifications to pass a single args string
... instead of an array of compiler arguments. This is good enough
for seeing what's going on, and it saves significant time for long
argument strings, because it doesn't create and destroy so many
xpc strings, and more of the string copying that happens is on a large
contiguous string instead of many small strings.

rdar://39538847
2018-04-19 13:59:27 -07:00
swift-ci
d5083722b2 Merge remote-tracking branch 'origin/master' into master-next 2018-04-19 13:48:19 -07:00
Ben Langmuir
31eae3675b [sourcekitd] Remove XPCTracing
This code was an experiment in how to collect information after a crash,
that did not end up being used.  It's unclear how much it has bitrotted
at this point, since it has no tests and was not designed with automated
testing in mind.  Parts of it interfere with some changes I want to make
to the underlying tracing mechanism, so I am finally removing it.  This
also lets us remove the buffer copying in the parts of tracing used by
the compile notifications, improving performance.

For rdar://39538847
2018-04-19 11:52:38 -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
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
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
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
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
ab78849797 Merge remote-tracking branch 'origin/master' into master-next 2018-02-28 11:51:52 -08:00
swift-ci
78a4e268b3 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-28 11:41:18 -08:00
David Ungar
9cc534a05a Merge pull request #14702 from davidungar/PR-18-7-OutputsInInputs
[Batch mode]: Move SupplementaryOutputs into each InputFile and use the proper supplementary output. (7)
2018-02-28 11:31:47 -08:00
David Ungar
4866df6dfd Move SupplementaryOutputs into each InputFile. 2018-02-28 09:41:49 -08:00
swift-ci
7f99ae6c75 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-27 17:38:25 -08:00
swift-ci
2967f48b12 Merge remote-tracking branch 'origin/master' into master-next 2018-02-27 17:30:03 -08:00
Rintaro Ishizaki
3f232e753b [SourceKit] Add defensive guard for invalid offset
Invalid offset used to cause a inifinite loop in Lexer in some race
condition.

This is a quick fix until we fix underlying problem in SourceKit.
2018-02-27 18:14:52 +09:00
swift-ci
0a320070ae Merge remote-tracking branch 'origin/master' into master-next 2018-02-21 15:06:12 -08:00