From 0926734f380ba384e30904406cfc4d04ce0f8441 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 4 Aug 2013 06:10:57 +0100 Subject: [PATCH] Walk the vtable further down after all the child declarations of the class have been processed so that we find the proper methods once we walk the vtable components. --- src/Parser/Parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; }