Skip to content

Commit de5367b

Browse files
committed
Clang format PR updates.
1 parent f285357 commit de5367b

9 files changed

+32
-36
lines changed

src/cbmc/all_properties.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ void bmc_all_propertiest::report(const cover_goalst &cover_goals)
214214
for(const auto &g : goal_map)
215215
{
216216
json_stream_objectt &result = result_array.push_back_stream_object();
217-
result["property"]=json_stringt(g.first);
218-
result["description"]=json_stringt(g.second.description);
217+
result["property"] = json_stringt(g.first);
218+
result["description"] = json_stringt(g.second.description);
219219
result["status"]=json_stringt(g.second.status_string());
220220

221221
if(g.second.status==goalt::statust::FAILURE)

src/cbmc/bmc.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ void bmct::error_trace()
7474
json_stream_objectt &json_result =
7575
status().json_stream().push_back_stream_object();
7676
const goto_trace_stept &step=goto_trace.steps.back();
77-
json_result["property"]=
77+
json_result["property"] =
7878
json_stringt(step.pc->source_location.get_property_id());
79-
json_result["description"]=
79+
json_result["description"] =
8080
json_stringt(step.pc->source_location.get_comment());
8181
json_result["status"]=json_stringt("failed");
8282
json_stream_arrayt &json_trace =

src/cbmc/bmc_cover.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ bool bmc_covert::operator()()
382382
if(step.is_input())
383383
{
384384
json_objectt json_input;
385-
json_input["id"]=json_stringt(step.io_id);
385+
json_input["id"] = json_stringt(step.io_id);
386386
if(step.io_args.size()==1)
387387
json_input["value"]=
388388
json(step.io_args.front(), bmc.ns, ID_unknown);

src/goto-analyzer/static_analyzer.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,9 @@ void static_analyzert::json_report(const std::string &file_name)
153153
else
154154
j["status"]=json_stringt("UNKNOWN");
155155

156-
j["file"]=json_stringt(i_it->source_location.get_file());
156+
j["file"] = json_stringt(i_it->source_location.get_file());
157157
j["line"]=json_numbert(id2string(i_it->source_location.get_line()));
158-
j["description"]=json_stringt(
159-
i_it->source_location.get_comment());
158+
j["description"] = json_stringt(i_it->source_location.get_comment());
160159
}
161160
}
162161

