Commit Graph

20 Commits

Author SHA1 Message Date
Michael Ilseman
9d76ce983e [Import as Member] Fix oversight where we skip getter validation.
In the code that makes sure to pair up getters/setters only from the
same top level module, we were accidentally skipping the final
validity checks (e.g. do the number of parameters line up). This fixes
that.
2016-06-30 18:34:29 -07:00
Michael Ilseman
08ac432d3c [Import as member] Don't pair up get/set pairs from other modules
While inferring get/set, we paired them up even when one of them was
available through a custom objc header (e.g. a private
header). Instead, fail to pair them up. Test case added.
2016-04-13 13:08:16 -07:00
Michael Ilseman
151a19d3b8 [Import as member] Fixes to apinotes and tests
Fixes and clarifies a few API notes, and adds some test cases showing
current SILGen issues.
2016-04-11 11:31:12 -07:00
practicalswift
ea0ac3ac67 [gardening] Remove all tabs in C++ code 2016-04-08 21:22:57 +02:00
Michael Ilseman
4e4c511cf0 [Import as error] Error on non-prototyped function declarations 2016-03-28 15:41:48 -07:00
Michael Ilseman
eab9f975f7 [Import as member] Fix test case to test class importing 2016-03-11 13:50:46 -08:00
Michael Ilseman
2fc931494e [Import as member] Desugar to find the effective Clang decl context.
Adds incremental de-sugaring to any non-CF typedefs we find in our
types when trying to determine the effective DC. Additionally, cleans
up some logic and allows us to fail earlier on types we cannot
possibly extend.
2016-03-10 16:42:47 -08:00
Michael Ilseman
c494f2478a [Import as member] Extend 'Mutable' skipping to method inference 2016-03-10 13:27:44 -08:00
Michael Ilseman
de913b3512 [Import as member] Ignore all case for unique-concat-ing labels 2016-03-10 12:49:30 -08:00
Michael Ilseman
3dbbd69912 [Import as member] Special case 'Mutable' types
Recognize the special word Mutable in type names and other matches, so
as to import them onto the mutable type despite word re-ordering.
2016-03-10 11:55:38 -08:00
Michael Ilseman
594cf05331 [Import as member] Omit needless words
This hooks up omitNeedlessWords to import as member.

Unfortunately, we are now left straddling different approaches to
handling our strings, I'll be refactoring that soon.
2016-03-10 11:21:59 -08:00
Michael Ilseman
81f16c311a [Import as member] Skip globals whose names begin with underscore 2016-03-09 15:40:11 -08:00
Michael Ilseman
32faa62502 [Import as member] Lower case initialisms 2016-03-09 14:26:43 -08:00
Michael Ilseman
ff2db64b6f [Clang importer] Infer import as member name uniquing
In many contexts we may end up concatinating strings which introduce
redundancy in the resulting names. This uniques them.
2016-03-08 18:25:26 -08:00
Michael Ilseman
bbe1f7a0a5 [Clang importer] Extra correctness checks for inferring as properties.
Introduces validToImportAsProperty, which has to perform extra
checking the make sure that a get/set pair are compatible with import
as a property. This includes matching up 'self' parameters, matching
get's return type with the set's argument type, etc. Includes more
extensive tests.
2016-03-08 16:35:30 -08:00
Michael Ilseman
73f7fd2eb6 [Clang importer] Infer get-only properties and static properties.
Expands support for inference of computed properties, whether instance
or static, to include get-only. Adds test cases for both inference and
manual annotation for static computed properties.
2016-03-07 16:51:34 -08:00
Michael Ilseman
c39aebce24 [Clang importer] Infer static properties and methods
Adds inference support for static properties and methods, requiring us
to accurately do longest-prefix typename searches.

Tests cases included.
2016-03-07 16:36:59 -08:00
Michael Ilseman
23c818ed57 [Clang importer] Support static methods in swift_name 2016-03-07 15:58:01 -08:00
Michael Ilseman
3b8f498324 [Clang importer] Lower camel-case inferred names 2016-03-07 10:50:08 -08:00
Michael Ilseman
ff03498797 [Clang importer] Hook up inference system
Import as member inference hooked up, though not producing the final
results we want, yet.

Basic test case included.
2016-03-07 10:37:34 -08:00