Skip to content

Commit a6adb19

Browse files
Fix more catch std::string occurances
1 parent d115b4e commit a6adb19

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ int cbmc_parse_optionst::doit()
434434
return 6; // should contemplate EX_SOFTWARE from sysexits.h
435435
}
436436

437-
catch(const std::string error_msg)
437+
catch(const std::string &error_msg)
438438
{
439439
error() << error_msg << eom;
440440
return 6; // should contemplate EX_SOFTWARE from sysexits.h
@@ -586,7 +586,7 @@ bool cbmc_parse_optionst::set_properties()
586586
return true;
587587
}
588588

589-
catch(const std::string e)
589+
catch(const std::string &e)
590590
{
591591
error() << e << eom;
592592
return true;
@@ -648,7 +648,7 @@ int cbmc_parse_optionst::get_goto_program(
648648
return 6;
649649
}
650650

651-
catch(const std::string e)
651+
catch(const std::string &e)
652652
{
653653
error() << e << eom;
654654
return 6;
@@ -708,7 +708,7 @@ void cbmc_parse_optionst::preprocessing()
708708
error() << e << eom;
709709
}
710710

711-
catch(const std::string e)
711+
catch(const std::string &e)
712712
{
713713
error() << e << eom;
714714
}
@@ -840,7 +840,7 @@ bool cbmc_parse_optionst::process_goto_program(
840840
return true;
841841
}
842842

843-
catch(const std::string e)
843+
catch(const std::string &e)
844844
{
845845
error() << e << eom;
846846
return true;

src/clobber/clobber_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int clobber_parse_optionst::doit()
154154
return 0;
155155
}
156156

157-
catch(const std::string error_msg)
157+
catch(const std::string &error_msg)
158158
{
159159
error() << error_msg << messaget::eom;
160160
return 8;

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ bool goto_analyzer_parse_optionst::set_properties()
321321
return true;
322322
}
323323

324-
catch(const std::string e)
324+
catch(const std::string &e)
325325
{
326326
error() << e << eom;
327327
return true;
@@ -403,7 +403,7 @@ bool goto_analyzer_parse_optionst::process_goto_program(
403403
return true;
404404
}
405405

406-
catch(const std::string e)
406+
catch(const std::string &e)
407407
{
408408
error() << e << eom;
409409
return true;

src/goto-cc/goto_cc_mode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int goto_cc_modet::main(int argc, const char **argv)
8888
return EX_SOFTWARE;
8989
}
9090

91-
catch(const std::string e)
91+
catch(const std::string &e)
9292
{
9393
error() << e << eom;
9494
return EX_SOFTWARE;

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ bool goto_diff_parse_optionst::process_goto_program(
449449
return true;
450450
}
451451

452-
catch(const std::string e)
452+
catch(const std::string &e)
453453
{
454454
error() << e << eom;
455455
return true;

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ int goto_instrument_parse_optionst::doit()
813813
return 11;
814814
}
815815

816-
catch(const std::string e)
816+
catch(const std::string &e)
817817
{
818818
error() << e << eom;
819819
return 11;

src/goto-programs/initialize_goto_model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ bool initialize_goto_model(
184184
msg.error() << e << messaget::eom;
185185
return true;
186186
}
187-
catch(const std::string e)
187+
catch(const std::string &e)
188188
{
189189
msg.error() << e << messaget::eom;
190190
return true;

src/jbmc/jbmc_parse_options.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ int jbmc_parse_optionst::doit()
413413
return 6; // should contemplate EX_SOFTWARE from sysexits.h
414414
}
415415

416-
catch(const std::string error_msg)
416+
catch(const std::string &error_msg)
417417
{
418418
error() << error_msg << eom;
419419
return 6; // should contemplate EX_SOFTWARE from sysexits.h
@@ -546,7 +546,7 @@ bool jbmc_parse_optionst::set_properties()
546546
return true;
547547
}
548548

549-
catch(const std::string e)
549+
catch(const std::string &e)
550550
{
551551
error() << e << eom;
552552
return true;
@@ -608,7 +608,7 @@ int jbmc_parse_optionst::get_goto_program(
608608
return 6;
609609
}
610610

611-
catch(const std::string e)
611+
catch(const std::string &e)
612612
{
613613
error() << e << eom;
614614
return 6;
@@ -772,7 +772,7 @@ bool jbmc_parse_optionst::process_goto_program(
772772
return true;
773773
}
774774

775-
catch(const std::string e)
775+
catch(const std::string &e)
776776
{
777777
error() << e << eom;
778778
return true;

src/memory-models/mmcc_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ int mmcc_parse_optionst::doit()
6464
std::cerr << error << '\n';
6565
return 10;
6666
}
67-
catch(const std::string error)
67+
catch(const std::string &error)
6868
{
6969
std::cerr << error << '\n';
7070
return 10;

unit/testing-utils/catch.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7326,7 +7326,7 @@ namespace Catch {
73267326
catch( std::exception& ex ) {
73277327
return ex.what();
73287328
}
7329-
catch( std::string& msg ) {
7329+
catch(const std::string &msg) {
73307330
return msg;
73317331
}
73327332
catch( const char* msg ) {

0 commit comments

Comments
 (0)