Doug Gregor
3c49e46f4f
Merge pull request #33906 from DougGregor/concurrency-actors
...
[Concurrency] Basic support for actor classes and actor isolation
2020-09-11 15:10:45 -07:00
Brent Royal-Gordon
cff4ddf13a
[NFC] Adopt new ImportPath types and terminology
...
# Conflicts:
# lib/IDE/CodeCompletion.cpp
2020-09-10 19:07:49 -07:00
Ben Barham
107ba0bab4
Merge pull request #33884 from bnbarham/completion-copy-cleanup
...
[Gardening] Add re-usable copy* utility methods to use in code completion
2020-09-11 08:22:28 +10:00
Doug Gregor
22a350b1ac
[Concurrency] Add parsing support for actor classes.
...
Introduce the "actor class" syntax. Ensure that it is only used for
root classes or classes that inherit from other actor classes.
2020-09-09 20:46:30 -07:00
Nathan Hawes
a1ef6e4dac
Merge pull request #33749 from nathawes/new-member-completion
...
[CodeCompletion] Update member completion to handle ambiguous and invalid base expressions
2020-09-09 18:51:22 -07:00
Ben Barham
4f5d4d80bb
[Gardening] Add re-usable copy* utility methods to use in code completion
...
Various copy* methods were re-implemented in a bunch of files, move them
to CodeCompletion.h so they can be re-used everywhere that needs them.
2020-09-10 11:42:33 +10:00
Nathan Hawes
b15c1fd349
[CodeCompletion] Deduplicate the two isMemberCompletion functions in ParseExpr.cpp and ParseDecl.cpp
...
Also:
- propagate the Solution -> Result rename to Solution parameter of deliverDotExprResults
- fixup header comment in CodeCompletionTypeChecking.h
2020-09-09 12:14:53 -07:00
Nathan Hawes
7a06792e5d
[CodeCompletion] Remove unused field in CodeCompletionCallbacksImpl (NFC)
2020-09-08 17:31:43 -07:00
Nathan Hawes
d60116d11a
[CodeCompletion] Remove unused forward declaration and fix up an out-of-date comment (NFC)
2020-09-08 17:02:31 -07:00
Nathan Hawes
9b8fb7d37d
[CodeCompletion] Rename a few types/methods for clarity plus other small refactorings (NFC)
...
Also put subclasses of TypeCheckCompletionCallback into their own header.
2020-09-08 16:16:39 -07:00
Nathan Hawes
ee660c6dee
[CodeCompletion] Remove old DotExpr completion handling code - it's unreachable now.
2020-09-08 11:43:12 -07:00
Rintaro Ishizaki
d2b70e439f
Merge pull request #33811 from rintaro/sourcekit-completion-globalconfig
...
[SourceKit] Reorganize code completion options
2020-09-08 11:31:19 -07:00
Suyash Srijan
db6e3af002
[IDE] Fix a typo ( #33841 )
2020-09-08 17:32:07 +01:00
Xi Ge
028a75572c
ModuleInterface: remark potential version differences between SDK and prebuilt modules
...
Prebuilt-module directory now contains a SystemVersion.plist file copied from the SDK
it's built from. This patch teaches the compiler to remark this version and the SDK version
when -Rmodule-interface-rebuild is specified. The difference between these versions could
help us debug unusable prebuilt modules.
2020-09-04 11:45:05 -07:00
Rintaro Ishizaki
77b4f75608
[SourceKit] Reorgantize code completion options
...
* Abolish 'reuseastcontext' per-request option
* Add 'MaxASTContextReuseCount' global configuration
2020-09-03 19:30:05 -07:00
Xi Ge
e107182f1a
Merge remote-tracking branch 'apple/master' into master-rebranch
2020-09-02 18:36:37 -07:00
Xi Ge
773eec1a71
Merge pull request #33683 from nkcsgexi/clang-importer-options-refactor
...
ClangImporter: refactor ClangImporterOptions to be ASTContext-owned. NFC
2020-09-02 07:27:12 -07:00
Nathan Hawes
491b691dbc
[CodeCompletion][NFC] Add doc comments and rename symbols for clarity in the new member completion implementation.
2020-09-01 15:04:42 -07:00
Xi Ge
c403b140e1
ClangImporter: refactor ClangImporterOptions to be ASTContext-owned. NFC
...
We need ClangImporterOptions to be persistent for several scenarios: (1)
when creating a sub-ASTContext to build Swift modules from interfaces; and
(2) when creating a new Clang instance to invoke Clang dependencies scanner.
This change is NFC.
2020-09-01 14:04:22 -07:00
swift_jenkins
152ac7f141
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-09-01 11:48:56 -07:00
Rintaro Ishizaki
679aaca7ed
Merge pull request #33601 from LucianoPAlmeida/SR-13426-code-completion-keypath-optional
...
[CodeCompletion] Do not offer completion Wrapped members for optional key path root type
2020-09-01 11:36:10 -07:00
Luciano Almeida
ecc5b90aa5
[CodeCompletion] Do not erase dot for code completion key path optiona root unwrapped members
2020-09-01 12:33:00 -03:00
Nathan Hawes
9da1d89520
Manually merge remote-tracking branch 'upstream/master' into HEAD
...
Conflicts:
lib/AST/ExtInfo.cpp
2020-08-31 10:50:54 -07:00
Nathan Hawes
198687018c
[IDE] Fix typo to address unused warning (NFC)
2020-08-29 08:06:09 -07:00
Nathan Hawes
6e657e8615
[CodeCompletion] Fix incorrect type relations in complete_enum_elements test.
...
We were reporting methods that return function types that return void (rather
than returning void directly) as being invalid in contexts that expect non-void
expressions and testing for that incorrect behavior.
2020-08-28 22:24:24 -07:00
Nathan Hawes
5100de4293
[CodeCompletion] Fallback to typechecking just the completion expression in cases where typeCheckExpression is never called.
...
This happens when, e.g. an expression being switched on is invalid so
expression patterns in the switch cases (which may contain the completion
expression) are not checked.
Also setup the Lookup object to handle member completion in ObjC selector
expressions correctly, and fix passing the wrong expression when computing
isStaticallyDerivedMetatype().
2020-08-28 22:24:23 -07:00
Nathan Hawes
3d8561502b
[CodeCompletion] Move CompletionCollector to ASTContext + bug fixes.
2020-08-28 22:24:23 -07:00
Nathan Hawes
fe9df72d55
[CodeCompletion] Add initial implementation of solver-based member completion.
...
This hooks up member completion to the new typeCheckForCodeCompletion API to
generate completions from all solutions the constraint solver produces (include
ones requiring fixes) rather than relying purely the single solution being
applied to the AST (if any). This lets us still give completion results in
ambiguous and invalid code.
2020-08-28 22:24:23 -07:00
Nathan Hawes
cf60b2fe61
[CodeCompletion] Pass the CodeCompletionExpr rather than just the base expression to the DotExpr completion callback.
2020-08-28 22:24:22 -07:00
Nathan Hawes
3e8278ae71
Merge pull request #33676 from nathawes/parser-completion-fixes
...
[Parse][IDE] Various parser fixes for code completion
2020-08-28 22:11:31 -07:00
Nathan Hawes
3e0500d73c
[Parse][IDE] Don't drop default argument init exprs containing code completion exprs and type check them for code completion.
...
Fixes up some tests marked as non-ideal to give the ideal result now too.
2020-08-28 17:09:37 -07:00
swift_jenkins
fb946baf59
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-28 11:08:22 -07:00
Rintaro Ishizaki
c48a676a1c
Merge pull request #31679 from Jumhyn/implicit-member-chains-different-types
...
[SE-0287] [Sema] Implementation for implicit member chains
2020-08-28 10:47:53 -07:00
swift_jenkins
4a8e5085ab
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-27 21:48:06 -07:00
Rintaro Ishizaki
e013ebd388
[CodeCompletion] Ensure all ExtensionDecl's extended nominal are computed
...
Fixes an assertion failure in ASTScope lookup
rdar://problem/67102794
2020-08-27 16:17:43 -07:00
Frederick Kellison-Linn
352adc3b5d
Remove Argument from UnresolvedMemberExpr
...
Instead, an expresison like `.foo()` is represented as an `UnresolvedMemberExpr` nested inside a `CallExpr`.
2020-08-26 22:42:30 -04:00
Frederick Kellison-Linn
db33dfa3a1
[IDE] Offer unresolved member completions with non-matching types
...
Since the user can now write additional member accesses off of an UnresolvedMemberExpr, we should offer all available completions rather than just those that match the contextual type.
2020-08-26 22:42:30 -04:00
swift_jenkins
466b0eee6e
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-26 14:16:52 -07:00
Rintaro Ishizaki
bf5fb4d2bb
[CodeCompletion] Don't update VFS content hash map after each completion
...
This was not needed. The list of depenencies should not be changed
during fast-completion sessions.
This was also harmful because it calls stat(2) for all the dependency
files.
rdar://problem/67773257
2020-08-26 09:56:36 -07:00
swift_jenkins
f272390233
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-25 17:45:49 -07:00
Ben Barham
86c78572f2
Merge pull request #33625 from bnbarham/pass-reference-nullptr
...
[IDE] Skip visiting constructor references when the decl is unknown
2020-08-26 08:55:14 +10:00
swift_jenkins
725692fd07
Merge remote-tracking branch 'origin/master' into master-rebranch
2020-08-25 15:46:37 -07:00
Ben Langmuir
8c56ce8484
Merge pull request #33632 from benlangmuir/gardening-libIDE
...
[gardening] Move some code between sourcekitd and libIDE
2020-08-25 15:31:03 -07:00
Ben Langmuir
696c124af7
Fix missing dependency
2020-08-25 11:45:11 -07:00
Ben Langmuir
81786104f3
Move adjustClangTriple above its only caller
2020-08-25 11:16:53 -07:00
Ben Langmuir
0d42d7d915
[gardening] format changed code
2020-08-25 10:43:43 -07:00
Ben Langmuir
af78895c45
[gardening] Sink compiler invocation code into libIDE
2020-08-25 10:39:37 -07:00
Ben Langmuir
cf87ad805f
[gardening] Move filter name printing alongside other completion methods
2020-08-25 10:39:19 -07:00
Ben Langmuir
34de805d7f
[gardening] Move source text printing alongside other completion methods
2020-08-25 10:39:19 -07:00
Ben Langmuir
6480bfaad2
[gardening] Move FuzzyStringMatcher to libIDE
2020-08-25 10:39:08 -07:00