[gardening] Remove redundant logic

This commit is contained in:
practicalswift
2017-04-11 23:04:55 +02:00
parent 3623d408ca
commit 5e255e07d7
23 changed files with 39 additions and 118 deletions

View File

@@ -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 {