Break "NSUTF16" as "NSUTF, 16", not "NSUT, F16".

Previously, this declaration:

  typedef NS_OPTIONS(NSUInteger, NSABitmapFormat5) {
    NSAA16d,
    NSAB32d,
  };

...would import with members .A16d and .B32d, which is not necessarily
correct. (Is it "NS_AA_16d", or "NSA_A_16d"?) Be more conservative here.

Swift SVN r17125
This commit is contained in:
Jordan Rose
2014-05-01 00:06:22 +00:00
parent 4d8b4a6930
commit 8e44c2ee79
3 changed files with 28 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ void WordIterator::computeNextPosition() const {
// If we hit the end of the string, that's it. Otherwise, this
// word ends at the last uppercase letter, so that the next word
// starts with the last uppercase letter.
NextPosition = i == n? i : i-1;
NextPosition = (i == n || !clang::isLowercase(String[i])) ? i : i-1;
NextPositionValid = true;
return;
}
@@ -86,7 +86,7 @@ void WordIterator::computePrevPosition() const {
// If we hit the beginning of the string, that's it. Otherwise,
// this word starts at the uppercase letter that terminated the
// search above.
PrevPosition = i == 0 ? 0 : i-1;
PrevPosition = (i == 0 || !clang::isLowercase(String[i])) ? i : i-1;
PrevPositionValid = true;
return;
}