Commit Graph

3985 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
ba30e56b58 [IDE] When picking regular comments from clang headers, make sure that extensions/categories
are printed in the right source location otherwise the comments will be out-of-place.

Swift SVN r16271
2014-04-13 04:35:29 +00:00
Argyrios Kyrtzidis
2da311cf1f [IDE] For the module interface, don't print submodule imports, unless they are submodules
of the module we are printing.

rdar://16530804

Swift SVN r16262
2014-04-12 19:20:08 +00:00
Argyrios Kyrtzidis
49ef6ab8cd [IDE] Use ClangNode::getLocation().
Swift SVN r16253
2014-04-12 16:33:39 +00:00
Argyrios Kyrtzidis
4c91bd074f [IDE] Print out regular comments from the clang module headers, for the module interface.
rdar://16451119

Swift SVN r16249
2014-04-12 05:21:08 +00:00
Dmitri Hrybenko
547e1b5874 Code completion: print non-inout '@unchecked' optional arguments as normal
optionals, because the difference is not important for the caller.

rdar://16576739


Swift SVN r16212
2014-04-11 10:58:07 +00:00
Dmitri Hrybenko
a98375b286 Cleanup, NFC.
Swift SVN r16211
2014-04-11 10:44:10 +00:00
Dmitri Hrybenko
810afec04d Fix coding style and formatting
Swift SVN r16210
2014-04-11 10:06:00 +00:00
Sonny Falk
407e538d85 [IDE] Make sure to handle the case of virtual-only attributes
for syntax coloring.
Add a test for the above.
This addresses <rdar://problem/16584438>.

Swift SVN r16194
2014-04-11 02:15:16 +00:00
Dmitri Hrybenko
7ac0db93a9 Module interface printing: don't print declarations from the Swift overlay when printing a submodule
rdar://16559404


Swift SVN r16117
2014-04-09 14:22:56 +00:00
Doug Gregor
9e75a46c8c swift-ide-test: Add a -skip-unavailable option to skip unavailable declarations
Swift SVN r16056
2014-04-08 16:34:44 +00:00
Dmitri Hrybenko
f83a6c0c5a AST printing: don't insist on having a Clang module in Swift-only modules
Swift SVN r15966
2014-04-04 23:59:51 +00:00
Doug Gregor
1a6d27079d Module interface printing: add an option to skip the Swift overlay.
This is a debugging aid, not a general feature, hence the lack of
testing or actual, correct semantics.

Swift SVN r15886
2014-04-03 18:07:59 +00:00
Doug Gregor
8b684f3f7c Module interface printing: bring back printing of submodules.
Brings back the behavior removed in r15800 under a pair of flags
(-module-print-submodules and -module-print-hidden) that control
whether to print submodules, possibly including submodules that aren't
explicitly visible.

Swift SVN r15872
2014-04-03 16:10:11 +00:00
Dmitri Hrybenko
f4c018d3f7 Correct filename in the comment
Swift SVN r15801
2014-04-02 15:00:18 +00:00
Dmitri Hrybenko
d72109e97d Module interface printing: don't print submodules (either implicit of explicit)
of the module being printed

rdar://16497611


Swift SVN r15800
2014-04-02 14:54:39 +00:00
Dmitri Hrybenko
78e354b2b9 AST printing: make PrintDefaultParameterPlaceholder the default (since we are
not going to implement expression printing any time soon), and fix a bug in its
implementation: when used with deserialized modules, "= default" was not
printed.


Swift SVN r15798
2014-04-02 13:56:54 +00:00
Dmitri Hrybenko
d68ad2c3c4 Simplify code
Swift SVN r15740
2014-04-01 17:34:00 +00:00
Dmitri Hrybenko
af5aeadc98 Actually pass module name to ide::printSubmoduleInterface()
Swift SVN r15733
2014-04-01 16:00:08 +00:00
Dmitri Hrybenko
efb2a60ee7 Module interface printing: add a libIDE API to print a Clang submodule
Swift SVN r15730
2014-04-01 14:51:58 +00:00
John McCall
f1180f5e6d in order to work correctly for non-@objc protocols.
Language features like erasing concrete metatype
values are also left for the future.  Still, baby steps.

The singleton ordinary metatype for existential types
is still potentially useful; we allow it to be written
as P.Protocol.

I've been somewhat cavalier in making code accept
AnyMetatypeType instead of a more specific type, and
it's likely that a number of these places can and
should be more restrictive.
When T is an existential type, parse T.Type as an
ExistentialMetatypeType instead of a MetatypeType.

An existential metatype is the formal type
 \exists t:P . (t.Type)
whereas the ordinary metatype is the formal type
 (\exists t:P . t).Type
which is singleton.  Our inability to express that
difference was leading to an ever-increasing cascade
of hacks where information is shadily passed behind
the scenes in order to make various operations with
static members of protocols work correctly.

This patch takes the first step towards fixing that
by splitting out existential metatypes and giving
them a pointer representation.  Eventually, we will
need them to be able to carry protocol witness tables

Swift SVN r15716
2014-04-01 00:38:28 +00:00
Joe Groff
9f7dab725c Make the ASTContext parameter to MetatypeType::get optional for type-checked types.
We can just get it from the instance type, if the instance type has been fully initialized, which is the case except during parsing of type decls when the decls' own types are being formed.

Swift SVN r15598
2014-03-29 02:50:30 +00:00
Argyrios Kyrtzidis
5bc01ea0a2 [IDE] Allow the caller of ide::printModuleInterface() to control whether documentation comments should be printed
Part of rdar://16450298

Swift SVN r15584
2014-03-28 18:51:47 +00:00
Dmitri Hrybenko
1d6c76c352 Module interface printing: pass through documentation comments for imported
declarations

