Skip to content

Commit 9c6c183

Browse files
committed
Mark further field sensitivity methods "nodiscard"
All methods are about their return values, not their side effects. This is to make sure we catch potential usage errors at compile time.
1 parent b393ce8 commit 9c6c183

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/goto-symex/field_sensitivity.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class field_sensitivityt
128128
apply(const namespacet &ns, goto_symex_statet &state, exprt expr, bool write)
129129
const;
130130
/// \copydoc apply(const namespacet&,goto_symex_statet&,exprt,bool) const
131+
NODISCARD
131132
exprt apply(
132133
const namespacet &ns,
133134
goto_symex_statet &state,
@@ -142,6 +143,7 @@ class field_sensitivityt
142143
/// \return Expanded expression; for example, for a \p ssa_expr of some struct
143144
/// type, a `struct_exprt` with each component now being an SSA expression
144145
/// is built.
146+
NODISCARD
145147
exprt get_fields(
146148
const namespacet &ns,
147149
goto_symex_statet &state,
@@ -172,6 +174,7 @@ class field_sensitivityt
172174
symex_targett &target,
173175
bool allow_pointer_unsoundness);
174176

177+
NODISCARD
175178
exprt simplify_opt(exprt e, const namespacet &ns) const;
176179
};
177180

0 commit comments

Comments
 (0)