Commit Graph

28 Commits

Author SHA1 Message Date
David Farler
645aaad551 [index/build] Upstream indexing while building changes
This patch upstreams previously AppleInternal changes for
indexing while building.
2017-06-29 16:20:06 -07:00
Nathan Hawes
4ff254de97 Move canDeclProvideDefaultImplementationFor() from libIDE into libIndex 2017-04-27 23:23:45 -07:00
Nathan Hawes
8ad6aa4e0d [migrator] Add pass for API type changes
This handles optionality changes and type rewrites in function param and return types and constructor param and failability types.
Resolves rdar://problem/31766010
2017-04-27 22:19:52 -07:00
practicalswift
40cf4d183d [gardening] Use consistent spacing after if, for and while 2017-04-14 17:35:36 +02:00
Nathan Hawes
a57fd2a4b0 [indexer] Add an option to index local symbols too, and a new index::indexDeclContext() entry point
Resolves rdar://problem/31433002.
2017-04-12 09:04:03 -07:00
Xi Ge
936b4a25da Revert "Index: Expose the logic for deciding whether to index a symbol. NFC. (#8438)"
We currently don't need this logic elsewhere, thus it's good to give
indexer some privacy.
2017-04-01 10:39:36 -07:00
Xi Ge
9e6d584b60 Index: Expose the logic for deciding whether to index a symbol. NFC. (#8438) 2017-03-30 14:00:44 -07:00
Nathan Hawes
7b75cf792c [indexer] Index parameter definitions with a distinct external argument label too (but not their refs)
Parameter defs with a separate external argument label are marked with the 'Local' symbol property.
This ensures the indexer has enough information for clients to match up a function's argument labels with its child parameter definitions.
Resolves rdar://problem/31039915.
2017-03-14 16:12:48 -07:00
Argyrios Kyrtzidis
a13289835e [index] For extensions, relate the symbol reference that gets extended and base references with the extension symbol.
They were getting related with the original extended symbol, which was incorrect.
2017-02-19 18:19:39 -08:00
Argyrios Kyrtzidis
db8ec19f55 [index] Use the index symbol types and APIs from the clang header.
This avoids duplication and centralizes handling of symbols.
2017-01-10 14:49:07 -08:00
Nathan Hawes
563bc04da1 Merge pull request #6677 from nathawes/swift-indexing
Add roles and relations for Swift indexing
2017-01-09 14:48:35 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Nathan Hawes
8c45e20d3f [indexer] Add relations to IndexSymbol add a -print-indexed-symbols option to swift-ide-test for testing 2017-01-05 15:01:53 -08:00
Nathan Hawes
7f582c420d [indexer] When visiting a NominalTypeDecl, cover the type references in the where clause and generic param inheritance too.
Also rename ASTWalker::shouldWalkIntoFunctionGenericParams() to shouldWalkIntoGenericParams() since it's now used when walking NominalTypeDecl (not just AbstractFunctionDecl).
2017-01-05 14:54:59 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Ben Langmuir
5525319d5c [index] Add finish() hook to the index consumer API
Since the memory underlying returned USRs is guaranteed to last until
the indexing action completes, add a finish() hook so that clients can
trigger an action at the end of indexing but before the memory goes
away.
2016-06-09 09:43:41 -07:00
Argyrios Kyrtzidis
ec042460fe [SourceKit] Report attributes of decls for the indexing request. 2016-05-05 16:44:34 -07:00
Ben Langmuir
ad34f89d5b [index] Add UnitTest SymbolSubKind and collapse the IndexSymbol inheritance
Fold UnitTest into the subkind, now that it's a bitself, and then remove
the unnecessary inheritance for IndexSymbol and its SourceKit indexing
equivalent.
2016-04-29 19:04:27 -07:00
Ben Langmuir
6096b8b93c [index] Make IndexSymbol's subkind into a bitset
This follows a similar change to clang indexing, and will allow us to
add overlapping sub kinds such as "UnitTest", etc.
2016-04-29 19:04:26 -07:00
Ben Langmuir
ef4e84b8d6 [index] Subsume CallRefIndexSymbol into IndexSymbol
Eventually we should just have one IndexSymbol, with all the
information. Once we kill FuncDeclIndexSymbol and can get rid of the
enum,  we will regain most of the bytes we lost by inlining receiverUSR.
2016-04-29 19:04:26 -07:00
Ben Langmuir
50eeeb7430 [index] Add 'call' and 'isDynamic' roles 2016-04-29 19:04:25 -07:00
Ben Langmuir
1b1320b9f1 [index] Thread through SymbolRoleSet as a generalization of "bool isRef"
As a first step toward having more detailed "role" information, thread
through a SymbolRole bitset.  For now it just contains the existing ref
vs. definition status.
2016-04-29 19:04:24 -07:00
Ben Langmuir
5523266715 [index] Remove unreachable materializeForSet case in indexer
We already had it marked unreachable in SourceKit, so lift that up into
the libIndex and remove the unnecessary enum case.
2016-04-28 16:51:03 -07:00
Ben Langmuir
db381525d0 [index] Remove unused local/param variables from index kinds
We don't index local variables or parameters, so remove the index symbol
kinds.
2016-04-28 16:51:02 -07:00
Ben Langmuir
e977d4bd54 [index] Remove import.sourcefile kind from indexing
We don't support importing source files in source code, and they only
showed up in the index under failure conditions.
2016-04-28 16:51:01 -07:00
Ben Langmuir
8f17b13f61 [index] Cache USR and name for decls
We were calculating these for every decl-occurrence, but we really only
need them once per decl.
2016-04-25 13:29:27 -07:00
Ben Langmuir
8dad7f7803 [index] Split the indexModule entry point for indexSourceFile NFC
Having a single interface for source files and modules and having to
pass in a buffer id was a crappy API. This splits the interface to take
either a Module or a SourceFile and handles the buffer id stuff
internally.
2016-04-15 16:27:30 -07:00
Ben Langmuir
ad269b0e1f [index] Move core indexing code out of SourceKit
Leaving only the SourceKit-specific code (e.g. UID generation) behind in
SourceKit.

rdar://problem/22348041
2016-04-14 13:13:54 -07:00