diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index bb5b6bab..e083390e 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -1729,7 +1729,7 @@ static bool CanCheckCodeGenInfo(const clang::Type* Ty, bool IsMicrosoftABI) if (auto MPT = Ty->getAs()) if (auto RT = MPT->getClass()) if (auto RD = RT->getAsCXXRecordDecl()) - RD->setMSInheritanceModel(); + RD->getMostRecentDecl()->setMSInheritanceModel(); } return CheckCodeGenInfo; diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index f29bc1ea..2cc716b4 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -1749,7 +1749,7 @@ static bool CanCheckCodeGenInfo(const clang::Type* Ty, bool IsMicrosoftABI) if (auto MPT = Ty->getAs()) if (auto RT = MPT->getClass()) if (auto RD = RT->getAsCXXRecordDecl()) - RD->setMSInheritanceModel(); + RD->getMostRecentDecl()->setMSInheritanceModel(); } return CheckCodeGenInfo;