mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user