mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[gardening] Remove redundant logic
This commit is contained in:
@@ -1451,9 +1451,7 @@ bool ValueDecl::needsCapture() const {
|
||||
if (!getDeclContext()->isLocalContext())
|
||||
return false;
|
||||
// We don't need to capture types.
|
||||
if (isa<TypeDecl>(this))
|
||||
return false;
|
||||
return true;
|
||||
return !isa<TypeDecl>(this);
|
||||
}
|
||||
|
||||
ValueDecl *ValueDecl::getOverriddenDecl() const {
|
||||
@@ -4893,9 +4891,7 @@ ConstructorDecl::getDelegatingOrChainedInitKind(DiagnosticEngine *diags,
|
||||
|
||||
bool walkToDeclPre(class Decl *D) override {
|
||||
// Don't walk into further nominal decls.
|
||||
if (isa<NominalTypeDecl>(D))
|
||||
return false;
|
||||
return true;
|
||||
return !isa<NominalTypeDecl>(D);
|
||||
}
|
||||
|
||||
std::pair<bool, Expr*> walkToExprPre(Expr *E) override {
|
||||
|
||||
Reference in New Issue
Block a user