File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1442,6 +1442,24 @@ static void check_array_bounds(const TypePtr &array_type,
14421442 // Validate builtin type
14431443 if (type_validator (operand_type)) {
14441444 TypePtr result_type = operand_type;
1445+
1446+ if (op_enum == Operator::ADDRESS_OF) {
1447+ QualifiedType ptr_type = apply_pointer_levels_or_error (
1448+ QualifiedType (operand_type, Qualifier::NONE),
1449+ 1 ,
1450+ op_name,
1451+ loc.begin .line ,
1452+ loc.begin .column
1453+ );
1454+ result_type = ptr_type.type ;
1455+ }
1456+ else if (op_enum == Operator::POINTER_DEREF) {
1457+ result_type = dereference_pointer (operand_type, loc, op_name);
1458+ if (!result_type) {
1459+ return nullptr ;
1460+ }
1461+ }
1462+
14451463 auto unary_expr = std::make_shared<UnaryExpr>(op_enum, operand, result_type);
14461464
14471465 // Set lvalue status based on operator type
You can’t perform that action at this time.
0 commit comments