|
|
@ -281,16 +281,30 @@ static Cxxi::AccessSpecifier ConvertToAccess(clang::AccessSpecifier AS) |
|
|
|
return Cxxi::AccessSpecifier::Public; |
|
|
|
return Cxxi::AccessSpecifier::Public; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Cxxi::Class^ Parser::WalkRecordCXX(clang::CXXRecordDecl* Record, bool IsDependent) |
|
|
|
static bool HasClassDependentFields(clang::CXXRecordDecl* Record) |
|
|
|
{ |
|
|
|
{ |
|
|
|
using namespace clang; |
|
|
|
using namespace clang; |
|
|
|
using namespace clix; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Record->isAnonymousStructOrUnion()) |
|
|
|
for(auto it = Record->field_begin(); it != Record->field_end(); ++it) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(0); |
|
|
|
clang::FieldDecl* FD = (*it); |
|
|
|
return nullptr; |
|
|
|
|
|
|
|
|
|
|
|
switch (FD->getType()->getTypeClass()) { |
|
|
|
|
|
|
|
#define TYPE(Class, Base) |
|
|
|
|
|
|
|
#define ABSTRACT_TYPE(Class, Base) |
|
|
|
|
|
|
|
#define NON_CANONICAL_TYPE(Class, Base) |
|
|
|
|
|
|
|
#define DEPENDENT_TYPE(Class, Base) case Type::Class: |
|
|
|
|
|
|
|
#include "clang/AST/TypeNodes.def" |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cxxi::Class^ Parser::WalkRecordCXX(clang::CXXRecordDecl* Record, bool IsDependent) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
using namespace clang; |
|
|
|
|
|
|
|
using namespace clix; |
|
|
|
|
|
|
|
|
|
|
|
if (Record->hasFlexibleArrayMember()) |
|
|
|
if (Record->hasFlexibleArrayMember()) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -337,6 +351,9 @@ Cxxi::Class^ Parser::WalkRecordCXX(clang::CXXRecordDecl* Record, bool IsDependen |
|
|
|
RC->Methods->Add(Method); |
|
|
|
RC->Methods->Add(Method); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!IsDependent) |
|
|
|
|
|
|
|
IsDependent = HasClassDependentFields(Record); |
|
|
|
|
|
|
|
|
|
|
|
// Get the record layout information.
|
|
|
|
// Get the record layout information.
|
|
|
|
const ASTRecordLayout* Layout = 0; |
|
|
|
const ASTRecordLayout* Layout = 0; |
|
|
|
if (!IsDependent) |
|
|
|
if (!IsDependent) |
|
|
|