diff options
author | Reid Kleckner <rnk@google.com> | 2018-05-31 18:42:29 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-05-31 18:42:29 +0000 |
commit | 26fc531dbc652a7738f3c8a421b3023ca12ca1ad (patch) | |
tree | d3e57bc853792f237164d2769825ed92043aa8e0 /clang/lib/CodeGen/MicrosoftCXXABI.cpp | |
parent | 38f7bb779854c3812ddd98cae4032788fa2722c4 (diff) | |
download | bcm5719-llvm-26fc531dbc652a7738f3c8a421b3023ca12ca1ad.tar.gz bcm5719-llvm-26fc531dbc652a7738f3c8a421b3023ca12ca1ad.zip |
Fix null MSInheritanceAttr deref in CXXRecordDecl::getMSInheritanceModel()
Ensure latest MPT decl has a MSInheritanceAttr when instantiating
templates, to avoid null MSInheritanceAttr deref in
CXXRecordDecl::getMSInheritanceModel().
See PR#37399 for repo / details.
Patch by Andrew Rogers!
Differential Revision: https://reviews.llvm.org/D46664
llvm-svn: 333680
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/MicrosoftCXXABI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index 2c3e1503857..a8260b49ed9 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -2733,7 +2733,7 @@ MicrosoftCXXABI::EmitMemberFunctionPointer(const CXXMethodDecl *MD) { assert(MD->isInstance() && "Member function must not be static!"); CharUnits NonVirtualBaseAdjustment = CharUnits::Zero(); - const CXXRecordDecl *RD = MD->getParent()->getMostRecentDecl(); + const CXXRecordDecl *RD = MD->getParent()->getMostRecentNonInjectedDecl(); CodeGenTypes &Types = CGM.getTypes(); unsigned VBTableIndex = 0; |