Skip to content

Commit 91cf22d

Browse files
committed
Add optional source location parameter to get_nondet_bool()
1 parent 43e920d commit 91cf22d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/util/nondet_bool.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ Author: Chris Smowton, [email protected]
1515
#include "std_expr.h"
1616
#include "std_types.h"
1717

18-
/// \par parameters: Desired type (C_bool or plain bool)
18+
/// \param type desired type (C_bool or plain bool)
19+
/// \param source_location source location
1920
/// \return nondet expr of that type
20-
inline exprt get_nondet_bool(const typet &type)
21+
inline exprt get_nondet_bool(
22+
const typet &type,
23+
const source_locationt &source_location = source_locationt())
2124
{
2225
// We force this to 0 and 1 and won't consider
2326
// other values.
2427
return typecast_exprt(
25-
side_effect_expr_nondett(bool_typet(), source_locationt()), type);
28+
side_effect_expr_nondett(bool_typet(), source_location), type);
2629
}
2730

2831
#endif // CPROVER_UTIL_NONDET_BOOL_H

0 commit comments

Comments
 (0)