Skip to content

Commit 54a6ce7

Browse files
committed
Add MapInitializer check in refcount
1 parent d8b9d76 commit 54a6ce7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cpp2rust/converter/models/converter_refcount.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,6 +1628,11 @@ std::string ConverterRefCount::GetDefaultAsString(clang::QualType qual_type) {
16281628
return BoxValue("VaList::default()");
16291629
}
16301630

1631+
if (auto init = Mapper::MapInitializer(qual_type); !init.empty()) {
1632+
computed_expr_type_ = ComputedExprType::FreshValue;
1633+
return BoxValue(std::move(init));
1634+
}
1635+
16311636
std::string ret;
16321637
if (qual_type->isPointerType()) {
16331638
auto pointee_type = qual_type->getPointeeType();

0 commit comments

Comments
 (0)