[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 12:39:08 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list