From: Nick Lewycky Date: Wed, 5 Feb 2014 23:53:29 +0000 (+0000) Subject: Fix -Wunused-variable 'FD' by using it instead of ND when they're equal but FD X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ec05d9af2fb5631f0c83f62d0b833c71ddf8c25;p=clang Fix -Wunused-variable 'FD' by using it instead of ND when they're equal but FD has a more precise type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200889 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 6ce7018be1..8563f2e291 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/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?"); }