Skip to content

Commit 54ca7e6

Browse files
committed
Convert in lvalue context
1 parent 5469841 commit 54ca7e6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎cpp2rust/converter/converter.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2448,7 +2448,10 @@ bool Converter::VisitImplicitCastExpr(clang::ImplicitCastExpr *expr) {
24482448
}
24492449
bool dest_pointee_const =
24502450
expr->getType()->getPointeeType().isConstQualified();
2451-
Convert(sub_expr);
2451+
{
2452+
PushExprKind push(*this, ExprKind::LValue);
2453+
Convert(sub_expr);
2454+
}
24522455
if (IsStringLiteralExpr(sub_expr)) {
24532456
StrCat(".as_ptr()");
24542457
if (!dest_pointee_const) {

0 commit comments

Comments
 (0)