r200889 - Fix -Wunused-variable 'FD' by using it instead of ND when they're equal but FD
Nick Lewycky
nicholas at mxc.ca
Wed Feb 5 15:53:29 PST 2014
Author: nicholas
Date: Wed Feb 5 17:53:29 2014
New Revision: 200889
URL: http://llvm.org/viewvc/llvm-project?rev=200889&view=rev
Log:
Fix -Wunused-variable 'FD' by using it instead of ND when they're equal but FD
has a more precise type.
Modified:
cfe/trunk/lib/AST/MicrosoftMangle.cpp
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=200889&r1=200888&r2=200889&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Wed Feb 5 17:53:29 2014
@@ -1093,11 +1093,11 @@ void MicrosoftCXXNameMangler::mangleTemp
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?");
}
More information about the cfe-commits
mailing list