has a more precise type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200889
91177308-0d34-0410-b5e6-
96231b3b80d8
if (const FieldDecl *FD = dyn_cast<FieldDecl>(ND)) {
mangleMemberDataPointer(cast<CXXRecordDecl>(FD->getParent()), FD);
} else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
- const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(ND);
+ const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
if (MD && MD->isInstance())
mangleMemberFunctionPointer(MD->getParent(), MD);
else
- mangle(ND, "$1?");
+ mangle(FD, "$1?");
} else {
mangle(ND, TA.isDeclForReferenceParam() ? "$E?" : "$1?");
}