Skip to content

Commit 6168049

Browse files
author
owen-jones-diffblue
authored
Merge pull request diffblue#454 from diffblue/owen-jones-diffblue/fix-comment-formatting
Replace /// with // for non-doxygen comments
2 parents afd55ac + e998c87 commit 6168049

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed

cbmc/src/pointer-analysis/value_set.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,8 @@ void value_sett::get_value_set_rec(
501501
it1!=object_map.end();
502502
it1++)
503503
{
504-
/// Do not take a reference to object_numbering's storage as we may call
505-
/// object_numbering.number(), which may reallocate it.
504+
// Do not take a reference to object_numbering's storage as we may call
505+
// object_numbering.number(), which may reallocate it.
506506
const exprt object=object_numbering[it1->first];
507507
get_value_set_rec(object, dest, suffix, original_type, ns);
508508
}
@@ -526,8 +526,8 @@ void value_sett::get_value_set_rec(
526526
it!=object_map.end();
527527
it++)
528528
{
529-
/// Do not take a reference to object_numbering's storage as we may call
530-
/// object_numbering.number(), which may reallocate it.
529+
// Do not take a reference to object_numbering's storage as we may call
530+
// object_numbering.number(), which may reallocate it.
531531
const exprt object=object_numbering[it->first];
532532
get_value_set_rec(object, dest, suffix, original_type, ns);
533533
}
@@ -1443,8 +1443,8 @@ void value_sett::assign_rec(
14431443
it!=reference_set.read().end();
14441444
it++)
14451445
{
1446-
/// Do not take a reference to object_numbering's storage as we may call
1447-
/// object_numbering.number(), which may reallocate it.
1446+
// Do not take a reference to object_numbering's storage as we may call
1447+
// object_numbering.number(), which may reallocate it.
14481448
const exprt object=object_numbering[it->first];
14491449

14501450
if(object.id()!=ID_unknown)

src/pointer-analysis/local_value_set.cpp

+18-18
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ void local_value_sett::get_value_set_rec(
379379
function,
380380
std::to_string(location_number),
381381
declared_on_type);
382-
/// Create external value set for the type and suffix
382+
// Create external value set for the type and suffix
383383
external_value_set_exprt new_ext_set = extinit;
384384
new_ext_set.set_per_field_access_path(new_entry);
385385
new_ext_set.type() = field_type.subtype();
@@ -391,16 +391,16 @@ void local_value_sett::get_value_set_rec(
391391
entryt entry(
392392
basename, access_path_suffix, declared_on_type, new_ext_set);
393393

394-
/// If there is already an entry for this EVS then find it, otherwise
395-
/// create a new entry for it
396-
/// TODO: figure out how to do this sort of on-demand-insert
397-
/// without such ugly const hacking:
394+
// If there is already an entry for this EVS then find it, otherwise
395+
// create a new entry for it
396+
// TODO: figure out how to do this sort of on-demand-insert
397+
// without such ugly const hacking:
398398
auto insert_result =
399399
(const_cast<local_value_sett *>(this))
400400
->values.insert(std::make_pair(irep_idt(entryname), entry));
401401

402-
/// If we've just created a new entry then populate the object map
403-
/// with an initializer EVS
402+
// If we've just created a new entry then populate the object map
403+
// with an initializer EVS
404404
if(insert_result.second)
405405
insert(
406406
insert_result.first->second.object_map,
@@ -416,7 +416,7 @@ void local_value_sett::get_value_set_rec(
416416
function,
417417
std::to_string(location_number),
418418
declared_on_type);
419-
/// Create external value set for the precise access path
419+
// Create external value set for the precise access path
420420
external_value_set_exprt new_ext_set = extinit;
421421
bool loop_found = new_ext_set.extend_precise_access_path(new_entry);
422422

@@ -433,8 +433,8 @@ void local_value_sett::get_value_set_rec(
433433

434434
const auto it = values.find(entryname);
435435

436-
/// If an entry already exists then use the values in the object
437-
/// map, otherwise do not create an entry and use the EVS
436+
// If an entry already exists then use the values in the object
437+
// map, otherwise do not create an entry and use the EVS
438438
if(it != values.end())
439439
make_union(dest, it->second.object_map);
440440
else
@@ -535,10 +535,10 @@ void local_value_sett::demote_most_recent_dynamic_objects(
535535
to_dynamic_object_expr(entry.structured_lhs);
536536
expr_any_allocation.set_recency(false);
537537

538-
/// The second and third arguments to get_entry() are only used for
539-
/// field_sensitive(), and that will always returns true without using
540-
/// them because name_any_allocation starts with the prefix for a
541-
/// dynamic object, so we can use an empty type and namespace.
538+
// The second and third arguments to get_entry() are only used for
539+
// field_sensitive(), and that will always returns true without using
540+
// them because name_any_allocation starts with the prefix for a
541+
// dynamic object, so we can use an empty type and namespace.
542542
entryt &entry_any_allocation = get_entry(
543543
entryt(name_any_allocation, entry.suffix, expr_any_allocation),
544544
nil_typet(),
@@ -739,10 +739,10 @@ void local_value_sett::assign_rec(
739739

740740
if(weak_write)
741741
{
742-
/// If we are doing a weak write, but this precise EVS did not
743-
/// already exist in the domain, we also put a copy of the precise
744-
/// EVS with is_initializer set to true in its value-set to
745-
/// represent that it might have its original value
742+
// If we are doing a weak write, but this precise EVS did not
743+
// already exist in the domain, we also put a copy of the precise
744+
// EVS with is_initializer set to true in its value-set to
745+
// represent that it might have its original value
746746
if(insert_result.second)
747747
insert(lhs_entry.object_map, new_ext_set.as_initializer());
748748

src/pointer-analysis/local_value_set_analysis.cpp

+18-18
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ static exprt get_root_object_expr(
189189

190190
if(root_object_symbol.is_static_lifetime)
191191
{
192-
/// Global variable. Read its actual incoming value set:
192+
// Global variable. Read its actual incoming value set:
193193
return root_object_symbol.symbol_expr();
194194
}
195195
else
196196
{
197-
/// Parameter. Get the value-set for the actual argument:
197+
// Parameter. Get the value-set for the actual argument:
198198
size_t paramidx = (size_t)-1;
199199
const auto &params = to_code_type(function_symbol.type).parameters();
200200
for(size_t i = 0, ilim = params.size(); i != ilim; ++i)
@@ -233,11 +233,11 @@ static void follow_access_path(
233233
++it)
234234
{
235235
std::string access_path_label = id2string(it->label());
236-
/// If expr is of type Z and Z <: Y <: X <: ... <: A and we are
237-
/// accessing a field of A then access_path_label will be
238-
/// ".@Y.@X.@W. ... [email protected]_name". For an array dereference, the access
239-
/// path will have the label "[]", and the access path entry before
240-
/// it will have a label ending in ".data".
236+
// If expr is of type Z and Z <: Y <: X <: ... <: A and we are
237+
// accessing a field of A then access_path_label will be
238+
// ".@Y.@X.@W. ... [email protected]_name". For an array dereference, the access
239+
// path will have the label "[]", and the access path entry before
240+
// it will have a label ending in ".data".
241241
DATA_INVARIANT(
242242
access_path_label.size() >= 2,
243243
"Access path label must have length at least 2");
@@ -274,9 +274,9 @@ static void follow_access_path(
274274
return;
275275
}
276276

277-
/// We should just have a field name. It should not start with a
278-
/// superclass identifier (".@superclass_name") or the special fields
279-
/// ".@class_identifier" or ".@lock" on java.lang.Object.
277+
// We should just have a field name. It should not start with a
278+
// superclass identifier (".@superclass_name") or the special fields
279+
// ".@class_identifier" or ".@lock" on java.lang.Object.
280280
DATA_INVARIANT(
281281
access_path_label[0] == '.' && access_path_label[1] != '@',
282282
"the label of an access path entry is malformed");
@@ -454,7 +454,7 @@ void local_value_set_analysist::transform_function_stub(
454454
}
455455
else if(has_prefix(evse_label, PRECISE_EVS_PREFIX))
456456
{
457-
/// Precise EVS
457+
// Precise EVS
458458
PRECONDITION(!evse.access_path_entries().empty());
459459
exprt precise_access_path_expr =
460460
get_expr_from_precise_evs(evse, function_symbol, fcall, ns, *this);
@@ -546,7 +546,7 @@ void local_value_set_analysist::transform_function_stub(
546546
exprt precise_access_path_expr = get_expr_from_precise_evs(
547547
precise_evs, function_symbol, fcall, ns, *this);
548548

549-
/// Weak write - can we do strong writes?
549+
// Weak write - can we do strong writes?
550550
bool add_to_sets = true;
551551
const auto &rhs_expr = assignment.second;
552552
auto demoted_rhs_values = pre_call_rhs_value_sets.at(assignment.second);
@@ -643,8 +643,8 @@ bool local_value_set_analysist::is_singular(const std::set<exprt> &values)
643643
void local_value_set_analysist::operator()(const goto_programt &goto_program)
644644
{
645645
initialize(goto_program);
646-
/// This is a dummy variable that will always be empty because we handle
647-
/// function calls specially
646+
// This is a dummy variable that will always be empty because we handle
647+
// function calls specially
648648
goto_functionst goto_functions;
649649

650650
while(true)
@@ -672,10 +672,10 @@ bool local_value_set_analysist::add_precise_evs_initializers(
672672

673673
bool any_change = false;
674674

675-
/// For each precise EVS that was written somewhere in this function, we
676-
/// insert a copy of the EVS with is_initializer set to true to the value-set
677-
/// at the first instruction, to detect on a subsequent fixedpoint analysis
678-
/// whether there are paths where it goes unaltered.
675+
// For each precise EVS that was written somewhere in this function, we
676+
// insert a copy of the EVS with is_initializer set to true to the value-set
677+
// at the first instruction, to detect on a subsequent fixedpoint analysis
678+
// whether there are paths where it goes unaltered.
679679

680680
for(locationt loc = goto_program.instructions.begin();
681681
loc != goto_program.instructions.end();

0 commit comments

Comments
 (0)