Skip to content

Commit 3e8c548

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 605babb commit 3e8c548

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
@@ -33,7 +33,8 @@ void java_class_loader_baset::add_classpath_entry(
3333
}
3434
else
3535
{
36-
log.warning() << "Warning: failed to access JAR file `" << path << "'"
36+
log.warning() << "Warning: failed to access JAR file "
37+
<< messaget::quote_begin << path << messaget::quote_end
3738
<< messaget::eom;
3839
}
3940
}
@@ -46,7 +47,8 @@ void java_class_loader_baset::add_classpath_entry(
4647
}
4748
else
4849
{
49-
log.warning() << "Warning: failed to access directory `" << path << "'"
50+
log.warning() << "Warning: failed to access directory "
51+
<< messaget::quote_begin << path << messaget::quote_end
5052
<< messaget::eom;
5153
}
5254
}

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
@@ -75,7 +75,8 @@ void c_typecheck_baset::typecheck_symbol(symbolt &symbol)
7575
// versions of Visual Studio insist to use this in their C library, and
7676
// GCC just warns as well.
7777
warning().source_location = symbol.value.find_source_location();
78-
warning() << "`extern' symbol should not have an initializer" << eom;
78+
warning() << quote_begin << "extern" << quote_end
79+
<< " symbol should not have an initializer" << eom;
7980
}
8081
}
8182
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
@@ -521,7 +521,8 @@ void c_typecheck_baset::typecheck_switch_case(code_switch_caset &code)
521521
if(!case_is_allowed)
522522
{
523523
error().source_location = code.source_location();
524-
error() << "did not expect `case' here" << eom;
524+
error() << "did not expect " << quote_begin << "case" << quote_end
525+
<< " here" << eom;
525526
throw 0;
526527
}
527528

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

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,8 @@ void c_typecheck_baset::typecheck_expr_operands(exprt &expr)
750750
if(s_it == symbol_table.symbols.end())
751751
{
752752
error().source_location = expr.source_location();
753-
error() << "failed to find bound symbol `" << identifier
754-
<< "' in symbol table" << eom;
753+
error() << "failed to find bound symbol " << quote_begin << identifier
754+
<< quote_end << " in symbol table" << eom;
755755
throw 0;
756756
}
757757

src/cpp/cpp_instantiate_template.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ const symbolt &cpp_typecheckt::instantiate_template(
488488
if(new_decl.member_spec().is_virtual())
489489
{
490490
error().source_location=new_decl.source_location();
491-
error() << "invalid use of `virtual' in template declaration"
492-
<< eom;
491+
error() << "invalid use of " << quote_begin << "virtual" << quote_end
492+
<< " in template declaration" << eom;
493493
throw 0;
494494
}
495495

src/cpp/cpp_typecheck_expr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,8 @@ void cpp_typecheckt::typecheck_expr_this(exprt &expr)
974974
if(cpp_scopes.current_scope().class_identifier.empty())
975975
{
976976
error().source_location=expr.find_source_location();
977-
error() << "`this' is not allowed here" << eom;
977+
error() << quote_begin << "this" << quote_end << " is not allowed here"
978+
<< eom;
978979
throw 0;
979980
}
980981

src/goto-cc/compile.cpp

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

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

0 commit comments

Comments
 (0)