Skip to content

Commit

Permalink
Merge pull request #2012 from hzeller/20230918-add-missing-includes
Browse files Browse the repository at this point in the history
Fix missing includes of standard headers.
  • Loading branch information
hzeller authored Sep 18, 2023
2 parents ccbe173 + 365e8fb commit 470e0b9
Show file tree
Hide file tree
Showing 204 changed files with 408 additions and 24 deletions.
38 changes: 19 additions & 19 deletions .github/bin/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,30 +132,30 @@ ExpectedFailCount[lint:ibex]=14
ExpectedFailCount[project:ibex]=193
ExpectedFailCount[preprocessor:ibex]=368

ExpectedFailCount[syntax:opentitan]=36
ExpectedFailCount[lint:opentitan]=36
ExpectedFailCount[project:opentitan]=733
ExpectedFailCount[preprocessor:opentitan]=1957
ExpectedFailCount[syntax:opentitan]=35
ExpectedFailCount[lint:opentitan]=35
ExpectedFailCount[project:opentitan]=739
ExpectedFailCount[preprocessor:opentitan]=1978

ExpectedFailCount[syntax:sv-tests]=77
ExpectedFailCount[lint:sv-tests]=76
ExpectedFailCount[project:sv-tests]=187
ExpectedFailCount[preprocessor:sv-tests]=139

ExpectedFailCount[syntax:caliptra-rtl]=19
ExpectedFailCount[lint:caliptra-rtl]=19
ExpectedFailCount[project:caliptra-rtl]=315
ExpectedFailCount[preprocessor:caliptra-rtl]=698
ExpectedFailCount[syntax:caliptra-rtl]=21
ExpectedFailCount[lint:caliptra-rtl]=21
ExpectedFailCount[project:caliptra-rtl]=324
ExpectedFailCount[preprocessor:caliptra-rtl]=758

ExpectedFailCount[syntax:Cores-VeeR-EH2]=2
ExpectedFailCount[lint:Cores-VeeR-EH2]=2
ExpectedFailCount[project:Cores-VeeR-EH2]=42
ExpectedFailCount[preprocessor:Cores-VeeR-EH2]=43

ExpectedFailCount[syntax:cva6]=4
ExpectedFailCount[lint:cva6]=4
ExpectedFailCount[project:cva6]=69
ExpectedFailCount[preprocessor:cva6]=65
ExpectedFailCount[syntax:cva6]=5
ExpectedFailCount[lint:cva6]=5
ExpectedFailCount[project:cva6]=76
ExpectedFailCount[preprocessor:cva6]=98

ExpectedFailCount[syntax:uvm]=1
ExpectedFailCount[lint:uvm]=1
Expand All @@ -175,10 +175,10 @@ ExpectedFailCount[lint:XilinxUnisimLibrary]=4
ExpectedFailCount[project:XilinxUnisimLibrary]=22
ExpectedFailCount[preprocessor:XilinxUnisimLibrary]=96

ExpectedFailCount[syntax:black-parrot]=156
ExpectedFailCount[lint:black-parrot]=156
ExpectedFailCount[project:black-parrot]=171
ExpectedFailCount[preprocessor:black-parrot]=172
ExpectedFailCount[syntax:black-parrot]=155
ExpectedFailCount[lint:black-parrot]=155
ExpectedFailCount[project:black-parrot]=170
ExpectedFailCount[preprocessor:black-parrot]=171

ExpectedFailCount[syntax:ivtest]=166
ExpectedFailCount[lint:ivtest]=166
Expand All @@ -190,8 +190,8 @@ ExpectedFailCount[lint:nontrivial-mips]=2
ExpectedFailCount[project:nontrivial-mips]=81
ExpectedFailCount[preprocessor:nontrivial-mips]=78

ExpectedFailCount[project:axi]=73
ExpectedFailCount[preprocessor:axi]=70
ExpectedFailCount[project:axi]=74
ExpectedFailCount[preprocessor:axi]=71

