Commit Graph

11 Commits

Author SHA1 Message Date
Dmitri Hrybenko
21dd66b6cc Code completion: don't adjust implicitly unwrapped optional types to normal
optionals

rdar://17732126


Swift SVN r20212
2014-07-19 18:41:41 +00:00
Sonny Falk
efa1ff8ab4 [IDE/CodeComplete] Add CallParameterClosureType chunk, which resolves
optional & alias types for closure type parameters.

This allows code completion placeholder expansion to properly expand
closure parameters utilizing a typealias, e.g. dispatch_block_t.

Update and add test for the above.

Work for <rdar://problem/15860693>.

Swift SVN r20206
2014-07-19 03:18:29 +00:00
Joe Groff
cb48fbd24b Enable pointer conversions.
Swift SVN r19274
2014-06-26 23:26:31 +00:00
Chris Lattner
b844728b3b Implement: <rdar://problem/17464179> Stop importing decls with CInt and related typedefs
This keeps CInt (and related type aliases) in the stdlib, and keeps the clang importer
using them, but has it look through one level of the type alias to get to the underlying
type. 

The upshot of this is that we now import things like exit (as a random example) as 
"func exit(Int32)" instead of "func exit(CInt)".



Swift SVN r19224
2014-06-26 06:28:40 +00:00
Jordan Rose
ce4dcb7a5f [ClangImporter] Import C function types as CFunctionPointer<T>.
...where T is the equivalent Swift function type. This gives us proper type
safety (ish) for C function pointers while still not treating them the same
as Swift closures.

If the function type is not one we can represent in Swift, we fall back to
COpaquePointer. CFunctionPointer<T> and COpaquePointer can be explicitly
constructed from one another, but do not freely convert.

<rdar://problem/17215978>

Swift SVN r19154
2014-06-25 00:33:06 +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
Sonny Falk
a2680240c0 [IDE/CodeCompletion] Teach code completion to display the local parameter name
if there's no parameter API name. This is for display purposes only.
Update all relevant tests accordingly.
This addresses <rdar://problem/16768768>.

For example:
  class X {
    func f(a: Int, b: Int) { }
  }

Would previously display like this in code completion in Xcode:
  f(<#Int#>, b: <#Int#>)

The local parameter name, while not API, often still conveys meaning
to the user. So it's now included like this:
  f(<#a: Int#>, b: <#Int#>)

Swift SVN r18403
2014-05-19 08:31:10 +00:00
Dmitri Hrybenko
a48ad67d72 Code completion: make test more strict
Swift SVN r18342
2014-05-18 19:13:14 +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
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Dmitri Hrybenko
16c75ddc66 Code completion: add a test: check that we include code completion results for
contents of the frameworks that are re-exported by the imported frameworks (but
not explicitly imported in the .swift source).


Swift SVN r6953
2013-08-06 21:24:50 +00:00