diff --git a/src/Bridge/ASTVisitor.cs b/src/Bridge/ASTVisitor.cs index 90ed51b9..08283e71 100644 --- a/src/Bridge/ASTVisitor.cs +++ b/src/Bridge/ASTVisitor.cs @@ -79,6 +79,10 @@ namespace CppSharp if (!VisitType(array, quals)) return false; + // FIXME: Remove this once array dependent types are processed. + if (array.SizeType == ArrayType.ArraySize.Dependent) + return false; + return array.Type.Visit(this, quals); } diff --git a/src/Bridge/Type.cs b/src/Bridge/Type.cs index 3dc54234..e8d2ba06 100644 --- a/src/Bridge/Type.cs +++ b/src/Bridge/Type.cs @@ -182,6 +182,7 @@ namespace CppSharp { Constant, Variable, + Dependent, Incomplete } diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index fcbd1f2b..407cdc75 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -872,6 +872,12 @@ CppSharp::Type^ Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL, return A; } + case Type::DependentSizedArray: + { + auto A = gcnew CppSharp::ArrayType(); + A->SizeType = CppSharp::ArrayType::ArraySize::Dependent; + return A; + } case Type::FunctionProto: { auto FP = Type->getAs(); @@ -1067,11 +1073,6 @@ CppSharp::Type^ Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL, // GCC-specific / __attribute__((vector_size(n)) return nullptr; } - case Type::DependentSizedArray: - { - // Ignored. - return nullptr; - } case Type::PackExpansion: { // Ignored.