failing bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358627
91177308-0d34-0410-b5e6-
96231b3b80d8
/// Return this DeclContext if it is a BlockDecl. Otherwise, return the
/// innermost enclosing BlockDecl or null if there are no enclosing blocks.
- const BlockDecl *getInnermostBlockDecl() const {
- const DeclContext *Ctx = this;
-
- do {
- if (Ctx->isClosure())
- return cast<BlockDecl>(Ctx);
- Ctx = Ctx->getParent();
- } while (Ctx);
-
- return nullptr;
- }
+ const BlockDecl *getInnermostBlockDecl() const;
bool isObjCContainer() const {
switch (getDeclKind()) {
return getParent();
}
+const BlockDecl *DeclContext::getInnermostBlockDecl() const {
+ const DeclContext *Ctx = this;
+
+ do {
+ if (Ctx->isClosure())
+ return cast<BlockDecl>(Ctx);
+ Ctx = Ctx->getParent();
+ } while (Ctx);
+
+ return nullptr;
+}
+
bool DeclContext::isInlineNamespace() const {
return isNamespace() &&
cast<NamespaceDecl>(this)->isInline();