File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -2097,9 +2097,10 @@ Type ClangImporter::Implementation::importMethodType(
2097
2097
2098
2098
bool allowNSUIntegerAsIntInResult = isFromSystemModule;
2099
2099
if (allowNSUIntegerAsIntInResult) {
2100
- Identifier name = methodName.getBaseName ();
2100
+ clang::Selector sel = clangDecl->getSelector ();
2101
+ StringRef name = sel.getNameForSlot (0 );
2101
2102
if (!name.empty ()) {
2102
- allowNSUIntegerAsIntInResult = !nameContainsUnsigned (name. str () );
2103
+ allowNSUIntegerAsIntInResult = !nameContainsUnsigned (name);
2103
2104
}
2104
2105
}
2105
2106
@@ -2179,13 +2180,14 @@ Type ClangImporter::Implementation::importMethodType(
2179
2180
2180
2181
bool allowNSUIntegerAsIntInParam = isFromSystemModule;
2181
2182
if (allowNSUIntegerAsIntInParam) {
2182
- Identifier name;
2183
- if (nameIndex < argNames.size ())
2184
- name = argNames[nameIndex];
2183
+ StringRef name;
2184
+ clang::Selector sel = clangDecl->getSelector ();
2185
+ if (nameIndex < sel.getNumArgs ())
2186
+ name = sel.getNameForSlot (nameIndex);
2185
2187
if (name.empty () && nameIndex == 0 )
2186
- name = methodName. getBaseName ( );
2188
+ name = sel. getNameForSlot ( 0 );
2187
2189
if (!name.empty ())
2188
- allowNSUIntegerAsIntInParam = !nameContainsUnsigned (name. str () );
2190
+ allowNSUIntegerAsIntInParam = !nameContainsUnsigned (name);
2189
2191
}
2190
2192
2191
2193
Type swiftParamTy;
You can’t perform that action at this time.
0 commit comments