Commit Graph

1419 Commits

Author SHA1 Message Date
swift-ci
35a2b40d53 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-31 02:38:12 -08:00
swift-ci
84f604002a Merge remote-tracking branch 'origin/master' into master-next 2018-01-31 02:29:14 -08:00
Rintaro Ishizaki
fced748790 [Syntax] Represent missing optioanl nodes as nullptr (#14300)
Allocating RawSyntax/SyntaxData for missing optional node is a waste of
resource.
2018-01-31 19:24:00 +09:00
David Ungar
a9819b6e60 Renaming FrontendInputs -> FrontendInputsAndOutputs
Fix comment in ArtsToFrontendOptionsConverter re getOutputFilenamesFromCommandLineOrFilelist
2018-01-30 18:54:38 -08:00
swift-ci
94e6c88fe0 Merge remote-tracking branch 'origin/master' into master-next 2018-01-30 13:49:38 -08:00
swift-ci
8848cd7540 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-30 13:38:06 -08:00
Xi Ge
98570550c3 [SourceKit] Report synthesized protocol conformances for DocSupport request. rdar://36882292 (#14248) 2018-01-30 13:32:50 -08:00
swift-ci
f5e81f6fa7 Merge remote-tracking branch 'origin/master' into master-next 2018-01-25 18:46:31 -08:00
swift-ci
8d00b9ff17 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-25 18:38:49 -08:00
Nathan Hawes
7ed4586f01 Merge pull request #14145 from nathawes/rdar35819975-cursor-info-crasher
[CursorInfo] Fix crash on init call of inner NTD with generic outer NTD
2018-01-25 18:35:35 -08:00
Nathan Hawes
cbf07dae19 [CursorInfo] Fix crash on init call of inner NTD with generic outer NTD
Resolves rdar://problem/35819975
2018-01-25 13:24:51 -08:00
swift-ci
3a521bfe2a Merge remote-tracking branch 'origin/master' into master-next 2018-01-23 20:29:47 -08:00
swift-ci
158eaeaa5e Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-23 20:18:53 -08:00
David Ungar
bf439cd2c6 Merge pull request #14090 from davidungar/PR-18-3b
[BatchMode] Rename FrontendInputs::AllFiles to AllInputs, etc
2018-01-23 20:14:46 -08:00
David Ungar
ec2a9573cc Rename FrontendInputs::AllFiles to AllInputs, getAllFiles to getAllInputs, etc. 2018-01-23 14:01:15 -08:00
swift-ci
fc2e2ee06e Merge remote-tracking branch 'origin/master' into master-next 2018-01-17 23:53:17 -08:00
swift-ci
85cef29e2b Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-17 23:24:08 -08:00
Xi Ge
4c172037e8 [libSyntax][SourceKit] Integrating libSyntax representation of a source file with several SourceKitd syntax requests (#14000)
The enhanced SourceKitd requests are EditorOpen and EdtiorReplaceText. In these two requests, the clients can specify a flag "key. enablesyntaxtree = 1" to get a serialize libSyntax tree with the response.

To help this integration, we added a function in SyntaxParsingContext to explicitly finalize the creation of a SourceFileSyntax to incorporate the fact that SourceKit needs the tree before its destroying the parser instance.

To test this integration, we diff the syntax tree serialized from the frontend action and the tree serialized from a SourceKitd response. They should be identical.
2018-01-17 21:13:22 -08:00
Davide Italiano
118962b034 [SourceKit] Catch up with upstream changes in llvm. 2018-01-16 11:25:06 -08:00
swift-ci
21343fd342 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-12 14:18:57 -08:00
swift-ci
957b3897d7 Merge remote-tracking branch 'origin/master' into master-next 2018-01-12 14:09:52 -08:00
John McCall
7f0f8830cd Split AccessorDecl out from FuncDecl. NFC.
This has three principal advantages:

- It gives some additional type-safety when working
  with known accessors.

- It makes it significantly easier to test whether a declaration
  is an accessor and encourages the use of a common idiom.

- It saves a small amount of memory in both FuncDecl and its
  serialized form.
2018-01-12 14:20:27 -05:00
swift-ci
14b5f2ad7b Merge remote-tracking branch 'origin/master' into master-next 2018-01-09 17:44:29 -08:00
swift-ci
bbc812c77f Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-09 17:35:51 -08:00
Marcelo Fabri
94465a38c0 [SourceKit] Add GenericTypeParam to structure (SR-5474) (#13616) 2018-01-09 17:28:52 -08:00
swift-ci
cc373f9c30 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-08 12:27:47 -08:00
swift-ci
fd9d91baa8 Merge remote-tracking branch 'origin/master' into master-next 2018-01-04 10:49:47 -08:00
Marcelo Fabri
b6ecf9c6d4 [SourceKit] Introduce "source.lang.swift.expr.closure" in structure (SR-6116) (#13617) 2018-01-04 10:45:29 -08:00
Bob Wilson
e614f1b4d4 master-next: attempt to fix Linux bots
After my PR 13591 to adjust for LLVM r321257, the Linux bots are failing with
errors about missing conversions. For some reason that I don't understand,
those errors do not reproduce when I build locally on macOS. I think this
change should fix them. I also cleaned up some const_casts that should now
be unnecessary when using WritableMemoryBuffer.
2017-12-21 20:14:17 -08:00
Bob Wilson
a214a4df9d master-next: use WritableMemoryBuffer::getNewUninitMemBuffer
llvm r321257 removed MemoryBuffer::getNewUninitMemBuffer. Change to use
WritableMemoryBuffer::getNewUninitMemBuffer instead.
2017-12-21 17:21:05 -08:00
swift-ci
cbe5719fa7 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 18:09:12 -08:00
Saleem Abdulrasool
62c9784d8e Merge pull request #13509 from compnerd/sourcekit++14
SourceKit: use explicit struct constructor for C++14
2017-12-18 17:53:54 -08:00
swift-ci
fd21243bd6 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 17:08:54 -08:00
Ben Langmuir
36d7acd1fa [code-complete] Set call-arg-heuristics flag in SourceKit
In the new code-completion path, expose an option to control this
behaviour; in the old path turn it off.

rdar://31113161
2017-12-18 13:20:24 -08:00
Saleem Abdulrasool
aaeac4cb34 SourceKit: use explicit struct constructor for C++14
Explicitly instantiate the `CursorInfoData` instances when using it with
the default constructor rather than using the inline initializer list.
This is needed to build with C++14 mode.  Provide a default value for
the `Optional` type in the structure which prevents a non-copy default
constructor from being synthesized.  NFC.
2017-12-18 12:44:19 -08:00
Ben Langmuir
b6d5a1f1a5 [code-complete] Do not insert rparen after a call pattern completion
When completing
  Foo(<here>
We will now provide
  bar: <#value#>
instead of
  bar: <#value#>)

Inserting the rparen caused some problems in practice:
* the old behaviour optimized for typing Foo(<complete> instead of
  Foo(<complete>), which can conflict with user behaviours or ...
* in editors with automatic brace-matching, we often conflicted with the
  editor, leading to extraneous closing parens

And in general, it is much more predictable for tooling to either insert
matching ( and ) or to not insert either.  While this change may not be
ideal For users of editors that do not do automatic brace-matching, I
believe it is still better overall to have to type a missing paren than
to have to delete an extraneous one.

rdar://31113161
2017-12-18 11:59:49 -08:00
Ben Langmuir
93956eb34b [code-complete] Put call-pattern heuristics under a flag
The original hope was we could make these heuristics really good, but
since that is not currently in sight (and may never be), we want to be
able to turn them off.  For now, just plumb through an internal flag to
control the behaviour.  A future change will customize the behaviour in
SourceKit.

rdar://31113161
2017-12-15 13:23:44 -08:00
swift-ci
fdf3f4b8d1 Merge remote-tracking branch 'origin/master' into master-next 2017-12-13 14:49:40 -08:00
David Ungar
a13e11462a Fix erroneous break wi/h a continue. 2017-12-13 13:17:22 -08:00
David Ungar
c0b0b5c5da Eliminate InputFile::setBuffer by having SwiftASTManager create new InputFile's with the buffer set or not as needed. 2017-12-12 15:06:26 -08:00
swift-ci
dd694cb1ca Merge remote-tracking branch 'origin/master' into master-next 2017-12-11 20:49:53 -08:00
David Ungar
c1f81867d7 Merge pull request #13268 from davidungar/PR3A-rb
FrontendInputs data structure redo, rebased.
2017-12-11 20:44:10 -08:00
David Ungar
129b376b8b Removed spurious test. 2017-12-08 14:28:58 -08:00
David Ungar
60827b4be3 Rename accessors to InputFile data. 2017-12-08 12:57:32 -08:00
Bob Wilson
390058972a [master-next] Use PRIVATE in target_link_libraries for executables
This is needed to work with LLVM r319840.
2017-12-06 21:55:22 -08:00
David Ungar
28b206008f FrontendInputs data structure redo.
- Outlaw duplicate input files, fix driver, fix tests, and add test.
- Reflect that no buffer is present without a (possibly pseudo) named file.
- Reflect fact that every input has a (possible pseudo) name.
- Break up CompilerInstance::setup.

Don't bail on dups.
2017-12-05 17:28:03 -08:00
Argyrios Kyrtzidis
94d0e4e7a1 Merge pull request #13271 from rintaro/cmake-syntax-headers
[CMake] Add swift-syntax-generated-headers to the global dependencies
2017-12-05 16:14:46 -08:00
Rintaro Ishizaki
08ef4e324f [CMake] Add swift-syntax-generated-headers to the global dependencies 2017-12-05 17:03:12 +09:00
David Ungar
ab0c44d2b7 Merge pull request #13183 from davidungar/move-in-to-next-imm-out-fix-rb1
Break up ParseFrontendOptions and reorganize module and output files computation, V2.
2017-12-04 19:27:27 -08:00
Saleem Abdulrasool
32ca0fd183 [SourceKit] fix -Wqual-cast warning
When building SourceKit on Linux, this would result in a number of
-Wqual-cast warnings due to the `const` being dropped.  Add an explicit
cast.  NFC.
2017-12-04 10:17:25 -08:00