src/goto-analyzer/taint_analysis.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,9 @@ bool taint_analysist::operator()(
351351
if(use_json)
352352
{
353353
json_objectt json;
354-
json["bugClass"]=
354+
json["bugClass"] =
355355
json_stringt(i_it->source_location.get_property_class());
356-
json["file"]=
357-
json_stringt(i_it->source_location.get_file());
356+
json["file"] = json_stringt(i_it->source_location.get_file());
358357
json["line"]=
359358
json_numbert(id2string(i_it->source_location.get_line()));
360359
json_result.array.push_back(json);

src/goto-analyzer/unreachable_instructions.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static void add_to_json(
127127
DATA_INVARIANT(end_function->is_end_function(),
128128
"The last instruction in a goto-program must be END_FUNCTION");
129129

130-
entry["function"]=json_stringt(end_function->function);
130+
entry["function"] = json_stringt(end_function->function);
131131
entry["fileName"]=
132132
json_stringt(concat_dir_file(
133133
id2string(end_function->source_location.get_working_directory()),
@@ -261,7 +261,7 @@ static void json_output_function(
261261
{
262262
json_objectt &entry=dest.push_back().make_object();
263263

264-
entry["function"]=json_stringt(function);
264+
entry["function"] = json_stringt(function);
265265
entry["file name"]=
266266
json_stringt(concat_dir_file(
267267
id2string(first_location.get_working_directory()),

src/goto-programs/show_goto_functions_json.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ json_objectt show_goto_functions_jsont::convert(
4848

4949
json_objectt &json_function=
5050
json_functions.push_back(jsont()).make_object();
51-
json_function["name"]=json_stringt(function_name);
51+
json_function["name"] = json_stringt(function_name);
5252
json_function["isBodyAvailable"]=
5353
jsont::json_boolean(function.body_available());
5454
bool is_internal=

src/goto-programs/show_properties.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ void convert_properties_json(
131131

132132
json_objectt &json_property=
133133
json_properties.push_back(jsont()).make_object();
134-
json_property["name"]=json_stringt(property_id);
135-
json_property["class"]=json_stringt(property_class);
134+
json_property["name"] = json_stringt(property_id);
135+
json_property["class"] = json_stringt(property_class);
136136
if(!source_location.get_basic_block_covered_lines().empty())
137-
json_property["coveredLines"]=
137+
json_property["coveredLines"] =
138138
json_stringt(source_location.get_basic_block_covered_lines());
139139
json_property["sourceLocation"]=json(source_location);
140-
json_property["description"]=json_stringt(description);
140+
json_property["description"] = json_stringt(description);
141141
json_property["expression"]=
142142
json_stringt(from_expr(ns, identifier, ins.guard));
143143
}

src/util/json_expr.cpp

+16-18
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,22 @@ json_objectt json(const source_locationt &location)
8585
json_objectt result;
8686

8787
if(!location.get_working_directory().empty())
88-
result["workingDirectory"]=
89-
json_stringt(location.get_working_directory());
88+
result["workingDirectory"] = json_stringt(location.get_working_directory());
9089

9190
if(!location.get_file().empty())
92-
result["file"]=json_stringt(location.get_file());
91+
result["file"] = json_stringt(location.get_file());
9392

9493
if(!location.get_line().empty())
95-
result["line"]=json_stringt(location.get_line());
94+
result["line"] = json_stringt(location.get_line());
9695

9796
if(!location.get_column().empty())
98-
result["column"]=json_stringt(location.get_column());
97+
result["column"] = json_stringt(location.get_column());
9998

10099
if(!location.get_function().empty())
101-
result["function"]=json_stringt(location.get_function());
100+
result["function"] = json_stringt(location.get_function());
102101

103102
if(!location.get_java_bytecode_index().empty())
104-
result["bytecodeIndex"]=
105-
json_stringt(location.get_java_bytecode_index());
103+
result["bytecodeIndex"] = json_stringt(location.get_java_bytecode_index());
106104

107105
return result;
108106
}
@@ -193,7 +191,7 @@ json_objectt json(
193191
for(const auto &component : components)
194192
{
195193
json_objectt &e=members.push_back().make_object();
196-
e["name"]=json_stringt(component.get_name());
194+
e["name"] = json_stringt(component.get_name());
197195
e["type"]=json(component.type(), ns, mode);
198196
}
199197
}
@@ -206,7 +204,7 @@ json_objectt json(
206204
for(const auto &component : components)
207205
{
208206
json_objectt &e=members.push_back().make_object();
209-
e["name"]=json_stringt(component.get_name());
207+
e["name"] = json_stringt(component.get_name());
210208
e["type"]=json(component.type(), ns, mode);
211209
}
212210
}
@@ -263,15 +261,15 @@ json_objectt json(
263261
std::size_t width=to_bitvector_type(type).get_width();
264262

265263
result["name"]=json_stringt("integer");
266-
result["binary"]=json_stringt(constant_expr.get_value());
264+
result["binary"] = json_stringt(constant_expr.get_value());
267265
result["width"]=json_numbert(std::to_string(width));
268266
result["type"]=json_stringt(type_string);
269267
result["data"]=json_stringt(value_string);
270268
}
271269
else if(type.id()==ID_c_enum)
272270
{
273271
result["name"]=json_stringt("integer");
274-
result["binary"]=json_stringt(constant_expr.get_value());
272+
result["binary"] = json_stringt(constant_expr.get_value());
275273
result["width"]=json_numbert(type.subtype().get_string(ID_width));
276274
result["type"]=json_stringt("enum");
277275
result["data"]=json_stringt(value_string);
@@ -286,21 +284,21 @@ json_objectt json(
286284
else if(type.id()==ID_bv)
287285
{
288286
result["name"]=json_stringt("bitvector");
289-
result["binary"]=json_stringt(constant_expr.get_value());
287+
result["binary"] = json_stringt(constant_expr.get_value());
290288
}
291289
else if(type.id()==ID_fixedbv)
292290
{
293291
result["name"]=json_stringt("fixed");
294292
result["width"]=json_numbert(type.get_string(ID_width));
295-
result["binary"]=json_stringt(constant_expr.get_value());
293+
result["binary"] = json_stringt(constant_expr.get_value());
296294
result["data"]=
297295
json_stringt(fixedbvt(to_constant_expr(expr)).to_ansi_c_string());
298296
}
299297
else if(type.id()==ID_floatbv)
300298
{
301299
result["name"]=json_stringt("float");
302300
result["width"]=json_numbert(type.get_string(ID_width));
303-
result["binary"]=json_stringt(constant_expr.get_value());
301+
result["binary"] = json_stringt(constant_expr.get_value());
304302
result["data"]=
305303
json_stringt(ieee_floatt(to_constant_expr(expr)).to_ansi_c_string());
306304
}
@@ -341,7 +339,7 @@ json_objectt json(
341339
else if(type.id()==ID_string)
342340
{
343341
result["name"]=json_stringt("string");
344-
result["data"]=json_stringt(constant_expr.get_value());
342+
result["data"] = json_stringt(constant_expr.get_value());
345343
}
346344
else
347345
{
@@ -381,7 +379,7 @@ json_objectt json(
381379
{
382380
json_objectt &e=members.push_back().make_object();
383381
e["value"]=json(expr.operands()[m], ns, mode);
384-
e["name"]=json_stringt(components[m].get_name());
382+
e["name"] = json_stringt(components[m].get_name());
385383
}
386384
}
387385
}
@@ -392,7 +390,7 @@ json_objectt json(
392390
const union_exprt &union_expr=to_union_expr(expr);
393391
json_objectt &e=result["member"].make_object();
394392
e["value"]=json(union_expr.op(), ns, mode);
395-
e["name"]=json_stringt(union_expr.get_component_name());
393+
e["name"] = json_stringt(union_expr.get_component_name());
396394
}
397395
else
398396
result["name"]=json_stringt("unknown");

0 commit comments

Comments
 (0)