[gardening] Use isa<T> instead of dyn_cast<T> if the result is not needed

This commit is contained in:
practicalswift
2017-03-21 12:39:36 +01:00
parent 7e141f6e14
commit 479fa0f49c

View File

@@ -161,7 +161,7 @@ public:
bool shouldContinuePost(const Decl *D, Optional<BracketOptions> Bracket) {
assert(Bracket.hasValue());
if (!Bracket.getValue().shouldCloseNominal(D) && dyn_cast<NominalTypeDecl>(D))
if (!Bracket.getValue().shouldCloseNominal(D) && isa<NominalTypeDecl>(D))
return false;
if (!Bracket.getValue().shouldCloseExtension(D) &&
isa<ExtensionDecl>(D))