Member predicate Impl::AstNode::getEnclosingDecl
Gets the nearest declaration that contains this AST node, if any.
Note that the nearest declaration may be an extension of a type declaration. If you always
want the type declaration and not the extension, use getEnclosingDecl().asNominalTypeDecl()
.