[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.
This commit is contained in:
Michael Ilseman
2016-03-06 22:51:07 -08:00
parent 94ba6e7a16
commit d38f190acb
4 changed files with 554 additions and 0 deletions

View File

@@ -182,6 +182,16 @@ namespace swift {
unsigned getPosition() const {
return Position;
}
/// Retrieve the string up until this iterator
StringRef getPriorStr() const {
return String.slice(0, Position);
}
/// Retrieve the rest of the string (including this position)
StringRef getRestOfStr() const {
return String.slice(Position, String.size());
}
};
/// Find the first camelCase word in the given string.