rdar://16408910


Swift SVN r15576
2014-03-28 10:54:06 +00:00
Dmitri Hrybenko
92b29ef045 Revert "Module interface printing: pass through documentation comments for
imported declarations"

rdar://16408910


Swift SVN r15527
2014-03-26 21:28:42 +00:00
Dmitri Hrybenko
30c6eeff16 Module interface printing: pass through documentation comments for imported
declarations

rdar://16408910


Swift SVN r15511
2014-03-26 16:16:02 +00:00
Dmitri Hrybenko
7e294eea4d Module interface printing: print imported Clang declarations in header source
order

rdar://problem/16408837


Swift SVN r15505
2014-03-26 11:36:25 +00:00
Joe Pamer
56e2b28b76 Remove more unnecessary semicolons.
Swift SVN r15489
2014-03-26 06:07:06 +00:00
Dmitri Hrybenko
d196805275 Comment-to-XML conversion: don't try to get line and column number for imported
declarations


Swift SVN r15461
2014-03-25 16:32:44 +00:00
Dmitri Hrybenko
04b9f8c384 Code completion: correctly call type checking routines for a function nested
inside a closure

rdar://16139669


Swift SVN r15453
2014-03-25 14:42:33 +00:00
Argyrios Kyrtzidis
b7a85f2af9 [IDE] Do syntax annotation for '#if' constructs.
Swift SVN r15447
2014-03-25 03:55:32 +00:00
Jordan Rose
8d35d75ce3 [ClangImporter] Resolve forward class declarations to definitions in Swift.
When we see an unresolved @class in a Clang module, we check the class name
against the classes in the Swift module with the same name.

This unfortunately necessitates putting a reference to the active type checker
into the ClangImporter, because the class in the current Swift module hasn't
been type-checked yet. This is now being used everywhere we do a lookup.

<rdar://problem/16295994>

Swift SVN r15355
2014-03-22 00:19:59 +00:00
Sonny Falk
7d37543b1e [IDE] Don't try to pass context sensitive keyword token for accessor
function unless it has a dedicated source location.
This addresses <rdar://problem/15530448>.

Swift SVN r15262
2014-03-20 02:50:11 +00:00
Argyrios Kyrtzidis
ab2e58ec6e [IDE] Fix crash with semantic annotation for an incomplete enum.
rdar://16102613

Swift SVN r15227
2014-03-19 07:02:21 +00:00
Dmitri Hrybenko
a598087505 ide::getDocumentationCommentAsXML(): pass through comments from Clang
Swift SVN r15208
2014-03-18 22:38:12 +00:00
Dmitri Hrybenko
f7699f59b5 Comment parsing: generate a basic XML document from the brief comment
Swift SVN r15186
2014-03-18 11:09:53 +00:00
Doug Gregor
195fb46e44 Typo correction in a variable name.
Swift SVN r15170
2014-03-17 23:23:55 +00:00
Argyrios Kyrtzidis
1173c4e6a0 [IDE] Annotate 'inout' in parameters as keyword.
Swift SVN r15137
2014-03-17 16:01:32 +00:00
Dmitri Hrybenko
efa2f3b896 Code completion: add brief comments to code completion results
Swift SVN r15059
2014-03-14 17:53:22 +00:00
Dmitri Hrybenko
ab9dcd39c4 Source annotation: fix a crash on var decls with propagated types
rdar://16194527


Swift SVN r14868
2014-03-10 15:09:04 +00:00
Dmitri Hrybenko
5659f8a78c Code completion: don't assert if module loading failed
Swift SVN r14867
2014-03-10 12:14:00 +00:00
Dmitri Hrybenko
01c963dc6a Move clangIndex dependency from libIDE to libAST
This dependency exists because of USR generation, which was moved to libAST.


Swift SVN r14785
2014-03-07 16:40:16 +00:00
Dmitri Hrybenko
ef0942c69c Add a convenience API SourceManager::addMemBufferCopy() to simplify adding a
buffer in case the client does not need a pointer to the buffer.


Swift SVN r14777
2014-03-07 11:41:08 +00:00
Sonny Falk
e60c59892b [IDE] Pass a brace structure node for switch body.
This addresses <rdar://problem/16256501>.

Swift SVN r14767
2014-03-07 02:02:18 +00:00
Sonny Falk
6158003552 [IDE] Don't pass brace structure node for implicit brace in CaseStmt.
This addresses <rdar://problem/16253769>.

Swift SVN r14766
2014-03-07 02:02:18 +00:00
Dmitri Hrybenko
49754619ee Move USR generation to AST library, so that Serialization library can use it
Swift SVN r14681
2014-03-05 11:31:31 +00:00
Chris Lattner
d758e0dfe3 Eliminate more "DynamicLookup" in favor of "AnyObject", this is the
bulk of finishing rdar://13327098.


Swift SVN r14653
2014-03-04 22:15:46 +00:00
Sonny Falk
a79aeb66ec [IDE] Don't pass brace structure node for implicit brace in top level code.
Swift SVN r14577
2014-03-02 23:30:54 +00:00
Sonny Falk
4eb7f99d08 [IDE] Consolidate code checking whether to pass brace structure node into a new function. NFC.
Swift SVN r14576
2014-03-02 23:30:48 +00:00
Dmitri Hrybenko
28412712b7 ModelASTWalker: don't attempt to walk implict declarations, they don't have
source information


Swift SVN r14513
2014-02-28 12:08:56 +00:00
Dmitri Hrybenko
0c4c291d20 Fix code completion in variable initializers that are not at the top level
Code completion used to suggest non-static members in member var initializer,
and incorrectly reported the reason why the declarations are visible from the
initializer.


Swift SVN r14457
2014-02-27 11:13:25 +00:00