@@ -793,9 +793,10 @@ static StringRef determineSwiftNewtypeBaseName(StringRef baseName,
793
793
return baseName;
794
794
}
795
795
796
- EffectiveClangContext NameImporter::determineEffectiveContext (
797
- const clang::NamedDecl *decl, const clang::DeclContext *dc,
798
- ImportNameOptions options, clang::Sema &clangSema) {
796
+ EffectiveClangContext
797
+ NameImporter::determineEffectiveContext (const clang::NamedDecl *decl,
798
+ const clang::DeclContext *dc,
799
+ ImportNameOptions options) {
799
800
EffectiveClangContext res;
800
801
801
802
// Enumerators can end up within their enclosing enum or in the global
@@ -841,8 +842,7 @@ EffectiveClangContext NameImporter::determineEffectiveContext(
841
842
842
843
bool NameImporter::hasNamingConflict (const clang::NamedDecl *decl,
843
844
const clang::IdentifierInfo *proposedName,
844
- const clang::TypedefNameDecl *cfTypedef,
845
- clang::Sema &clangSema) {
845
+ const clang::TypedefNameDecl *cfTypedef) {
846
846
// Test to see if there is a value with the same name as 'proposedName'
847
847
// in the same module as the decl
848
848
// FIXME: This will miss macros.
@@ -1101,7 +1101,7 @@ ImportedName NameImporter::importNameImpl(const clang::NamedDecl *D,
1101
1101
1102
1102
// Compute the effective context.
1103
1103
auto dc = const_cast <clang::DeclContext *>(D->getDeclContext ());
1104
- auto effectiveCtx = determineEffectiveContext (D, dc, options, clangSema );
1104
+ auto effectiveCtx = determineEffectiveContext (D, dc, options);
1105
1105
if (!effectiveCtx)
1106
1106
return {};
1107
1107
result.EffectiveContext = effectiveCtx;
@@ -1455,8 +1455,7 @@ ImportedName NameImporter::importNameImpl(const clang::NamedDecl *D,
1455
1455
SmallString<16 > baseNameWithProtocolSuffix;
1456
1456
if (auto objcProto = dyn_cast<clang::ObjCProtocolDecl>(D)) {
1457
1457
if (objcProto->hasDefinition ()) {
1458
- if (hasNamingConflict (D, objcProto->getIdentifier (), nullptr ,
1459
- clangSema)) {
1458
+ if (hasNamingConflict (D, objcProto->getIdentifier (), nullptr )) {
1460
1459
baseNameWithProtocolSuffix = baseName;
1461
1460
baseNameWithProtocolSuffix += SWIFT_PROTOCOL_SUFFIX;
1462
1461
baseName = baseNameWithProtocolSuffix;
@@ -1472,7 +1471,7 @@ ImportedName NameImporter::importNameImpl(const clang::NamedDecl *D,
1472
1471
auto swiftName = getCFTypeName (typedefNameDecl);
1473
1472
if (!swiftName.empty () &&
1474
1473
!hasNamingConflict (D, &clangCtx.Idents .get (swiftName),
1475
- typedefNameDecl, clangSema )) {
1474
+ typedefNameDecl)) {
1476
1475
// Adopt the requested name.
1477
1476
baseName = swiftName;
1478
1477
}
0 commit comments