From c1640a924643d0b3d3616c2a41f70918d6150301 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 31 Jan 2016 13:20:44 -0700 Subject: [PATCH] parseh: use the decayed type not original type --- src/parseh.cpp | 2 +- test/run_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parseh.cpp b/src/parseh.cpp index 78db01f2ce2a76218cb710845e91ec80a3b87b20..8a1536308442225d8fb6ad2fa97d15db77f07305 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -481,7 +481,7 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const case Type::Decayed: { const DecayedType *decayed_ty = static_cast(ty); - return resolve_qual_type(c, decayed_ty->getOriginalType(), decl); + return resolve_qual_type(c, decayed_ty->getDecayedType(), decl); } case Type::BlockPointer: case Type::LValueReference: diff --git a/test/run_tests.cpp b/test/run_tests.cpp index a818bbc4f0aa930f86e004b7a7cf862119266470..c622a265e0b6873250517784b5452c2b9a0ff432 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -1969,7 +1969,7 @@ pub const Bar = enum_Bar;)OUTPUT"); add_parseh_case("constant size array", R"SOURCE( 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( -- 2.54.0