Commit Graph

570 Commits

Author SHA1 Message Date
swift-ci
f15cad3609 Merge remote-tracking branch 'origin/master' into master-next 2017-04-28 20:08:31 -07:00
Doug Gregor
447dce6c1f Merge pull request #9004 from itaiferber/swift-archival-serialization
Swift Archival & Serialization API
2017-04-28 20:02:33 -07:00
swift-ci
9ee70173bc Merge remote-tracking branch 'origin/master' into master-next 2017-04-28 18:48:32 -07:00
Itai Ferber
433c192bf1 Temporarily fix failing SourceKit test 2017-04-28 13:37:10 -07:00
Robert Widmann
39494b2ba2 Rearrange test code for exhaustiveness 2017-04-28 02:06:39 -04:00
swift-ci
cdde06ac25 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 15:56:02 -07:00
Norio Nomura
459c18dd35 Disable sourcekit’s tests on ubuntu-14.04
https://github.com/apple/swift/pull/8485#issuecomment-296862707
2017-04-27 08:44:13 +09:00
Norio Nomura
3da7926a5e Revert "Revert "Enable SourceKit tests if building SourceKit""
This reverts commit a383adf9df.
2017-04-26 21:16:36 +09:00
Ben Langmuir
7e5dd1fa01 [sourcekitd] Allow mising name pieces preferred names
With the interpretation that they mean to retain whatever the name
piece was in the original name.
2017-04-25 15:25:53 -07:00
Argyrios Kyrtzidis
9b9c84a708 Merge pull request #8972 from akyrtzi/index-external-symbol-namespacing
[index] Use a #pragma to apply module namespacing for exported ObjC header and match Swift namespaced USRs with the clang side
2017-04-24 21:13:12 -07:00
Arnold Schwaighofer
a383adf9df Revert "Enable SourceKit tests if building SourceKit" 2017-04-24 17:59:03 -07:00
Argyrios Kyrtzidis
28b15852d8 Fix tests due to clang namespacing USR changes 2017-04-24 17:42:36 -07:00
Nathan Hawes
6b58cd7d00 [test] Add regression test for cursor-info crasher in rdar://problem/31758709 2017-04-24 17:03:34 -07:00
Argyrios Kyrtzidis
be12528bcc Merge pull request #8746 from felix91gr/master
Added -help option to sourcekitd-test
2017-04-24 16:06:47 -07:00
Argyrios Kyrtzidis
792d7c06a5 [test/SourceKit/DocSupport] Fix test for @objc USR change 2017-04-24 14:13:37 -07:00
swift-ci
771cdb8a82 Merge remote-tracking branch 'origin/master' into master-next 2017-04-24 11:08:52 -07:00
Jordan Rose
e575d2d5ba [ClangImporter] Error structs from enums are not imported decls.
Enums with the ns_error_domain attribute represent codes for NSError,
which means Swift developers will expect to interact with them in
terms of Error. SE-0112 improved bridging for these enums to generate
a struct with the following form:

    struct MyError: Error {
      @objc enum Code: RawRepresentable {
        case outOfMemory
        case fileNotFound
      }
      var userInfo: [NSObject: AnyObject] { get }
      static var outOfMemory: Code { get }
      static var fileNotFound: Code { get }
    }

where MyError.Code corresponds to the original MyError enum defined in
Objective-C. Until recently, both the enum and the synthesized struct
were marked as having the original enum as their "Clang node", but
that leads to problems: the struct isn't really ObjC-compatible, and
the two decls have the same USR. (The latter had already been worked
around.)

This commit changes the struct to be merely considered a synthesized
"external definition", with no associated Clang node. This meant
auditing everywhere that's looking for a Clang node and seeing which
ones applied to external definitions in general.

There is one regression in quality here: the generated struct is no
longer printed as part of the Swift interface for a header file, since
it's not actually a decl with a corresponding Clang node. The previous
change to AST printing mitigates this a little by at least indicating
that the enum has become a nested "Code" type.
2017-04-24 09:57:41 -07:00
Jordan Rose
129fd372d5 ASTPrinter: Qualify names when printing nested declarations.
That is, if you have this declaration:

    struct Outer {
      struct Inner {
        // ...
      }
    }

and you're just printing 'Inner', print it like this:

    struct Outer.Inner {
      // ...
    }

This comes up with the ClangImporter's import-as-member feature, and
is also about to affect how error code enums are imported as well.

This is currently only enabled in certain contexts: always when
printing interfaces, and for types (but not other members) when
printing declarations for Quick Help.

rdar://problem/28208090
2017-04-24 09:57:40 -07:00
Jordan Rose
25985cb764 [Mangling] Uniformly use "So" for imported decls.
...and repurpose "SC" for (C)lang-importer-synthesized decls, instead
of just decls that are C-like instead of ObjC-like. (See next commits.)
2017-04-24 09:57:30 -07:00
swift-ci
95e7aff734 Merge remote-tracking branch 'origin/master' into master-next 2017-04-24 09:48:41 -07:00
Alex Blewitt
71987b90b2 Merge pull request #8485 from norio-nomura/enable-sourcekit-test
Enable SourceKit tests if building SourceKit
2017-04-24 17:37:30 +01:00
Félix
042fccb510 Added -help option so sourcekitd-test
Added "-help" option to Options.td
Added also:
* Added "OPT_HELP" case in the main TestOptions.cpp switch. It uses the llvm options help functionality to provide up-to-date help
* Additional "Use -help for assistance" at the end of the error message that appears when calling an unknown option
Added their following tests, respectively::
* usage.swift, and
* wrong_arguments.swift

