Skip to content

Commit 21a88a3

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents 7b3abe9 + 2d7b7a7 commit 21a88a3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4746,7 +4746,7 @@ namespace {
47464746
auto loc = Impl.importSourceLoc(decl->getLocation());
47474747
auto dc = Impl.importDeclContextOf(
47484748
decl, importedName.getEffectiveContext());
4749-
4749+
47504750
SmallVector<GenericTypeParamDecl *, 4> genericParams;
47514751
for (auto &param : *decl->getTemplateParameters()) {
47524752
auto genericParamDecl =
@@ -5529,7 +5529,7 @@ namespace {
55295529
objcClass->getDeclaredType());
55305530
Impl.SwiftContext.evaluator.cacheOutput(ExtendedNominalRequest{result},
55315531
std::move(objcClass));
5532-
5532+
55335533
Identifier categoryName;
55345534
if (!decl->getName().empty())
55355535
categoryName = Impl.SwiftContext.getIdentifier(decl->getName());
@@ -9156,6 +9156,9 @@ void ClangImporter::Implementation::swiftify(FuncDecl *MappedDecl) {
91569156
if (!ClangDecl)
91579157
return;
91589158

9159+
if (ClangDecl->getNumParams() != MappedDecl->getParameters()->size())
9160+
return;
9161+
91599162
llvm::SmallString<128> MacroString;
91609163
// We only attach the macro if it will produce an overload. Any __counted_by
91619164
// will produce an overload, since UnsafeBufferPointer is still an improvement
@@ -9571,7 +9574,7 @@ ClangImporter::Implementation::importDeclImpl(const clang::NamedDecl *ClangDecl,
95719574
Result = importDecl(UnderlyingDecl, version);
95729575
SkippedOverTypedef = true;
95739576
}
9574-
9577+
95759578
if (!Result) {
95769579
SwiftDeclConverter converter(*this, version);
95779580
Result = converter.Visit(ClangDecl);

0 commit comments

Comments
 (0)