Skip to content

Commit 3cb53d7

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 e1d7d9a commit 3cb53d7

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
@@ -73,7 +73,8 @@ void c_typecheck_baset::typecheck_symbol(symbolt &symbol)
7373
// versions of Visual Studio insist to use this in their C library, and
7474
// GCC just warns as well.
7575
warning().source_location = symbol.value.find_source_location();
76-
warning() << "`extern' symbol should not have an initializer" << eom;
76+
warning() << quote_begin << "extern" << quote_end
77+
<< " symbol should not have an initializer" << eom;
7778
}
7879
}
7980
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
@@ -520,7 +520,8 @@ void c_typecheck_baset::typecheck_switch_case(code_switch_caset &code)
520520
if(!case_is_allowed)
521521
{
522522
error().source_location = code.source_location();
523-
error() << "did not expect `case' here" << eom;
523+
error() << "did not expect " << quote_begin << "case" << quote_end
524+
<< " here" << eom;
524525
throw 0;
525526
}
526527

@@ -537,7 +538,8 @@ void c_typecheck_baset::typecheck_gcc_switch_case_range(
537538
if(!case_is_allowed)
538539
{
539540
error().source_location = code.source_location();
540-
error() << "did not expect `case' here" << eom;
541+
error() << "did not expect " << quote_begin << "case" << quote_end
542+
<< " here" << eom;
541543
throw 0;
542544
}
543545

src/ansi-c/c_typecheck_expr.cpp

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

src/cpp/cpp_instantiate_template.cpp

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

src/cpp/cpp_typecheck_expr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,8 @@ void cpp_typecheckt::typecheck_expr_this(exprt &expr)
977977
if(cpp_scopes.current_scope().class_identifier.empty())
978978
{
979979
error().source_location=expr.find_source_location();
980-
error() << "`this' is not allowed here" << eom;
980+
error() << quote_begin << "this" << quote_end << " is not allowed here"
981+
<< eom;
981982
throw 0;
982983
}
983984

src/goto-cc/compile.cpp

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

665665
if(cmdline.isset("export-function-local-symbols"))
666666
{
667-
log.warning()
668-
<< "The `--export-function-local-symbols` flag is deprecated. "
669-
"Please use `--export-file-local-symbols` instead."
670-
<< messaget::eom;
667+
log.warning() << "The " << messaget::quote_begin
668+
<< "--export-function-local-symbols" << messaget::quote_end
669+
<< " flag is deprecated. "
670+
"Please use "
671+
<< messaget::quote_begin << "--export-file-local-symbols"
672+
<< messaget::quote_end << " instead." << messaget::eom;
671673
}
672674
}
673675

0 commit comments

Comments
 (0)