Commit Graph

10 Commits

Author SHA1 Message Date
Michael Ilseman
32faa62502 [Import as member] Lower case initialisms 2016-03-09 14:26:43 -08:00
Michael Ilseman
d5007ed080 [Clang importer] Clean up inference word manipulations.
NFC
2016-03-08 23:27:55 -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
3f7c54d0e7 [Clang importer] Introduce inference statistics and debug output.
NFC
2016-03-08 15:27:02 -08:00
Michael Ilseman
f96b8d64f7 [Clang importer] Infer init: move extra words onto first parameter 2016-03-07 17:55:13 -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
3b8f498324 [Clang importer] Lower camel-case inferred names 2016-03-07 10:50:08 -08:00
Michael Ilseman
d38f190acb [Clang importer] Basic import-as-member inference system
Introduces import-as-member (IAM) inferene system, to automatically
infer details that would otherwise have to be manually specified with
the swift_name attribute.

Basic functionality present, though there are some issues with
properties at the moment. No hooks, options, or tests yet, stay tuned.
2016-03-06 23:54:56 -08:00