Skip to content

Commit 85cc566

Browse files
Document find_symbols functions
The difference between some versions is not obvious
1 parent 132a438 commit 85cc566

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/util/find_symbols.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class typet;
2323

2424
typedef std::unordered_set<irep_idt> find_symbols_sett;
2525

26+
/// Add to the set \p dest the sub-expressions of \p src with id ID_symbol or
27+
/// ID_next_symbol
2628
void find_symbols(
2729
const exprt &src,
2830
find_symbols_sett &dest);
@@ -40,6 +42,8 @@ find_symbols_sett find_symbols(iteratort begin, iteratort end)
4042
return result;
4143
}
4244

45+
/// Add to the set \p dest the sub-expressions of \p src with id ID_symbol if
46+
/// \p current is true, and ID_next_symbol if \p next is true
4347
void find_symbols(
4448
const exprt &src,
4549
find_symbols_sett &dest,
@@ -52,12 +56,15 @@ void find_symbols(
5256
const exprt &src,
5357
std::set<exprt> &dest);
5458

59+
/// Find sub expressions with id ID_symbol
5560
void find_symbols(
5661
const exprt &src,
5762
std::set<symbol_exprt> &dest);
5863

64+
/// Find sub expressions with id ID_symbol
5965
std::set<symbol_exprt> find_symbols(const exprt &src);
6066

67+
/// \return true if one of the symbols in \p src is present in \p symbols
6168
bool has_symbol(
6269
const exprt &src,
6370
const find_symbols_sett &symbols);

0 commit comments

Comments
 (0)