Argyrios Kyrtzidis
95bd9e1d28
[AST/IDE] Centralize the logic to determine if a symbols is a 'private' stdlib one and hide them more extensively.
...
-Hide vars that have a private type.
-Hide functions that have a parameter with private type or a parameter name with leading underscore.
-Minor change in StringUTF16.swift to avoid printing "func generate() -> IndexingGenerator<_StringCore>".
rdar://17027294
Swift SVN r18623
2014-05-25 03:49:02 +00:00
Argyrios Kyrtzidis
cfa64f4f6e
[IDE] For AST printing, adjust recordDeclLoc() invocations at the point where Decl::getLoc() would point,
...
which is generally before the name.
Fixes rdar://16887111
Swift SVN r18448
2014-05-20 07:36:25 +00:00
Argyrios Kyrtzidis
4bdfbd1cd2
[IDE] Have 'swift-ide-test -annotate-print' also indicate where the printed decl location is.
...
Swift SVN r18447
2014-05-20 07:36:22 +00:00
Argyrios Kyrtzidis
5d2d762cd3
[ClangImporter] A typedef to a typedef should get imported as a typealias.
...
Swift SVN r18328
2014-05-18 16:08:56 +00:00
Argyrios Kyrtzidis
be7e6653fd
[IDE] Don't print inherited types and conformances that start with underscore,
...
if PrintOptions.SkipLeadingUnderscoreDecls is enabled.
Swift SVN r17762
2014-05-09 06:10:22 +00:00
Ted Kremenek
0b2c23ffec
Remove special printing of ImplicitlyUnwrappedOptional<T>.
...
Part of <rdar://problem/16836463>
Swift SVN r17610
2014-05-07 06:59:52 +00:00
Doug Gregor
1fe794b31a
Don't create keyword arguments for the value constructors of imported enums.
...
NSFooOptions(0) is better than NSFooOptions(value: 0).
Swift SVN r17422
2014-05-05 04:18:07 +00:00
Dmitri Hrybenko
dd1d0c79e1
Restore removed test
...
Swift SVN r17087
2014-04-30 12:58:24 +00:00
Doug Gregor
3f6c6ec624
Test updates for default keyword argument changes <rdar://problem/16741975>.
...
TL;DR. You don't want to read this patch. Mostly, it's adjusting to
the fact that global functions no longer have keyword arguments by
default, which affects nearly every SIL- and IR-test, as well as the
IDE-related tests. I've tried to generalize the SIL and IR tests to be
more resilient against such mangling changes, but I've surely missed
some.
Swift SVN r17058
2014-04-30 00:06:38 +00:00
Dmitri Hrybenko
14364aa261
Make TypeDecl::getProtocols() actually force delayed members when requested
...
Fixes
<rdar://problem/16438738> Ensure that RawOptionSet conformance is printed for
imported NS_OPTIONS
and probably other latent bugs.
Swift SVN r16971
2014-04-28 10:19:46 +00:00
Ted Kremenek
6caf910d32
Implement new syntactic sugar for UncheckedOptional<T>.
...
This leaves in the existing syntax for @unchecked T?. That will
be addressed in later patches.
There's still a mysterious case where some of the SIL output
includes UncheckedOptional<T> and some places T!.
Moreover, this doesn't handle SourceKit's behavior for printing
for overrides. This just handles parsing the 'T!' syntax.
Swift SVN r16945
2014-04-27 21:59:29 +00:00
Argyrios Kyrtzidis
420db0b38e
[IDE/test] Add an initializer in mock-sdk.
...
Swift SVN r16918
2014-04-27 05:33:42 +00:00
Dmitri Hrybenko
0bfcd45eb7
Clang importer: import noreturn attribute on free functions
...
rdar://16630302
Swift SVN r16522
2014-04-18 14:40:02 +00:00
Argyrios Kyrtzidis
0ccc83db54
[IDE/ModuleInterface] Print a blank line between top-level Swift declarations.
...
Swift SVN r16442
2014-04-17 05:10:46 +00:00
Argyrios Kyrtzidis
a9ea63a7f7
[IDE/ModuleInterface] Adjust the indentation of regular comments to match the current indentation level.
...
Swift SVN r16362
2014-04-15 06:27:40 +00:00
Joe Groff
3e8b1eb0b8
ClangImporter: Import block parameters as `@unchecked (T -> U)?`.
...
Enable the importing of block parameters as @unchecked optionals, allowing 'nil' to be passed. Fixes <rdar://problem/16193003>.
Swift SVN r16331
2014-04-14 21:09:07 +00:00
Argyrios Kyrtzidis
f931674573
[IDE/ModuleInterface] Pick up the vertical spacing/grouping that is used in the clang module header.
...
Swift SVN r16294
2014-04-14 03:28:08 +00:00
Argyrios Kyrtzidis
31a620f1ee
[IDE/ModuleInterface] Fix erroneously printed newline between a regular comment and the declaration it is 'attached' to.
...
Swift SVN r16293
2014-04-14 03:28:05 +00:00
Argyrios Kyrtzidis
c1fd5b5a31
[IDE] For the module interface, add an option to not print parameter names.
...
rdar://16600455
Swift SVN r16275
2014-04-13 05:33:06 +00:00
Argyrios Kyrtzidis
293d771905
[IDE] Add an option to skip printing declarations that start with '_', for the module interface.
...
rdar://16559411
Swift SVN r16272
2014-04-13 04:35:30 +00:00
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
Dmitri Hrybenko
01c26070ec
AST printer: default to new-style function declaration syntax:
...
func f(paramName argName: Type)
Swift SVN r16260
2014-04-12 18:21:25 +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
Joe Groff
42a942925b
Enable block bridging.
...
Swift SVN r16248
2014-04-12 05:13:45 +00:00
Dmitri Hrybenko
6a24e5475e
Remove a separate bit for @objc inference, and use normal implicit attributes
...
This allows us to get rid of /* @objc(inferred) */ completely.
Swift SVN r16215
2014-04-11 14:34:28 +00:00
Dmitri Hrybenko
3972e2b23a
Reimplement @unchecked suppression: print '@unchecked T?' as 'T?' instead of
...
plain 'T'
rdar://16530754
Swift SVN r16213
2014-04-11 11:02:45 +00:00
Dmitri Hrybenko
c5d47d5578
Add a test that we don't import plain function pointer types
...
Swift SVN r16206
2014-04-11 09:45:19 +00:00
Dmitri Hrybenko
e68fd4abd3
AST printer: add an option to hide 'override' keywords
...
rdar://16530754
Swift SVN r16162
2014-04-10 14:27:00 +00:00
Dmitri Hrybenko
cc30070f68
AST printer: add an option to suppress @unchecked in imported declarations
...
This is rdar://16530754. For @unchecked in code completion see
rdar://16576739.
Swift SVN r16156
2014-04-10 10:40:30 +00:00
Argyrios Kyrtzidis
3a60b89d95
[ClangImporter] Don't import include guard macros.
...
This depends on clang r205917.
rdar://16555519
Swift SVN r16126
2014-04-09 19:53:31 +00:00
Argyrios Kyrtzidis
efe04e7460
[IDE] When annotating the AST print output, report the decl kind for declarations.
...
Swift SVN r16123
2014-04-09 17:16:53 +00:00
Jordan Rose
2c62cd4232
[ClangImporter] Maintain the invariant that new members come in last.
...
Enum elements were being added before the members already in the enum decl.
This was probably harmless, but just in case.
Swift SVN r15909
2014-04-04 01:17:51 +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
Doug Gregor
1dd795998f
Imported C functions never have API names.
...
The parameter names in C functions are not API in C and can easily be
inconsistent from one redeclaration to another. Therefore, those
parameter names are not considered API.
Swift SVN r15853
2014-04-03 04:13:29 +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
0fdaf47fed
IDE tests: extend the mock framework so that it can be reused in SourceKit
...
Swift SVN r15787
2014-04-02 12:39:53 +00:00
Dmitri Hrybenko
7514b8a9b4
IDE tests: consolidate test clang modules into an existing mock SDK
...
Swift SVN r15786
2014-04-02 11:16:24 +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
Dmitri Hrybenko
a3bb62d619
AST printing: print imports of submodules while printing Clang modules
...
Swift SVN r11165
2013-12-12 00:56:20 +00:00
Dmitri Hrybenko
e27001dbc7
Clang importer: determine the module for enums correctly while importing enum's
...
decl context
Swift SVN r11039
2013-12-09 22:19:47 +00:00
Dmitri Hrybenko
a6519a907d
Code completion: implement code completion for dot member access on clang modules
...
Because we don't want FooModule.#^A^# to show completion results for other
clang modules, global completion cache was replaced with a per-module cache.
Swift SVN r6951
2013-08-06 21:15:23 +00:00