Skip to content

Commit 4dcfcd6

Browse files
committed
Replace quoting via " in messages by quote_begin and quote_end
This is in the spirit of diffblue#4875, but now using quote_begin/quote_end stream modifiers.
1 parent bfe38e5 commit 4dcfcd6

File tree

9 files changed

+44
-36
lines changed

9 files changed

+44
-36
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
CORE
22
Lambdatest
33
--verbosity 10 --show-goto-functions --function Lambdatest.main --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar ../../../lib/java-models-library/target/cprover-api.jar`
4-
lambda function reference lambda\$new\$0 in class \"Lambdatest\"
5-
lambda function reference lambda\$new\$1 in class \"Lambdatest\"
6-
lambda function reference lambda\$captureReference\$2 in class \"Lambdatest\"
7-
lambda function reference lambda\$captureInt\$3 in class \"Lambdatest\"
8-
lambda function reference lambda\$captureThisPrimitive\$4 in class \"Lambdatest\"
9-
lambda function reference lambda\$captureThisReference\$5 in class \"Lambdatest\"
10-
lambda function reference lambda\$captureAndCall\$6 in class \"Lambdatest\"
11-
lambda function reference lambda\$captureAndAssign\$7 in class \"Lambdatest\"
12-
lambda function reference lambda\$static\$0 in class \"B\"
4+
lambda function reference lambda\$new\$0 in class 'Lambdatest'
5+
lambda function reference lambda\$new\$1 in class 'Lambdatest'
6+
lambda function reference lambda\$captureReference\$2 in class 'Lambdatest'
7+
lambda function reference lambda\$captureInt\$3 in class 'Lambdatest'
8+
lambda function reference lambda\$captureThisPrimitive\$4 in class 'Lambdatest'
9+
lambda function reference lambda\$captureThisReference\$5 in class 'Lambdatest'
10+
lambda function reference lambda\$captureAndCall\$6 in class 'Lambdatest'
11+
lambda function reference lambda\$captureAndAssign\$7 in class 'Lambdatest'
12+
lambda function reference lambda\$static\$0 in class 'B'
1313
^EXIT=0$
1414
^SIGNAL=0$

jbmc/regression/jbmc/lambda2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CORE symex-driven-lazy-loading-expected-failure
22
org.symphonyoss.symphony.clients.model.SymStream
33
--show-goto-functions --verbosity 10
4-
lambda function reference toSymUser in class "org\.symphonyoss\.symphony\.clients\.model\.SymStream"
4+
lambda function reference toSymUser in class 'org\.symphonyoss\.symphony\.clients\.model\.SymStream'
55
^EXIT=0$
66
^SIGNAL=0$
77
--

jbmc/src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,13 +2089,11 @@ void java_bytecode_parsert::read_bootstrapmethods_entry()
20892089

20902090
log.debug()
20912091
<< "lambda function reference "
2092-
<< id2string(
2093-
lambda_method_handle->get_method_descriptor().base_method_name())
2094-
<< " in class \"" << parse_tree.parsed_class.name << "\""
2095-
<< "\n interface type is "
2096-
<< id2string(pool_entry(interface_type_argument.ref1).s)
2097-
<< "\n method type is "
2098-
<< id2string(pool_entry(method_type_argument.ref1).s) << messaget::eom;
2092+
<< lambda_method_handle->get_method_descriptor().base_method_name()
2093+
<< " in class " << messaget::quote_begin << parse_tree.parsed_class.name
2094+
<< messaget::quote_end << "\n interface type is "
2095+
<< pool_entry(interface_type_argument.ref1).s << "\n method type is "
2096+
<< pool_entry(method_type_argument.ref1).s << messaget::eom;
20992097
parse_tree.parsed_class.add_method_handle(
21002098
bootstrap_method_index, *lambda_method_handle);
21012099
}

regression/cbmc/incomplete-structs/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
CORE new-smt-backend
22
typesmain.c
33
types1.c types2.c types3.c
4-
warning: pointer parameter types differ between declaration and definition "bar"
5-
warning: pointer parameter types differ between declaration and definition "foo"
4+
warning: pointer parameter types differ between declaration and definition 'bar'
5+
warning: pointer parameter types differ between declaration and definition 'foo'
66
^VERIFICATION SUCCESSFUL$
77
^EXIT=0$
88
^SIGNAL=0$

src/cpp/cpp_typecheck_function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ void cpp_typecheckt::convert_parameter(
5656
if(symbol_table.move(symbol, new_symbol))
5757
{
5858
error().source_location=symbol.location;
59-
error() << "cpp_typecheckt::convert_parameter: symbol_table.move(\""
60-
<< symbol.name << "\") failed" << eom;
59+
error() << "cpp_typecheckt::convert_parameter: symbol_table.move("
60+
<< quote_begin << symbol.name << quote_end << ") failed" << eom;
6161
throw 0;
6262
}
6363

src/goto-analyzer/taint_parser.cpp

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ bool taint_parser(
6464
else
6565
{
6666
messaget message(message_handler);
67-
message.error() << "taint rule must have \"kind\" which is "
68-
"\"source\" or \"sink\" or \"sanitizer\""
69-
<< messaget::eom;
67+
message.error() << "taint rule must have " << messaget::quote_begin
68+
<< "kind" << messaget::quote_end << " which is "
69+
<< messaget::quote_begin << "source"
70+
<< messaget::quote_end << " or " << messaget::quote_begin
71+
<< "sink" << messaget::quote_end << " or "
72+
<< messaget::quote_begin << "sanitizer"
73+
<< messaget::quote_end << messaget::eom;
7074
return true;
7175
}
7276

@@ -75,8 +79,8 @@ bool taint_parser(
7579
if(function.empty())
7680
{
7781
messaget message(message_handler);
78-
message.error() << "taint rule must have \"function\""
79-
<< messaget::eom;
82+
message.error() << "taint rule must have " << messaget::quote_begin
83+
<< "function" << messaget::quote_end << messaget::eom;
8084
return true;
8185
}
8286
else
@@ -101,10 +105,13 @@ bool taint_parser(
101105
else
102106
{
103107
messaget message(message_handler);
104-
message.error() << "taint rule must have \"where\""
105-
<< " which is \"return_value\" or \"this\" "
106-
<< "or \"parameter1\"..."
107-
<< messaget::eom;
108+
message.error() << "taint rule must have " << messaget::quote_begin
109+
<< "where" << messaget::quote_end << " which is "
110+
<< messaget::quote_begin << "return_value"
111+
<< messaget::quote_end << " or " << messaget::quote_begin
112+
<< "this" << messaget::quote_end << " or "
113+
<< messaget::quote_begin << "parameter1"
114+
<< messaget::quote_end << "..." << messaget::eom;
108115
return true;
109116
}
110117

src/linking/linking.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ void linkingt::link_warning(
504504
messaget log{message_handler};
505505
log.warning().source_location = new_symbol.location;
506506

507-
log.warning() << "warning: " << msg << " \"" << old_symbol.display_name()
508-
<< "\"" << '\n';
507+
log.warning() << "warning: " << msg << " " << messaget::quote_begin
508+
<< old_symbol.display_name() << messaget::quote_end << '\n';
509509
log.warning() << "old definition in module " << old_symbol.module << " "
510510
<< old_symbol.location << '\n'
511511
<< type_to_string_verbose(old_symbol) << '\n';
@@ -1154,7 +1154,8 @@ void linkingt::duplicate_object_symbol(
11541154
log.warning().source_location = new_symbol.location;
11551155

11561156
log.warning() << "warning: conflicting initializers for"
1157-
<< " variable \"" << old_symbol.name << "\"\n";
1157+
<< " variable " << messaget::quote_begin
1158+
<< old_symbol.name << messaget::quote_end << '\n';
11581159
log.warning() << "using old value in module " << old_symbol.module
11591160
<< " " << old_symbol.value.find_source_location() << '\n'
11601161
<< expr_to_string(old_symbol.name, tmp_old) << '\n';

src/solvers/smt2/smt2_dec.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ decision_proceduret::resultt smt2_dect::read_result(std::istream &in)
204204
const auto &message = id2string(parsed.get_sub()[1].id());
205205
messaget log{message_handler};
206206
log.error() << "SMT2 solver returned error message:\n"
207-
<< "\t\"" << message << "\"" << messaget::eom;
207+
<< "\t" << messaget::quote_begin << message
208+
<< messaget::quote_end << messaget::eom;
208209
return decision_proceduret::resultt::D_ERROR;
209210
}
210211
}

src/solvers/strings/string_refinement.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,9 @@ static exprt get_char_array_and_concretize(
10961096
const auto array_expr =
10971097
expr_try_dynamic_cast<array_exprt>(*concretized_array))
10981098
{
1099-
stream << std::string(4, ' ') << "- as_string: \""
1100-
<< string_of_array(*array_expr) << "\"\n";
1099+
stream << std::string(4, ' ')
1100+
<< "- as_string: " << messaget::quote_begin
1101+
<< string_of_array(*array_expr) << messaget::quote_end << '\n';
11011102
}
11021103
else
11031104
stream << std::string(2, ' ') << "- warning: not an array"

0 commit comments

Comments
 (0)