summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-02-08 01:15:37 +0000
committerReid Kleckner <reid@kleckner.net>2014-02-08 01:15:37 +0000
commite253b098d3880a542165b7807c0669f7d032cd11 (patch)
treed42a43a25ebc1c20c0d9802bbcffa9de80217e13 /clang/lib/AST/MicrosoftMangle.cpp
parentf8b417c5ef048feaadcbcbc370267b92b53cf7f8 (diff)
downloadbcm5719-llvm-e253b098d3880a542165b7807c0669f7d032cd11.tar.gz
bcm5719-llvm-e253b098d3880a542165b7807c0669f7d032cd11.zip
MS ABI: Use the most recent decl to check the inheritance model
This was crashing compilation of DeclContext::buildLookupImpl<>. llvm-svn: 201013
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 4ecbab437bc..a8a09a7e604 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -1084,12 +1084,13 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD,
case TemplateArgument::Declaration: {
const NamedDecl *ND = cast<NamedDecl>(TA.getAsDecl());
if (isa<FieldDecl>(ND) || isa<IndirectFieldDecl>(ND)) {
- mangleMemberDataPointer(cast<CXXRecordDecl>(ND->getDeclContext()),
- cast<ValueDecl>(ND));
+ mangleMemberDataPointer(
+ cast<CXXRecordDecl>(ND->getDeclContext())->getMostRecentDecl(),
+ cast<ValueDecl>(ND));
} else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);
if (MD && MD->isInstance())
- mangleMemberFunctionPointer(MD->getParent(), MD);
+ mangleMemberFunctionPointer(MD->getParent()->getMostRecentDecl(), MD);
else
mangle(FD, "$1?");
} else {
OpenPOWER on IntegriCloud