================
@@ -693,14 +693,13 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const
Decl *D) {
if (VD->isExternC())
return getASTContext().getTranslationUnitDecl();
- if (const auto *FD = D->getAsFunction()) {
- if (FD->isExternC())
- return getASTContext().getTranslationUnitDecl();
+ if (const auto *FD = getASTContext().getLangOpts().getClangABICompat() >
+ LangOptions::ClangABI::Ver19
+ ? D->getAsFunction()
+ : dyn_cast<FunctionDecl>(D)) {
// Member-like constrained friends are mangled as if they were members of
// the enclosing class.
- if (FD->isMemberLikeConstrainedFriend() &&
- getASTContext().getLangOpts().getClangABICompat() >
- LangOptions::ClangABI::Ver17)
+ if (FD->isMemberLikeConstrainedFriend())
----------------
VitaNuo wrote:
Yes sorry, I might have misinterpreted the comment above.
https://github.com/llvm/llvm-project/pull/110503
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits