Skip to content

Commit 9822b27

Browse files
committed
Add missing #include <cassert>
cassert is implicitly provided via nonstd/optional, but this will change with the move to std::optional. The even better fix would be the replacement of all uses of assert(...) in these files, but this is a larger endeavour.
1 parent 4e21f29 commit 9822b27

21 files changed

+32
-0
lines changed

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "c_typecheck_base.h"
1313

14+
#include <cassert>
1415
#include <sstream>
1516

1617
#include <util/arith_tools.h>

src/ansi-c/c_typecheck_initializer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Author: Daniel Kroening, [email protected]
2323
#include "c_typecheck_base.h"
2424
#include "type2name.h"
2525

26+
#include <cassert>
27+
2628
void c_typecheck_baset::do_initializer(
2729
exprt &initializer,
2830
const typet &type,

src/ansi-c/c_typecheck_type.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "c_typecheck_base.h"
1313

14+
#include <cassert>
1415
#include <unordered_set>
1516

1617
#include <goto-programs/goto_instruction_code.h>

src/cpp/cpp_instantiate_template.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Author: Daniel Kroening, [email protected]
1515
#include <iostream>
1616
#endif
1717

18+
#include <cassert>
19+
1820
#include <util/arith_tools.h>
1921
#include <util/base_exceptions.h>
2022

src/cpp/cpp_typecheck.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, [email protected]
1212
#include "cpp_typecheck.h"
1313

1414
#include <algorithm>
15+
#include <cassert>
1516

1617
#include <util/pointer_expr.h>
1718
#include <util/source_location.h>

src/cpp/cpp_typecheck_code.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Author: Daniel Kroening, [email protected]
2121
#include "cpp_typecheck_fargs.h"
2222
#include "cpp_util.h"
2323

24+
#include <cassert>
25+
2426
void cpp_typecheckt::typecheck_code(codet &code)
2527
{
2628
const irep_idt &statement=code.get_statement();

src/cpp/cpp_typecheck_compound_type.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Author: Daniel Kroening, [email protected]
1616
#endif
1717

1818
#include <algorithm>
19+
#include <cassert>
1920

2021
#include <util/arith_tools.h>
2122
#include <util/std_types.h>

src/cpp/cpp_typecheck_constructor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Author: Daniel Kroening, [email protected]
1818
#include <util/pointer_expr.h>
1919
#include <util/std_code.h>
2020

21+
#include <cassert>
22+
2123
/// Generate code to copy the parent.
2224
/// \param source_location: location for generated code
2325
/// \param parent_base_name: base name of typechecked parent

src/cpp/cpp_typecheck_conversions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Module: C++ Language Type Checking
2323

2424
#include "cpp_util.h"
2525

26+
#include <cassert>
27+
2628
/// Lvalue-to-rvalue conversion
2729
///
2830
/// An lvalue (3.10) of a non-function, non-array type T can be

src/cpp/cpp_typecheck_expr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Author: Daniel Kroening, [email protected]
1515
#include <iostream>
1616
#endif
1717

18+
#include <cassert>
19+
1820
#include <util/arith_tools.h>
1921
#include <util/c_types.h>
2022
#include <util/config.h>

0 commit comments

Comments
 (0)