ExpectedFailCount[syntax:rsd]=5
ExpectedFailCount[lint:rsd]=5
Expand All @@ -207,7 +207,7 @@ ExpectedFailCount[preprocessor:serv]=1
ExpectedFailCount[syntax:basejump_stl]=466
ExpectedFailCount[lint:basejump_stl]=466
ExpectedFailCount[project:basejump_stl]=577
ExpectedFailCount[preprocessor:basejump_stl]=610
ExpectedFailCount[preprocessor:basejump_stl]=611

# Ideally, we expect all tools to process all files with a zero exit code.
# However, that is not always the case, so we document the current
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,10 @@ jobs:
run: bazel info

- name: Run Tests
run: bazel test --noshow_progress --test_output=errors //...
run: bazel test --keep_going --noshow_progress --test_output=errors //...

- name: Build Verible Binaries
run: bazel build --noshow_progress -c opt :install-binaries
run: bazel build --keep_going --noshow_progress -c opt :install-binaries

- name: Prepare release
run: |
Expand Down
2 changes: 2 additions & 0 deletions common/analysis/citation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "common/analysis/citation.h"

#include <string>

#include "absl/strings/str_cat.h"

namespace verible {
Expand Down
3 changes: 3 additions & 0 deletions common/analysis/command_file_lexer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

#include "common/analysis/command_file_lexer.h"

#include <algorithm>
#include <vector>

#include "absl/strings/string_view.h"
#include "common/analysis/lint_waiver.h"
#include "common/lexer/token_stream_adapter.h"
Expand Down
2 changes: 2 additions & 0 deletions common/analysis/command_file_lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
# undef yyFlexLexer // this is how FlexLexer.h says to do things
# define yyFlexLexer veribleCommandFileFlexLexer
# include <FlexLexer.h>

#include <vector>
#endif
// clang-format on

Expand Down
1 change: 1 addition & 0 deletions common/analysis/file_analyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "common/analysis/file_analyzer.h"

#include <algorithm>
#include <ostream>
#include <sstream> // IWYU pragma: keep // for ostringstream
#include <string>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions common/analysis/file_analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

#include <functional>
#include <iosfwd>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "absl/status/status.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/line_linter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <cstddef>
#include <memory>
#include <set>
#include <vector>

#include "absl/strings/string_view.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/lint_rule_status.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <iostream>
#include <iterator>
#include <ostream>
#include <set>
#include <string>
#include <vector>

Expand Down
3 changes: 3 additions & 0 deletions common/analysis/lint_rule_status_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

#include "common/analysis/lint_rule_status.h"

#include <iostream>
#include <set>
#include <sstream> // IWYU pragma: keep // for ostringstream
#include <string>
#include <utility>
#include <vector>

#include "absl/strings/str_split.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/lint_waiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <map>
#include <regex> // NOLINT
#include <set>
#include <string>
#include <utility>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions common/analysis/lint_waiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <map>
#include <regex> // NOLINT
#include <set>
#include <string>
#include <utility>
#include <vector>

#include "absl/strings/string_view.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/lint_waiver_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/analysis/lint_waiver.h"

#include <cstddef>
#include <set>
#include <vector>

#include "common/strings/line_column_map.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/linter_test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <iostream>
#include <iterator>
#include <set>
#include <vector>

#include "absl/strings/string_view.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/linter_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <memory>
#include <set>
#include <sstream>
#include <string>

#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/linter_test_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "common/analysis/linter_test_utils.h"

#include <set>
#include <sstream>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions common/analysis/syntax_tree_linter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/analysis/syntax_tree_linter.h"

#include <memory>
#include <set>
#include <vector>

#include "common/analysis/lint_rule_status.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/text_structure_linter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/analysis/text_structure_linter.h"

#include <memory>
#include <set>
#include <vector>

#include "absl/strings/match.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/token_stream_linter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/analysis/token_stream_linter.h"

#include <memory>
#include <set>
#include <vector>

#include "absl/strings/string_view.h"
Expand Down
7 changes: 7 additions & 0 deletions common/analysis/violation_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

#include "common/analysis/violation_handler.h"

#include <iostream>
#include <ostream>
#include <set>
#include <sstream>
#include <string>
#include <vector>

#include "absl/status/status.h"
#include "common/strings/diff.h"
#include "common/util/file_util.h"
Expand Down
6 changes: 6 additions & 0 deletions common/formatting/align.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
#include "common/formatting/align.h"

#include <algorithm>
#include <cstddef>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

#include "absl/strings/str_join.h"
Expand Down
2 changes: 2 additions & 0 deletions common/formatting/align.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#define VERIBLE_COMMON_FORMATTING_ALIGN_H_

#include <functional>
#include <ostream>
#include <string>
#include <vector>

#include "absl/strings/string_view.h"
Expand Down
3 changes: 3 additions & 0 deletions common/formatting/align_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

#include "common/formatting/align.h"

#include <algorithm>
#include <iterator>
#include <ostream>
#include <sstream>
#include <string>
#include <utility>
Expand Down
3 changes: 3 additions & 0 deletions common/formatting/format_token.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@

#include "common/formatting/format_token.h"

#include <algorithm>
#include <iostream>
#include <sstream> // pragma IWYU: keep // for ostringstream
#include <string>
#include <utility>
#include <vector>

#include "absl/base/macros.h"
#include "absl/strings/string_view.h"
Expand Down
4 changes: 4 additions & 0 deletions common/formatting/layout_optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
#include "common/formatting/layout_optimizer.h"

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <ios>
#include <limits>
#include <ostream>
#include <utility>

#include "absl/container/fixed_array.h"
#include "common/formatting/basic_format_style.h"
Expand Down
3 changes: 3 additions & 0 deletions common/formatting/layout_optimizer_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
#define VERIBLE_VERILOG_FORMATTING_LAYOUT_OPTIMIZER_INTERNAL_H_

#include <algorithm>
#include <cstddef>
#include <iterator>
#include <ostream>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

#include "absl/container/fixed_array.h"
Expand Down
3 changes: 3 additions & 0 deletions common/formatting/layout_optimizer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
//
#include "common/formatting/layout_optimizer.h"

#include <algorithm>
#include <limits>
#include <ostream>
#include <sstream>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions common/formatting/line_wrap_searcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/formatting/line_wrap_searcher.h"

#include <memory>
#include <ostream>
#include <queue>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions common/formatting/line_wrap_searcher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "common/formatting/line_wrap_searcher.h"

#include <sstream>
#include <vector>

#include "absl/strings/match.h"
Expand Down
1 change: 1 addition & 0 deletions common/formatting/state_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <cstddef>
#include <iterator>
#include <memory>
#include <ostream>
#include <stack>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions common/formatting/state_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/formatting/state_node.h"

#include <memory>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
Expand Down
4 changes: 4 additions & 0 deletions common/formatting/token_partition_tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@

#include "common/formatting/token_partition_tree.h"

#include <algorithm>
#include <cstddef>
#include <iterator>
#include <memory>
#include <ostream>
#include <utility>
#include <vector>

#include "common/formatting/format_token.h"
Expand Down
1 change: 1 addition & 0 deletions common/formatting/tree_annotator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "common/formatting/tree_annotator.h"

#include <iterator>
#include <vector>

#include "common/text/concrete_syntax_leaf.h"
Expand Down
2 changes: 2 additions & 0 deletions common/formatting/tree_annotator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "common/formatting/tree_annotator.h"

#include <vector>

#include "common/formatting/format_token.h"
#include "common/text/constants.h"
#include "common/text/token_info.h"
Expand Down
Loading

0 comments on commit 470e0b9

Please sign in to comment.