parseh: use the decayed type not original type

This commit is contained in:
Andrew Kelley 2016-01-31 13:20:44 -07:00
parent 4c1f0f02d0
commit c1640a9246
2 changed files with 2 additions and 2 deletions

View file

@ -481,7 +481,7 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const
case Type::Decayed: case Type::Decayed:
{ {
const DecayedType *decayed_ty = static_cast<const DecayedType *>(ty); const DecayedType *decayed_ty = static_cast<const DecayedType *>(ty);
return resolve_qual_type(c, decayed_ty->getOriginalType(), decl); return resolve_qual_type(c, decayed_ty->getDecayedType(), decl);
} }
case Type::BlockPointer: case Type::BlockPointer:
case Type::LValueReference: case Type::LValueReference:

View file

@ -1969,7 +1969,7 @@ pub const Bar = enum_Bar;)OUTPUT");
add_parseh_case("constant size array", R"SOURCE( add_parseh_case("constant size array", R"SOURCE(
void func(int array[20]); void func(int array[20]);
)SOURCE", 1, R"OUTPUT(pub extern fn func(array: [20]c_int);)OUTPUT"); )SOURCE", 1, "pub extern fn func(array: ?&c_int);");
add_parseh_case("self referential struct with function pointer", R"SOURCE( add_parseh_case("self referential struct with function pointer", R"SOURCE(