Browse Source

Use the most recent (re)declaration when setting the MS inheritance model.

pull/155/merge
Joao Matos 12 years ago
parent
commit
4f2135eddf
  1. 2
      src/CppParser/Parser.cpp
  2. 2
      src/Parser/Parser.cpp

2
src/CppParser/Parser.cpp

@ -1729,7 +1729,7 @@ static bool CanCheckCodeGenInfo(const clang::Type* Ty, bool IsMicrosoftABI) @@ -1729,7 +1729,7 @@ static bool CanCheckCodeGenInfo(const clang::Type* Ty, bool IsMicrosoftABI)
if (auto MPT = Ty->getAs<clang::MemberPointerType>())
if (auto RT = MPT->getClass())
if (auto RD = RT->getAsCXXRecordDecl())
RD->setMSInheritanceModel();
RD->getMostRecentDecl()->setMSInheritanceModel();
}
return CheckCodeGenInfo;

2
src/Parser/Parser.cpp

@ -1749,7 +1749,7 @@ static bool CanCheckCodeGenInfo(const clang::Type* Ty, bool IsMicrosoftABI) @@ -1749,7 +1749,7 @@ static bool CanCheckCodeGenInfo(const clang::Type* Ty, bool IsMicrosoftABI)
if (auto MPT = Ty->getAs<clang::MemberPointerType>())
if (auto RT = MPT->getClass())
if (auto RD = RT->getAsCXXRecordDecl())
RD->setMSInheritanceModel();
RD->getMostRecentDecl()->setMSInheritanceModel();
}
return CheckCodeGenInfo;

Loading…
Cancel
Save