Skip to content

Commit c6d9b84

Browse files
authored
Merge pull request #82411 from swiftlang/egorzhdan/dead-code
[cxx-interop] NFC: Remove unused function
2 parents 62c886e + 4911078 commit c6d9b84

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

include/swift/ClangImporter/ClangImporter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,9 +716,6 @@ bool isCxxConstReferenceType(const clang::Type *type);
716716
/// Determine whether this typedef is a CF type.
717717
bool isCFTypeDecl(const clang::TypedefNameDecl *Decl);
718718

719-
/// Determine whether type is a c++ foreign reference type.
720-
bool isForeignReferenceTypeWithoutImmortalAttrs(const clang::QualType type);
721-
722719
/// Determine the imported CF type for the given typedef-name, or the empty
723720
/// string if this is not an imported CF type name.
724721
llvm::StringRef getCFTypeName(const clang::TypedefNameDecl *decl);

lib/ClangImporter/ClangImporter.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7798,20 +7798,6 @@ static bool hasImportAsRefAttr(const clang::RecordDecl *decl) {
77987798
});
77997799
}
78007800

7801-
// Is this a pointer to a foreign reference type.
7802-
bool importer::isForeignReferenceTypeWithoutImmortalAttrs(const clang::QualType type) {
7803-
if (!type->isPointerType())
7804-
return false;
7805-
7806-
auto pointeeType =
7807-
dyn_cast<clang::RecordType>(type->getPointeeType().getCanonicalType());
7808-
if (pointeeType == nullptr)
7809-
return false;
7810-
7811-
return hasImportAsRefAttr(pointeeType->getDecl()) &&
7812-
!hasImmortalAttrs(pointeeType->getDecl());
7813-
}
7814-
78157801
static bool hasDiamondInheritanceRefType(const clang::CXXRecordDecl *decl) {
78167802
if (!decl->hasDefinition() || decl->isDependentType())
78177803
return false;

0 commit comments

Comments
 (0)