Skip to content

Commit 7540c49

Browse files
committed
Address include-what-you-use warnings
More recent versions of iwyu identified new unused headers. (But struggled to cope with `class C { ... } c;` so that was rewritten as `class C { ... }; C c;`.)
1 parent 30bd93d commit 7540c49

14 files changed

+6
-19
lines changed

src/analyses/global_may_alias.h

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Author: Daniel Kroening, [email protected]
1313
#ifndef CPROVER_ANALYSES_GLOBAL_MAY_ALIAS_H
1414
#define CPROVER_ANALYSES_GLOBAL_MAY_ALIAS_H
1515

16-
#include <util/numbering.h>
1716
#include <util/threeval.h>
1817
#include <util/union_find.h>
1918

src/ansi-c/ansi_c_language.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ Author: Daniel Kroening, [email protected]
2323
#include "expr2c.h"
2424
#include "type2name.h"
2525

26-
#include <fstream>
27-
2826
std::set<std::string> ansi_c_languaget::extensions() const
2927
{
3028
return { "c", "i" };

src/goto-checker/solver_factory.h

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Author: Daniel Kroening, Peter Schrammel
1515
#include <solvers/flattening/boolbv.h>
1616
#include <solvers/smt2/smt2_dec.h>
1717

18+
#include <fstream>
1819
#include <memory>
1920

2021
class cmdlinet;

src/goto-programs/goto_program.h

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Author: Daniel Kroening, [email protected]
1717

1818
#include "goto_instruction_code.h"
1919

20-
#include <iosfwd>
2120
#include <limits>
2221
#include <list>
2322
#include <set>

src/goto-programs/goto_trace.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Author: Daniel Kroening
2727
#include <ansi-c/printf_formatter.h>
2828
#include <langapi/language_util.h>
2929

30-
#include <ostream>
31-
3230
static std::optional<symbol_exprt> get_object_rec(const exprt &src)
3331
{
3432
if(src.id()==ID_symbol)

src/goto-programs/show_goto_functions_json.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Author: Thomas Kiley
1616

1717
#include "goto_functions.h"
1818

19-
#include <iostream>
20-
2119
/// For outputting the GOTO program in a readable JSON format.
2220
/// \param _list_only: output only list of functions, but not their bodies
2321
show_goto_functions_jsont::show_goto_functions_jsont(bool _list_only)

src/goto-programs/show_goto_functions_xml.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Author: Thomas Kiley
1616

1717
#include "goto_functions.h"
1818

19-
#include <iostream>
20-
2119
/// For outputting the GOTO program in a readable xml format.
2220
/// \param _list_only: output only list of functions, but not their bodies
2321
show_goto_functions_xmlt::show_goto_functions_xmlt(bool _list_only)

src/goto-programs/validate_goto_model.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Date: Oct 2018
1010
#ifndef CPROVER_GOTO_PROGRAMS_VALIDATE_GOTO_MODEL_H
1111
#define CPROVER_GOTO_PROGRAMS_VALIDATE_GOTO_MODEL_H
1212

13-
#include <util/validation_mode.h>
13+
#include <util/validation_mode.h> // IWYU pragma: keep
1414

1515
class goto_model_validation_optionst final
1616
{

src/goto-symex/goto_symex_state.h

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Author: Daniel Kroening, [email protected]
2626
#include "shadow_memory_state.h"
2727

2828
#include <functional>
29-
#include <memory>
3029

3130
class incremental_dirtyt;
3231
class symex_target_equationt;

src/pointer-analysis/value_set.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Author: Daniel Kroening, [email protected]
2727
#include <util/symbol.h>
2828
#include <util/xml.h>
2929

30-
#include <ostream>
31-
3230
#ifdef DEBUG
3331
#include <iostream>
3432
#include <util/format_expr.h>

src/solvers/sat/dimacs_cnf.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Author: Daniel Kroening, [email protected]
1212
#include <util/invariant.h>
1313
#include <util/magic.h>
1414

15-
#include <iostream>
16-
1715
dimacs_cnft::dimacs_cnft(message_handlert &message_handler)
1816
: cnf_clause_listt(message_handler), break_lines(false)
1917
{

src/solvers/smt2/smt2_dec.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Author: Daniel Kroening, [email protected]
1515

1616
#include "smt2irep.h"
1717

18+
#include <fstream>
19+
1820
std::string smt2_dect::decision_procedure_text() const
1921
{
2022
// clang-format off

src/solvers/smt2/smt2_dec.h

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Author: Daniel Kroening, [email protected]
1212

1313
#include "smt2_conv.h"
1414

15-
#include <fstream>
16-
1715
class message_handlert;
1816

1917
class smt2_stringstreamt

src/solvers/smt2_incremental/smt2_incremental_decision_procedure.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ class smt2_incremental_decision_proceduret final
143143
{
144144
return next_id++;
145145
}
146-
} handle_sequence, array_sequence, index_sequence, padding_sequence;
146+
};
147+
sequencet handle_sequence, array_sequence, index_sequence, padding_sequence;
147148
/// When the `handle(exprt)` member function is called, the decision procedure
148149
/// commands the SMT solver to define a new function corresponding to the
149150
/// given expression. The mapping of the expressions to the function

0 commit comments

Comments
 (0)