Skip to content

Commit 8ec1890

Browse files
author
thk123
committed
Replace assert with appropriate invariant
1 parent d7e4a35 commit 8ec1890

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/goto-programs/remove_function_pointers.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Author: Daniel Kroening, kroening@kroening.com
2020
#include <util/base_type.h>
2121
#include <ansi-c/c_qualifiers.h>
2222
#include <analyses/does_remove_const.h>
23+
#include <util/invariant.h>
2324

2425
#include <util/c_types.h>
2526

@@ -300,7 +301,7 @@ void remove_function_pointerst::remove_function_pointer(
300301
// however, it is possible for found_functions to be true and functions
301302
// to be empty (this happens if the pointer can only resolve to the null
302303
// pointer)
303-
assert(found_functions || functions.empty());
304+
CHECK_RETURN(found_functions || functions.empty());
304305

305306
if(functions.size()==1)
306307
{

0 commit comments

Comments
 (0)