From 1f529663bb70a01146f96f02f2bdd636a1aec89c Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 5 Feb 2014 23:53:29 +0000 Subject: [PATCH] Fix -Wunused-variable 'FD' by using it instead of ND when they're equal but FD has a more precise type. llvm-svn: 200889 --- clang/lib/AST/MicrosoftMangle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 6ce7018be19a..8563f2e29116 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -1093,11 +1093,11 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD, if (const FieldDecl *FD = dyn_cast(ND)) { mangleMemberDataPointer(cast(FD->getParent()), FD); } else if (const FunctionDecl *FD = dyn_cast(ND)) { - const CXXMethodDecl *MD = dyn_cast(ND); + const CXXMethodDecl *MD = dyn_cast(FD); if (MD && MD->isInstance()) mangleMemberFunctionPointer(MD->getParent(), MD); else - mangle(ND, "$1?"); + mangle(FD, "$1?"); } else { mangle(ND, TA.isDeclForReferenceParam() ? "$E?" : "$1?"); }