@@ -450,6 +450,14 @@ void cpp_typecheckt::typecheck_compound_declarator(
450
450
451
451
if (is_method)
452
452
{
453
+ if (
454
+ value.id () == ID_code &&
455
+ to_code (value).get_statement () == ID_cpp_delete)
456
+ {
457
+ value.make_nil ();
458
+ component.set (ID_access, " noaccess" );
459
+ }
460
+
453
461
component.set (ID_is_inline, declaration.member_spec ().is_inline ());
454
462
455
463
// the 'virtual' name of the function
@@ -1487,13 +1495,11 @@ bool cpp_typecheckt::get_component(
1487
1495
}
1488
1496
else
1489
1497
{
1490
- #if 0
1491
1498
error ().source_location =source_location;
1492
- str << "error: member `" << component_name
1493
- << "' is not accessible (" << component.get(ID_access) << ")";
1494
- str << "\nstruct name: " << final_type.get(ID_name) ;
1499
+ error () << " error: member `" << component_name
1500
+ << " ' is not accessible (" << component.get (ID_access) << " )"
1501
+ << eom ;
1495
1502
throw 0 ;
1496
- #endif
1497
1503
}
1498
1504
}
1499
1505
@@ -1523,12 +1529,10 @@ bool cpp_typecheckt::get_component(
1523
1529
{
1524
1530
if (check_component_access (component, final_type))
1525
1531
{
1526
- #if 0
1527
1532
error ().source_location =source_location;
1528
- str << "error: member `" << component_name
1529
- << "' is not accessible";
1533
+ error () << " error: member `" << component_name
1534
+ << " ' is not accessible" << eom ;
1530
1535
throw 0 ;
1531
- #endif
1532
1536
}
1533
1537
1534
1538
if (object.get_bool (ID_C_lvalue))
0 commit comments