From 4f2135eddfd2aeac00a4888a914b26c985ad35d4 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Thu, 6 Feb 2014 19:09:15 -0500 Subject: [PATCH] Use the most recent (re)declaration when setting the MS inheritance model. --- src/CppParser/Parser.cpp | 2 +- src/Parser/Parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;