================ @@ -693,7 +693,7 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const Decl *D) { if (VD->isExternC()) return getASTContext().getTranslationUnitDecl(); - if (const auto *FD = D->getAsFunction()) { + if (const auto *FD = dyn_cast<FunctionDecl>(D)) { ---------------- zygoloid wrote:
Maybe we can reduce the duplication a little? ```suggestion if (const auto *FD = getASTContext().getLangOpts().getClangABICompat() > LangOptions::ClangABI::Ver19 ? D->getAsFunction() : dyn_cast<FunctionDecl>(D)) { ``` https://github.com/llvm/llvm-project/pull/110503 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits