@@ -72,14 +72,15 @@ class cpp_typecheckt:public c_typecheck_baset
7272 {
7373 }
7474
75- virtual ~cpp_typecheckt () { }
75+ ~cpp_typecheckt () override
76+ {
77+ }
7678
77- virtual void typecheck ();
79+ void typecheck () override ;
7880
7981 // overload to use C++ syntax
80-
81- virtual std::string to_string (const typet &type);
82- virtual std::string to_string (const exprt &expr);
82+ std::string to_string (const typet &) override ;
83+ std::string to_string (const exprt &) override ;
8384
8485 friend class cpp_typecheck_resolvet ;
8586 friend class cpp_declarator_convertert ;
@@ -95,7 +96,7 @@ class cpp_typecheckt:public c_typecheck_baset
9596 cpp_name, want, fargs, fail_with_exception);
9697 }
9798
98- virtual void typecheck_expr (exprt &expr) ;
99+ void typecheck_expr (exprt &) override ;
99100
100101 bool cpp_is_pod (const typet &type) const ;
101102
@@ -347,12 +348,12 @@ class cpp_typecheckt:public c_typecheck_baset
347348
348349 // types
349350
350- void typecheck_type (typet &type) ;
351+ void typecheck_type (typet &) override ;
351352
352353 cpp_scopet &typecheck_template_parameters (
353354 template_typet &type);
354355
355- void typecheck_compound_type (struct_union_typet &type) ;
356+ void typecheck_compound_type (struct_union_typet &) override ;
356357 void check_fixed_size_array (typet &type);
357358 void typecheck_enum_type (typet &type);
358359
@@ -379,7 +380,10 @@ class cpp_typecheckt:public c_typecheck_baset
379380
380381 void put_compound_into_scope (const struct_union_typet::componentt &component);
381382 void typecheck_compound_body (symbolt &symbol);
382- void typecheck_compound_body (struct_union_typet &) { UNREACHABLE; }
383+ void typecheck_compound_body (struct_union_typet &) override
384+ {
385+ UNREACHABLE;
386+ }
383387 void typecheck_enum_body (symbolt &symbol);
384388 void typecheck_method_bodies ();
385389 void typecheck_compound_bases (struct_typet &type);
@@ -416,68 +420,63 @@ class cpp_typecheckt:public c_typecheck_baset
416420 exprt::operandst &ops);
417421
418422 // code conversion
419- virtual void typecheck_code (codet &code) ;
420- virtual void typecheck_try_catch (codet &code );
421- virtual void typecheck_member_initializer (codet &code );
422- virtual void typecheck_decl (codet &code) ;
423- virtual void typecheck_block (codet &code) ;
424- virtual void typecheck_ifthenelse (code_ifthenelset &code) ;
425- virtual void typecheck_while (code_whilet &code) ;
426- virtual void typecheck_switch (code_switcht &code) ;
423+ void typecheck_code (codet &) override ;
424+ void typecheck_try_catch (codet &);
425+ void typecheck_member_initializer (codet &);
426+ void typecheck_decl (codet &) override ;
427+ void typecheck_block (codet &) override ;
428+ void typecheck_ifthenelse (code_ifthenelset &) override ;
429+ void typecheck_while (code_whilet &) override ;
430+ void typecheck_switch (code_switcht &) override ;
427431
428432 const struct_typet &this_struct_type ();
429433
430434 optionalt<codet>
431435 cpp_destructor (const source_locationt &source_location, const exprt &object);
432436
433437 // expressions
434- void explicit_typecast_ambiguity (exprt &expr);
435- void typecheck_expr_main (exprt &expr);
436- void typecheck_expr_member (exprt &expr);
437- void typecheck_expr_ptrmember (exprt &expr);
438- void typecheck_expr_throw (exprt &expr);
439- void typecheck_function_expr (exprt &expr,
440- const cpp_typecheck_fargst &fargs);
441- void typecheck_expr_cpp_name (exprt &expr,
442- const cpp_typecheck_fargst &fargs);
443- void typecheck_expr_member (exprt &expr,
444- const cpp_typecheck_fargst &fargs);
445- void typecheck_expr_ptrmember (exprt &expr,
446- const cpp_typecheck_fargst &fargs);
447- void typecheck_cast_expr (exprt &expr);
448- void typecheck_expr_trinary (if_exprt &expr);
449- void typecheck_expr_binary_arithmetic (exprt &expr);
450- void typecheck_expr_explicit_typecast (exprt &expr);
451- void typecheck_expr_explicit_constructor_call (exprt &expr);
452- void typecheck_expr_address_of (exprt &expr);
453- void typecheck_expr_dereference (exprt &expr);
454- void typecheck_expr_function_identifier (exprt &expr);
455- void typecheck_expr_reference_to (exprt &expr);
456- void typecheck_expr_this (exprt &expr);
457- void typecheck_expr_new (exprt &expr);
458- void typecheck_expr_sizeof (exprt &expr);
459- void typecheck_expr_delete (exprt &expr);
460- void typecheck_expr_side_effect (side_effect_exprt &expr);
461- void typecheck_side_effect_assignment (side_effect_exprt &expr);
462- void typecheck_side_effect_inc_dec (side_effect_exprt &expr);
463- void typecheck_expr_typecast (exprt &expr);
464- void typecheck_expr_index (exprt &expr);
465- void typecheck_expr_rel (binary_relation_exprt &expr);
466- void typecheck_expr_comma (exprt &expr);
467-
468- void typecheck_function_call_arguments (
469- side_effect_expr_function_callt &expr);
470-
471- bool operator_is_overloaded (exprt &expr);
472- bool overloadable (const exprt &expr);
473-
474- void add_implicit_dereference (exprt &expr);
438+ void explicit_typecast_ambiguity (exprt &);
439+ void typecheck_expr_main (exprt &) override ;
440+ void typecheck_expr_member (exprt &) override ;
441+ void typecheck_expr_ptrmember (exprt &) override ;
442+ void typecheck_expr_throw (exprt &);
443+ void typecheck_function_expr (exprt &, const cpp_typecheck_fargst &);
444+ void typecheck_expr_cpp_name (exprt &, const cpp_typecheck_fargst &);
445+ void typecheck_expr_member (exprt &, const cpp_typecheck_fargst &);
446+ void typecheck_expr_ptrmember (exprt &, const cpp_typecheck_fargst &);
447+ void typecheck_cast_expr (exprt &);
448+ void typecheck_expr_trinary (if_exprt &) override ;
449+ void typecheck_expr_binary_arithmetic (exprt &) override ;
450+ void typecheck_expr_explicit_typecast (exprt &);
451+ void typecheck_expr_explicit_constructor_call (exprt &);
452+ void typecheck_expr_address_of (exprt &) override ;
453+ void typecheck_expr_dereference (exprt &) override ;
454+ void typecheck_expr_function_identifier (exprt &) override ;
455+ void typecheck_expr_reference_to (exprt &);
456+ void typecheck_expr_this (exprt &);
457+ void typecheck_expr_new (exprt &);
458+ void typecheck_expr_sizeof (exprt &) override ;
459+ void typecheck_expr_delete (exprt &);
460+ void typecheck_expr_side_effect (side_effect_exprt &) override ;
461+ void typecheck_side_effect_assignment (side_effect_exprt &) override ;
462+ void typecheck_side_effect_inc_dec (side_effect_exprt &);
463+ void typecheck_expr_typecast (exprt &) override ;
464+ void typecheck_expr_index (exprt &) override ;
465+ void typecheck_expr_rel (binary_relation_exprt &) override ;
466+ void typecheck_expr_comma (exprt &) override ;
467+
468+ void
469+ typecheck_function_call_arguments (side_effect_expr_function_callt &) override ;
470+
471+ bool operator_is_overloaded (exprt &);
472+ bool overloadable (const exprt &);
473+
474+ void add_implicit_dereference (exprt &);
475475
476476 void typecheck_side_effect_function_call (
477- side_effect_expr_function_callt &expr) ;
477+ side_effect_expr_function_callt &) override ;
478478
479- void typecheck_method_application (
480- side_effect_expr_function_callt &expr);
479+ void typecheck_method_application (side_effect_expr_function_callt &);
481480
482481public:
483482 //
@@ -546,7 +545,7 @@ class cpp_typecheckt:public c_typecheck_baset
546545
547546 void reference_initializer (exprt &expr, const typet &type);
548547
549- virtual void implicit_typecast (exprt &expr, const typet &type);
548+ void implicit_typecast (exprt &expr, const typet &type) override ;
550549
551550 void get_bases (const struct_typet &type,
552551 std::set<irep_idt> &set_bases) const ;
@@ -586,7 +585,7 @@ class cpp_typecheckt:public c_typecheck_baset
586585 exprt &new_expr,
587586 bool check_constantness=true );
588587
589- bool contains_cpp_name (const exprt &expr );
588+ bool contains_cpp_name (const exprt &);
590589
591590private:
592591 typedef std::list<irep_idt> dynamic_initializationst;
0 commit comments