================ @@ -302,7 +302,7 @@ void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD, assert((isa<NamedDecl>(DC) || isa<BlockDecl>(DC)) && "expected a NamedDecl or BlockDecl"); if (isa<BlockDecl>(DC)) - for (; DC && isa<BlockDecl>(DC); DC = DC->getParent()) + for (; isa_and_nonnull<BlockDecl>(DC); DC = DC->getParent()) (void) getBlockId(cast<BlockDecl>(DC), true); ---------------- samolisov wrote:
@NagyDonat thank you for the suggestion. I can remove the check after merging this PR as a separate change. https://github.com/llvm/llvm-project/pull/94987 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits