diff options
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 8d7b76db5e9..765b14d49e5 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -886,9 +886,11 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD, mangleType(T, SourceRange(), QMM_Escape); break; } - case TemplateArgument::Declaration: - mangle(cast<NamedDecl>(TA.getAsDecl()), "$1?"); + case TemplateArgument::Declaration: { + const NamedDecl *ND = cast<NamedDecl>(TA.getAsDecl()); + mangle(ND, TA.isDeclForReferenceParam() ? "$E?" : "$1?"); break; + } case TemplateArgument::Integral: mangleIntegerLiteral(TA.getAsIntegral(), TA.getIntegralType()->isBooleanType()); |