Browse Source

Added very basic support for dependent array types.

pull/1/head
triton 12 years ago
parent
commit
c063ca4ef7
  1. 4
      src/Bridge/ASTVisitor.cs
  2. 1
      src/Bridge/Type.cs
  3. 11
      src/Parser/Parser.cpp

4
src/Bridge/ASTVisitor.cs

@ -79,6 +79,10 @@ namespace CppSharp
if (!VisitType(array, quals)) if (!VisitType(array, quals))
return false; 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); return array.Type.Visit(this, quals);
} }

1
src/Bridge/Type.cs

@ -182,6 +182,7 @@ namespace CppSharp
{ {
Constant, Constant,
Variable, Variable,
Dependent,
Incomplete Incomplete
} }

11
src/Parser/Parser.cpp

@ -872,6 +872,12 @@ CppSharp::Type^ Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL,
return A; return A;
} }
case Type::DependentSizedArray:
{
auto A = gcnew CppSharp::ArrayType();
A->SizeType = CppSharp::ArrayType::ArraySize::Dependent;
return A;
}
case Type::FunctionProto: case Type::FunctionProto:
{ {
auto FP = Type->getAs<clang::FunctionProtoType>(); auto FP = Type->getAs<clang::FunctionProtoType>();
@ -1067,11 +1073,6 @@ CppSharp::Type^ Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL,
// GCC-specific / __attribute__((vector_size(n)) // GCC-specific / __attribute__((vector_size(n))
return nullptr; return nullptr;
} }
case Type::DependentSizedArray:
{
// Ignored.
return nullptr;
}
case Type::PackExpansion: case Type::PackExpansion:
{ {
// Ignored. // Ignored.

Loading…
Cancel
Save