Skip to content

Commit 7dc4062

Browse files
committed
[TypeChecker] NFC: Remove unused DC variable from checkInheritanceClause
1 parent 3d6314c commit 7dc4062

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/Sema/TypeCheckDeclPrimary.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,12 @@ using namespace swift;
7171
/// file.
7272
static void checkInheritanceClause(
7373
llvm::PointerUnion<const TypeDecl *, const ExtensionDecl *> declUnion) {
74-
const DeclContext *DC;
7574
ArrayRef<InheritedEntry> inheritedClause;
7675
const ExtensionDecl *ext = nullptr;
7776
const TypeDecl *typeDecl = nullptr;
7877
const Decl *decl;
7978
if ((ext = declUnion.dyn_cast<const ExtensionDecl *>())) {
8079
decl = ext;
81-
DC = ext;
8280

8381
inheritedClause = ext->getInherited();
8482

@@ -95,12 +93,6 @@ static void checkInheritanceClause(
9593
} else {
9694
typeDecl = declUnion.get<const TypeDecl *>();
9795
decl = typeDecl;
98-
if (auto nominal = dyn_cast<NominalTypeDecl>(typeDecl)) {
99-
DC = nominal;
100-
} else {
101-
DC = typeDecl->getDeclContext();
102-
}
103-
10496
inheritedClause = typeDecl->getInherited();
10597
}
10698

0 commit comments

Comments
 (0)