summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 481ed44347e..33b81693918 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -1156,13 +1156,16 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD,
QualType T = TA.getNullPtrType();
if (const MemberPointerType *MPT = T->getAs<MemberPointerType>()) {
const CXXRecordDecl *RD = MPT->getMostRecentCXXRecordDecl();
- if (MPT->isMemberFunctionPointerType())
+ if (MPT->isMemberFunctionPointerType() && isa<ClassTemplateDecl>(TD)) {
mangleMemberFunctionPointer(RD, nullptr);
- else
+ return;
+ }
+ if (MPT->isMemberDataPointer()) {
mangleMemberDataPointer(RD, nullptr);
- } else {
- Out << "$0A@";
+ return;
+ }
}
+ Out << "$0A@";
break;
}
case TemplateArgument::Expression:
OpenPOWER on IntegriCloud