Omit needless words: remove the Ref/Ptr type-stripping rule.

Instead, when mapping a Clang type to its name for omission purposes,
map CF types to their appropriate names. This more directly mirrors
what will happen on the Swift side, but is otherwise NFC.

Swift SVN r32140
This commit is contained in:
Doug Gregor
2015-09-22 00:35:10 +00:00
parent 7d6babd53a
commit 158a2b1ad5
4 changed files with 22 additions and 6 deletions

View File

@@ -294,11 +294,6 @@ static bool isKeyword(StringRef identifier) {
static Optional<StringRef> skipTypeSuffix(StringRef typeName) {
if (typeName.empty()) return None;
// "Ptr" and "Ref" are common suffixes we can ignore.
if (typeName.endswith("Ref") || typeName.endswith("Ptr")) {
return typeName.drop_back(3);
}
/// \d+D for dimensionality.
if (typeName.back() == 'D' && typeName.size() > 1) {
unsigned firstDigit = typeName.size() - 1;