diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index 8fac6436..6230afa4 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -567,8 +567,6 @@ CppSharp::AST::Class^ Parser::WalkRecordCXX(clang::CXXRecordDecl* Record) RC->Layout->DataSize = (int)Layout->getDataSize().getQuantity(); RC->Layout->HasOwnVFPtr = Layout->hasOwnVFPtr(); RC->Layout->VBPtrOffset = Layout->getVBPtrOffset().getQuantity(); - if (Record->isDynamicClass()) - WalkVTable(Record, RC); } CppSharp::AST::AccessSpecifierDecl^ AccessDecl = nullptr; @@ -641,6 +639,10 @@ CppSharp::AST::Class^ Parser::WalkRecordCXX(clang::CXXRecordDecl* Record) RC->Bases->Add(Base); } + // Process the vtables + if (Record->isDynamicClass()) + WalkVTable(Record, RC); + return RC; }