Extra: FIXME: in TestOptions::printHelp, suggesting a possible expansion for the printHelp option (details in file)
2017-04-22 15:06:48 -03:00
swift-ci
6abdee2a39 Merge remote-tracking branch 'origin/master' into master-next 2017-04-21 22:08:31 -07:00
Norio Nomura
07803b1d33 [SourceKit] Apply changes made at https://github.com/apple/swift/pull/8862 also to Linux 2017-04-22 14:04:11 +09:00
Slava Pestov
2aba021c6e IDE: Don't use Objective-C USRs for AnyObject
It's not a real @objc protocol.
2017-04-21 20:36:32 -07:00
swift-ci
680f67d1d4 Merge remote-tracking branch 'origin/master' into master-next 2017-04-21 16:48:33 -07:00
Ben Langmuir
9d745fa18f [test] Fix SourceKit test harder against unnecessary USRs
This time make sure I actually got *all* the associated_usrs, d'oh.
2017-04-21 15:25:28 -07:00
swift-ci
12ad22dbd3 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 20:08:30 -07:00
Max Moiseev
fc134ae1df Fixing the test 2017-04-20 14:18:20 -07:00
swift-ci
156915f005 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 12:28:30 -07:00
David Farler
012d511d54 Merge pull request #8823 from mxswd/quickhelp-xml
Updated quick help XML to separate the comment data from the metadata
2017-04-20 12:20:46 -07:00
Maxwell Swadling
d7949f03c8 Merge remote-tracking branch 'origin/master' into quickhelp-xml
Conflicts:
	test/SourceKit/DocSupport/doc_clang_module.swift.response
2017-04-20 09:17:48 -07:00
swift-ci
b733669ef5 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 01:08:30 -07:00
swift-ci
0f4ebfd66e Merge pull request #8593 from DougGregor/stdlib-se-0142 2017-04-20 00:49:04 -07:00
Doug Gregor
29a15ce402 [Stdlib] Apply SE-0142 to fix ABI FIXME #92, part of ABI FIXME #99. 2017-04-19 23:15:33 -07:00
Maxwell Swadling
569ef0302e Updated to tests to match commit 452e535ba4 2017-04-19 16:24:19 -07:00
swift-ci
3e00c6e82b Merge remote-tracking branch 'origin/master' into master-next 2017-04-19 12:28:31 -07:00
swift-ci
84f533a4b7 Merge pull request #8862 from akyrtzi/index-mark-methods-dynamic 2017-04-19 12:27:14 -07:00
Argyrios Kyrtzidis
e152d4ac1f [index] Mark indexed methods as 'dynamic' when appropriate
'dynamic' for indexing purposes means the method is overridable.
2017-04-19 11:48:52 -07:00
swift-ci
e41108331e Merge remote-tracking branch 'origin/master' into master-next 2017-04-18 20:28:31 -07:00
Ben Langmuir
83c43544ab [test] Cleanup a test relying on USRs that didn't need to
We don't care what the USRs are here, we were just using them to avoid
results slipping in between the start of the structure and the module
name.  This patch does that in a way that doesn't use the USR.
2017-04-18 19:48:00 -07:00
swift-ci
741316dc5c Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 23:29:28 -07:00
swift-ci
19b1036c54 Merge pull request #8828 from akyrtzi/index-accessors-handling 2017-04-17 23:18:31 -07:00
Argyrios Kyrtzidis
dc7373c05b [index] Improve handling of property accessors
- Report accessor function definitions for stored properties as well
- Fix issue where a call to a computed accessor was not reported if its parent was a statement
- Take into account if the stored property is member or not to adjust the symbol kind for the accessor
2017-04-17 22:25:08 -07:00
swift-ci
b56ee3d799 Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 16:48:32 -07:00
Max Moiseev
8ca814cc8c Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-04-17 14:40:20 -07:00
Adrian Prantl
88592ecce6 Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 14:24:23 -07:00
Jordan Rose
2d84981fc2 Improve the mangling of typealiases.
- Allow them to use substitutions.
- Consistently use 'a' as a mangling operator.
- For generic typealiases, include the alias as context for any generic
  parameters.

Typealiases don't show up in symbol names, which always refer to
canonical types, but they are mangled for debug info and for USRs
(unique identifiers used by SourceKit), so it's good to get this
right.
2017-04-17 11:31:15 -07:00
Max Moiseev
9b53efd72c Merge branch 'master' into new-integer-protocols 2017-04-17 09:53:44 -07:00
Jordan Rose
7c73ba5fe3 If a function has an error type, mangle it as '(Error) -> Error'.
This lets the mangling preserve the invariant that functions always
structurally have function types. Error types don't show up in mangled
names often anyway, but it can occur when you ask for the USR of a
function with an invalid type.
2017-04-14 17:02:54 -07:00