Skip to content

Commit 1828a14

Browse files
committed
Reorder includes as per clang-format rules
1 parent 1d7373c commit 1828a14

19 files changed

+62
-70
lines changed

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// ANSI-C Language Type Checking
1111

12-
#include "c_typecheck_base.h"
13-
14-
#include <cassert>
15-
#include <sstream>
16-
1712
#include <util/arith_tools.h>
1813
#include <util/bitvector_expr.h>
1914
#include <util/c_types.h>
@@ -40,10 +35,14 @@ Author: Daniel Kroening, [email protected]
4035
#include "builtin_factory.h"
4136
#include "c_expr.h"
4237
#include "c_qualifiers.h"
38+
#include "c_typecheck_base.h"
4339
#include "expr2c.h"
4440
#include "padding.h"
4541
#include "type2name.h"
4642

43+
#include <cassert>
44+
#include <sstream>
45+
4746
void c_typecheck_baset::typecheck_expr(exprt &expr)
4847
{
4948
if(expr.id()==ID_already_typechecked)

src/ansi-c/c_typecheck_type.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// C++ Language Type Checking
1111

12-
#include "c_typecheck_base.h"
13-
14-
#include <cassert>
15-
#include <unordered_set>
16-
17-
#include <goto-programs/goto_instruction_code.h>
18-
1912
#include <util/arith_tools.h>
2013
#include <util/c_types.h>
2114
#include <util/config.h>
@@ -25,14 +18,20 @@ Author: Daniel Kroening, [email protected]
2518
#include <util/pointer_offset_size.h>
2619
#include <util/simplify_expr.h>
2720

21+
#include <goto-programs/goto_instruction_code.h>
22+
2823
#include "ansi_c_convert_type.h"
2924
#include "ansi_c_declaration.h"
3025
#include "c_qualifiers.h"
26+
#include "c_typecheck_base.h"
3127
#include "gcc_types.h"
3228
#include "padding.h"
3329
#include "type2name.h"
3430
#include "typedef_type.h"
3531

32+
#include <cassert>
33+
#include <unordered_set>
34+
3635
void c_typecheck_baset::typecheck_type(typet &type)
3736
{
3837
// we first convert, and then check

src/cpp/cpp_instantiate_template.cpp

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

18-
#include <cassert>
19-
2018
#include <util/arith_tools.h>
2119
#include <util/base_exceptions.h>
2220

2321
#include "cpp_type2name.h"
2422

23+
#include <cassert>
24+
2525
std::string cpp_typecheckt::template_suffix(
2626
const cpp_template_args_tct &template_args)
2727
{

src/cpp/cpp_typecheck.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "cpp_typecheck.h"
1313

14-
#include <algorithm>
15-
#include <cassert>
16-
1714
#include <util/pointer_expr.h>
1815
#include <util/source_location.h>
1916
#include <util/symbol.h>
@@ -24,6 +21,9 @@ Author: Daniel Kroening, [email protected]
2421
#include "cpp_util.h"
2522
#include "expr2cpp.h"
2623

24+
#include <algorithm>
25+
#include <cassert>
26+
2727
void cpp_typecheckt::convert(cpp_itemt &item)
2828
{
2929
if(item.is_declaration())

src/cpp/cpp_typecheck_code.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// C++ Language Type Checking
1111

12-
#include "cpp_typecheck.h"
13-
1412
#include <util/arith_tools.h>
1513
#include <util/bitvector_expr.h>
1614
#include <util/pointer_expr.h>
1715
#include <util/source_location.h>
1816

1917
#include "cpp_declarator_converter.h"
2018
#include "cpp_exception_id.h"
19+
#include "cpp_typecheck.h"
2120
#include "cpp_typecheck_fargs.h"
2221
#include "cpp_util.h"
2322

src/cpp/cpp_typecheck_compound_type.cpp

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

18-
#include <algorithm>
19-
#include <cassert>
20-
2118
#include <util/arith_tools.h>
22-
#include <util/std_types.h>
2319
#include <util/c_types.h>
20+
#include <util/std_types.h>
2421

2522
#include <ansi-c/c_qualifiers.h>
2623

@@ -29,6 +26,9 @@ Author: Daniel Kroening, [email protected]
2926
#include "cpp_type2name.h"
3027
#include "cpp_util.h"
3128

29+
#include <algorithm>
30+
#include <cassert>
31+
3232
bool cpp_typecheckt::has_const(const typet &type)
3333
{
3434
if(type.id()==ID_const)

src/cpp/cpp_typecheck_constructor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// C++ Language Type Checking
1111

12-
#include "cpp_typecheck.h"
13-
14-
#include <goto-programs/goto_instruction_code.h>
15-
1612
#include <util/arith_tools.h>
1713
#include <util/c_types.h>
1814
#include <util/pointer_expr.h>
1915
#include <util/std_code.h>
2016

17+
#include <goto-programs/goto_instruction_code.h>
18+
19+
#include "cpp_typecheck.h"
20+
2121
#include <cassert>
2222

2323
/// Generate code to copy the parent.

src/cpp/cpp_typecheck_conversions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Module: C++ Language Type Checking
99
/// \file
1010
/// C++ Language Type Checking
1111

12-
#include "cpp_typecheck.h"
13-
1412
#include <util/arith_tools.h>
1513
#include <util/c_types.h>
1614
#include <util/config.h>
@@ -21,6 +19,7 @@ Module: C++ Language Type Checking
2119

2220
#include <ansi-c/c_qualifiers.h>
2321

22+
#include "cpp_typecheck.h"
2423
#include "cpp_util.h"
2524

2625
#include <cassert>

src/cpp/cpp_typecheck_expr.cpp

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

18-
#include <cassert>
19-
2018
#include <util/arith_tools.h>
2119
#include <util/c_types.h>
2220
#include <util/config.h>
@@ -33,6 +31,8 @@ Author: Daniel Kroening, [email protected]
3331
#include "cpp_util.h"
3432
#include "expr2cpp.h"
3533

34+
#include <cassert>
35+
3636
bool cpp_typecheckt::find_parent(
3737
const symbolt &symb,
3838
const irep_idt &base_name,

src/cpp/cpp_typecheck_resolve.cpp

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

18-
#include <algorithm>
19-
#include <cassert>
20-
2118
#include <util/arith_tools.h>
2219
#include <util/c_types.h>
2320
#include <util/mathematical_types.h>
@@ -35,6 +32,9 @@ Author: Daniel Kroening, [email protected]
3532
#include "cpp_typecheck_fargs.h"
3633
#include "cpp_util.h"
3734

35+
#include <algorithm>
36+
#include <cassert>
37+
3838
cpp_typecheck_resolvet::cpp_typecheck_resolvet(cpp_typecheckt &_cpp_typecheck):
3939
cpp_typecheck(_cpp_typecheck),
4040
original_scope(nullptr) // set in resolve_scope()

src/cpp/cpp_typecheck_template.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// C++ Language Type Checking
1111

12-
#include "cpp_typecheck.h"
13-
1412
#include <util/base_exceptions.h>
1513
#include <util/simplify_expr.h>
1614

17-
#include "cpp_type2name.h"
18-
#include "cpp_declarator_converter.h"
19-
#include "cpp_template_type.h"
2015
#include "cpp_convert_type.h"
16+
#include "cpp_declarator_converter.h"
2117
#include "cpp_template_args.h"
18+
#include "cpp_template_type.h"
19+
#include "cpp_type2name.h"
20+
#include "cpp_typecheck.h"
2221

2322
#include <cassert>
2423

src/cpp/cpp_typecheck_type.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// C++ Language Type Checking
1111

12-
#include "cpp_typecheck.h"
13-
14-
#include <util/source_location.h>
15-
#include <util/simplify_expr.h>
1612
#include <util/c_types.h>
13+
#include <util/simplify_expr.h>
14+
#include <util/source_location.h>
1715

1816
#include <ansi-c/c_qualifiers.h>
1917

2018
#include "cpp_convert_type.h"
19+
#include "cpp_typecheck.h"
2120
#include "cpp_typecheck_fargs.h"
2221

2322
#include <cassert>

src/cpp/parse.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// C++ Language Parsing
1111

12-
#include "cpp_parser.h"
13-
14-
#include <cassert>
15-
#include <map>
16-
1712
#include <util/c_types.h>
1813
#include <util/std_code.h>
1914

2015
#include <ansi-c/ansi_c_y.tab.h>
2116
#include <ansi-c/merged_type.h>
2217

23-
#include "cpp_token_buffer.h"
24-
#include "cpp_member_spec.h"
2518
#include "cpp_enum_type.h"
19+
#include "cpp_member_spec.h"
20+
#include "cpp_parser.h"
21+
#include "cpp_token_buffer.h"
22+
23+
#include <cassert>
24+
#include <map>
2625

2726
#ifdef DEBUG
2827
#include <iostream>

src/goto-diff/change_impact.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Date: April 2016
1313

1414
#include "change_impact.h"
1515

16-
#include <cassert>
17-
#include <iostream>
18-
1916
#include <goto-programs/goto_model.h>
2017

2118
#include <analyses/dependence_graph.h>
2219

2320
#include "unified_diff.h"
2421

22+
#include <cassert>
23+
#include <iostream>
24+
2525
#if 0
2626
struct cfg_nodet
2727
{

src/goto-instrument/goto_program2code.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "goto_program2code.h"
1313

14-
#include <cassert>
15-
#include <sstream>
16-
1714
#include <util/arith_tools.h>
1815
#include <util/c_types.h>
1916
#include <util/expr_util.h>
@@ -22,6 +19,9 @@ Author: Daniel Kroening, [email protected]
2219
#include <util/prefix.h>
2320
#include <util/simplify_expr.h>
2421

22+
#include <cassert>
23+
#include <sstream>
24+
2525
void goto_program2codet::operator()()
2626
{
2727
// labels stored for cleanup

src/goto-instrument/k_induction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Author: Daniel Kroening, [email protected]
1111

1212
#include "k_induction.h"
1313

14-
#include <analyses/natural_loops.h>
15-
#include <analyses/local_may_alias.h>
16-
1714
#include <goto-programs/remove_skip.h>
1815

16+
#include <analyses/local_may_alias.h>
17+
#include <analyses/natural_loops.h>
18+
1919
#include "havoc_utils.h"
2020
#include "loop_utils.h"
2121
#include "unwind.h"

src/goto-instrument/unwind.cpp

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

19-
#include <cassert>
20-
2119
#include <util/expr_util.h>
2220
#include <util/std_expr.h>
2321

2422
#include <goto-programs/goto_functions.h>
2523

2624
#include "unwindset.h"
2725

26+
#include <cassert>
27+
2828
void goto_unwindt::copy_segment(
2929
const goto_programt::const_targett start,
3030
const goto_programt::const_targett end, // exclusive

src/goto-instrument/wmm/cycle_collection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Date: 2012
1111
/// \file
1212
/// collection of cycles in graph of abstract events
1313

14-
#include "event_graph.h"
15-
1614
#include <util/message.h>
1715

16+
#include "event_graph.h"
17+
1818
#include <cassert>
1919

2020
/// after the collection, eliminates the executions forbidden by an indirect

src/goto-instrument/wmm/goto2graph.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,19 @@ Date: 2012
1313

1414
#include "goto2graph.h"
1515

16-
#include <cassert>
17-
#include <vector>
18-
#include <string>
19-
#include <fstream>
20-
2116
#include <util/options.h>
2217
#include <util/prefix.h>
2318

24-
#include <linking/static_lifetime_init.h>
25-
2619
#include <goto-instrument/rw_set.h>
20+
#include <linking/static_lifetime_init.h>
2721

2822
#include "fence.h"
2923

24+
#include <cassert>
25+
#include <fstream>
26+
#include <string>
27+
#include <vector>
28+
3029
// #define PRINT_UNSAFES
3130

3231

0 commit comments

Comments
 (0)