Skip to content

Commit 99a45b0

Browse files
committed
Sema: Remove some dead code from DeclChecker::visitPatternBindingDecl()
1 parent 10faede commit 99a45b0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,9 +2233,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
22332233
}
22342234

22352235
void visitPatternBindingDecl(PatternBindingDecl *PBD) {
2236-
if (PBD->isBeingValidated())
2237-
return;
2238-
22392236
// Check all the pattern/init pairs in the PBD.
22402237
validatePatternBindingEntries(TC, PBD);
22412238

@@ -2252,10 +2249,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
22522249
PBD->getPattern(i)->hasStorage() &&
22532250
!PBD->getPattern(i)->getType()->hasError()) {
22542251

2255-
// If we have a type-adjusting attribute (like ownership), apply it now.
2256-
if (auto var = PBD->getSingleVar())
2257-
TC.checkTypeModifyingDeclAttributes(var);
2258-
22592252
// Decide whether we should suppress default initialization.
22602253
//
22612254
// Note: Swift 4 had a bug where properties with a desugared optional
@@ -2282,7 +2275,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
22822275
// If we got a default initializer, install it and re-type-check it
22832276
// to make sure it is properly coerced to the pattern type.
22842277
PBD->setInit(i, defaultInit);
2285-
TC.typeCheckPatternBinding(PBD, i);
22862278
}
22872279
}
22882280
}

0 commit comments

Comments
 (0)