Skip to content

Commit 45c395d

Browse files
committed
Replace use of ` in messages by quote_begin (and ' by quote_end)
This continues the work of #4875, but now using quote_begin/quote_end stream modifiers.
1 parent 4cce3a2 commit 45c395d

File tree

11 files changed

+33
-22
lines changed

11 files changed

+33
-22
lines changed

jbmc/regression/jbmc/classpath-invalid/test_jar_warning.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Test
33
--classpath ./NotHere.jar
44
^EXIT=6$
55
^SIGNAL=0$
6-
Warning: failed to access JAR file `./NotHere.jar'
6+
Warning: failed to access JAR file './NotHere.jar'
77
Error: Could not find or load main class Test
88
--
99
--

jbmc/regression/jbmc/classpath-invalid/test_path_warning.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Test
33
--classpath `../../../../scripts/format_classpath.sh ./NotHere .`
44
^EXIT=0$
55
^SIGNAL=0$
6-
Warning: failed to access directory `./NotHere'
6+
Warning: failed to access directory './NotHere'
77
--
88
--
99
Note: 'java' does not emit such a warning.

jbmc/src/java_bytecode/java_class_loader_base.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ void java_class_loader_baset::add_classpath_entry(
3434
}
3535
else
3636
{
37-
log.warning() << "Warning: failed to access JAR file `" << path << "'"
37+
log.warning() << "Warning: failed to access JAR file "
38+
<< messaget::quote_begin << path << messaget::quote_end
3839
<< messaget::eom;
3940
}
4041
}
@@ -47,7 +48,8 @@ void java_class_loader_baset::add_classpath_entry(
4748
}
4849
else
4950
{
50-
log.warning() << "Warning: failed to access directory `" << path << "'"
51+
log.warning() << "Warning: failed to access directory "
52+
<< messaget::quote_begin << path << messaget::quote_end
5153
<< messaget::eom;
5254
}
5355
}

regression/goto-cc-file-local/old-flag-name/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ final-link assertion-check old-flag
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7-
^The `--export-function-local-symbols` flag is deprecated. Please use `--export-file-local-symbols` instead.$
7+
^The '--export-function-local-symbols' flag is deprecated. Please use '--export-file-local-symbols' instead.$
88
--
99
^warning: ignoring
1010
^\*\*\*\* WARNING: no body for function

src/ansi-c/c_typecheck_base.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ void c_typecheck_baset::typecheck_symbol(symbolt &symbol)
7777
// versions of Visual Studio insist to use this in their C library, and
7878
// GCC just warns as well.
7979
warning().source_location = symbol.value.find_source_location();
80-
warning() << "`extern' symbol should not have an initializer" << eom;
80+
warning() << quote_begin << "extern" << quote_end
81+
<< " symbol should not have an initializer" << eom;
8182
}
8283
}
8384
else if(!is_function && symbol.value.id()==ID_code)

src/ansi-c/c_typecheck_code.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,8 @@ void c_typecheck_baset::typecheck_switch_case(code_switch_caset &code)
551551
if(!case_is_allowed)
552552
{
553553
error().source_location = code.source_location();
554-
error() << "did not expect `case' here" << eom;
554+
error() << "did not expect " << quote_begin << "case" << quote_end
555+
<< " here" << eom;
555556
throw 0;
556557
}
557558

@@ -568,7 +569,8 @@ void c_typecheck_baset::typecheck_gcc_switch_case_range(
568569
if(!case_is_allowed)
569570
{
570571
error().source_location = code.source_location();
571-
error() << "did not expect `case' here" << eom;
572+
error() << "did not expect " << quote_begin << "case" << quote_end
573+
<< " here" << eom;
572574
throw 0;
573575
}
574576

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,8 @@ void c_typecheck_baset::typecheck_expr_operands(exprt &expr)
777777
if(s_it == symbol_table.symbols.end())
778778
{
779779
error().source_location = expr.source_location();
780-
error() << "failed to find bound symbol `" << identifier
781-
<< "' in symbol table" << eom;
780+
error() << "failed to find bound symbol " << quote_begin << identifier
781+
<< quote_end << " in symbol table" << eom;
782782
throw 0;
783783
}
784784

src/cpp/cpp_instantiate_template.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ const symbolt &cpp_typecheckt::instantiate_template(
486486
if(new_decl.member_spec().is_virtual())
487487
{
488488
error().source_location=new_decl.source_location();
489-
error() << "invalid use of `virtual' in template declaration"
490-
<< eom;
489+
error() << "invalid use of " << quote_begin << "virtual" << quote_end
490+
<< " in template declaration" << eom;
491491
throw 0;
492492
}
493493

src/cpp/cpp_typecheck_expr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,8 @@ void cpp_typecheckt::typecheck_expr_this(exprt &expr)
985985
if(cpp_scopes.current_scope().class_identifier.empty())
986986
{
987987
error().source_location=expr.find_source_location();
988-
error() << "`this' is not allowed here" << eom;
988+
error() << quote_begin << "this" << quote_end << " is not allowed here"
989+
<< eom;
989990
throw 0;
990991
}
991992

src/goto-cc/compile.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,12 @@ compilet::compilet(cmdlinet &_cmdline, message_handlert &mh, bool Werror)
661661

662662
if(cmdline.isset("export-function-local-symbols"))
663663
{
664-
log.warning()
665-
<< "The `--export-function-local-symbols` flag is deprecated. "
666-
"Please use `--export-file-local-symbols` instead."
667-
<< messaget::eom;
664+
log.warning() << "The " << messaget::quote_begin
665+
<< "--export-function-local-symbols" << messaget::quote_end
666+
<< " flag is deprecated. "
667+
"Please use "
668+
<< messaget::quote_begin << "--export-file-local-symbols"
669+
<< messaget::quote_end << " instead." << messaget::eom;
668670
}
669671
}
670672

0 commit comments

Comments
 (0)