Skip to content

Commit 3425e47

Browse files
authored
Merge pull request #40532 from xedin/cleanup-typechecker-warnings
[TypeChecker] Fix two last warnings
2 parents 186713e + e6f2990 commit 3425e47

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

lib/Sema/LookupVisibleDecls.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ struct LookupState {
7070
IncludeDerivedRequirements(0), IncludeProtocolExtensionMembers(0) {}
7171

7272
public:
73-
LookupState(const LookupState &) = default;
74-
7573
static LookupState makeQualified() {
7674
LookupState Result;
7775
Result.IsQualified = 1;

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)