Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 121 ClangTidyBuild findings: #1034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

#include "src/backends/policy_engine/souffle/datalog_lowering_visitor.h"

#include <algorithm>
#include <string>
#include <utility>
#include <vector>

#include "src/common/utils/fold.h"
#include "src/ir/attributes/attribute.h"
#include "src/ir/attributes/float_attribute.h"
Expand Down
2 changes: 2 additions & 0 deletions src/backends/policy_engine/souffle/datalog_lowering_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef SRC_BACKENDS_POLICY_ENGINE_SOUFFLE_DATALOG_LOWERING_VISITOR_H_
#define SRC_BACKENDS_POLICY_ENGINE_SOUFFLE_DATALOG_LOWERING_VISITOR_H_

#include <utility>

#include "src/backends/policy_engine/souffle/raksha_datalog_facts.h"
#include "src/common/logging/logging.h"
#include "src/common/utils/types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#include "datalog_lowering_visitor.h"

#include <functional>
#include <memory>
#include <vector>

#include "absl/strings/string_view.h"
#include "src/common/testing/gtest.h"
#include "src/ir/attributes/float_attribute.h"
Expand Down
3 changes: 3 additions & 0 deletions src/backends/policy_engine/souffle/raksha_datalog_facts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#include <cstring>
#include <filesystem>
#include <fstream>
#include <string>
#include <system_error>
#include <vector>

#include "src/backends/policy_engine/souffle/utils.h"
#include "src/common/logging/logging.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "src/backends/policy_engine/souffle/raksha_datalog_facts.h"

#include <filesystem>
#include <string>
#include <utility>
#include <vector>

#include "src/common/logging/logging.h"
#include "src/common/testing/gtest.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <iostream>
#include <optional>
#include <sstream>
#include <string>

#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
Expand Down
3 changes: 3 additions & 0 deletions src/backends/policy_engine/souffle/souffle_policy_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#include "src/backends/policy_engine/souffle/souffle_policy_checker.h"

#include <cstdlib>
#include <memory>
#include <optional>
#include <string>

#include "souffle/SouffleInterface.h"
#include "src/backends/policy_engine/policy.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "src/backends/policy_engine/souffle/souffle_policy_checker.h"

#include <limits>
#include <memory>

#include "src/backends/policy_engine/dp_parameter_policy.h"
#include "src/backends/policy_engine/sql_policy_rule_policy.h"
Expand Down
3 changes: 3 additions & 0 deletions src/backends/policy_engine/souffle/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

#include "src/backends/policy_engine/souffle/utils.h"

#include <cstring>
#include <fstream>
#include <ios>
#include <string>

#include "absl/strings/str_format.h"

Expand Down
2 changes: 2 additions & 0 deletions src/backends/policy_engine/souffle/utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

#include <cstdio>
#include <fstream>
#include <ios>
#include <sstream>
#include <string>

#include "absl/status/statusor.h"
#include "src/common/logging/logging.h"
Expand Down
3 changes: 3 additions & 0 deletions src/frontends/sql/decode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#include "src/frontends/sql/decode.h"

#include <optional>
#include <string>

#include "src/frontends/sql/decoder_context.h"
#include "src/frontends/sql/ops/sql_output_op.h"
#include "src/ir/value.h"
Expand Down
2 changes: 2 additions & 0 deletions src/frontends/sql/decode_expr_death_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//----------------------------------------------------------------------------

#include <string>

#include "google/protobuf/text_format.h"
#include "absl/strings/string_view.h"
#include "src/common/testing/gtest.h"
Expand Down
2 changes: 2 additions & 0 deletions src/frontends/sql/decode_literal_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//----------------------------------------------------------------------------

#include <optional>

#include "absl/strings/string_view.h"
#include "src/common/testing/gtest.h"
#include "src/frontends/sql/decoder_context.h"
Expand Down
5 changes: 4 additions & 1 deletion src/frontends/sql/decode_merge_operation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//----------------------------------------------------------------------------
#include <optional>
#include <string>
#include <tuple>
#include <vector>

#include "absl/strings/string_view.h"
#include "google/protobuf/text_format.h"
#include "absl/strings/string_view.h"
#include "src/common/testing/gtest.h"
#include "src/frontends/sql/decode.h"
#include "src/frontends/sql/decoder_context.h"
Expand Down
2 changes: 2 additions & 0 deletions src/frontends/sql/decode_source_column_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//----------------------------------------------------------------------------

#include <optional>

#include "absl/strings/string_view.h"
#include "src/common/testing/gtest.h"
#include "src/frontends/sql/decoder_context.h"
Expand Down
4 changes: 4 additions & 0 deletions src/frontends/sql/decode_sql_policy_rules.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "src/frontends/sql/decode_sql_policy_rules.h"

#include <string>
#include <utility>
#include <vector>

#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "src/analysis/taint/inference_rules.h"
Expand Down
3 changes: 3 additions & 0 deletions src/frontends/sql/decode_sql_policy_rules_test.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "src/frontends/sql/decode_sql_policy_rules.h"

#include <cstdint>
#include <string>
#include <tuple>
#include <vector>

#include "google/protobuf/text_format.h"
#include "absl/log/die_if_null.h"
Expand Down
5 changes: 5 additions & 0 deletions src/frontends/sql/decode_tag_transform_operation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
// limitations under the License.
//----------------------------------------------------------------------------

#include <string>
#include <tuple>
#include <utility>
#include <vector>

#include "google/protobuf/text_format.h"
#include "absl/container/flat_hash_map.h"
#include "absl/strings/str_format.h"
Expand Down
3 changes: 3 additions & 0 deletions src/frontends/sql/decoder_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "src/frontends/sql/decoder_context.h"

#include <limits>
#include <string>
#include <utility>
#include <vector>

#include "src/common/utils/map_iter.h"
#include "src/frontends/sql/ops/merge_op.h"
Expand Down
5 changes: 5 additions & 0 deletions src/frontends/sql/decoder_context_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

#include "src/frontends/sql/decoder_context.h"

#include <algorithm>
#include <string>
#include <tuple>
#include <vector>

#include "src/common/testing/gtest.h"
#include "src/common/utils/map_iter.h"
#include "src/frontends/sql/ops/merge_op.h"
Expand Down
2 changes: 2 additions & 0 deletions src/frontends/sql/driver_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "src/frontends/sql/driver.h"

#include <string>

#include "google/protobuf/text_format.h"
#include "src/backends/policy_engine/policy.h"
#include "src/backends/policy_engine/sql_policy_rule_policy.h"
Expand Down
7 changes: 7 additions & 0 deletions src/ir/access_path_selectors_set_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
//----------------------------------------------------------------------------
#include "src/ir/access_path_selectors_set.h"

#include <algorithm>
#include <iterator>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

#include "absl/container/btree_set.h"
#include "absl/container/flat_hash_set.h"
#include "absl/strings/str_cat.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/access_path_selectors_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "src/ir/access_path_selectors.h"

#include <string>
#include <tuple>
#include <utility>
#include <vector>

#include "absl/hash/hash_testing.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/auth_logic/ast_construction_query_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <variant>

#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <vector>

#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/auth_logic/ast_construction_says_assertion_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <vector>

#include "src/common/testing/gtest.h"
#include "src/common/utils/map_iter.h"
Expand Down
3 changes: 3 additions & 0 deletions src/ir/auth_logic/ast_equality_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
// limitations under the License.
//----------------------------------------------------------------------------

#include <tuple>
#include <utility>

#include "src/common/testing/gtest.h"
#include "src/ir/auth_logic/ast.h"

Expand Down
5 changes: 5 additions & 0 deletions src/ir/auth_logic/ast_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

#include "ast_string.h"

#include <algorithm>
#include <string>
#include <variant>
#include <vector>

#include "src/common/logging/logging.h"

namespace raksha::ir::auth_logic {
Expand Down
4 changes: 4 additions & 0 deletions src/ir/auth_logic/auth_logic_ast_traversing_visitor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include "src/ir/auth_logic/auth_logic_ast_traversing_visitor.h"

#include <iostream>
#include <string>
#include <utility>
#include <variant>
#include <vector>

#include "absl/container/btree_set.h"
#include "src/common/testing/gtest.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/auth_logic/declaration_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "src/ir/auth_logic/declaration_environment.h"

#include <string>

namespace raksha::ir::auth_logic {

namespace {
Expand Down
7 changes: 7 additions & 0 deletions src/ir/auth_logic/lowering_ast_datalog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@

#include "src/ir/auth_logic/lowering_ast_datalog.h"

#include <algorithm>
#include <iostream>
#include <iterator>
#include <string>
#include <string_view>
#include <utility>
#include <variant>
#include <vector>

#include "absl/algorithm/container.h"
#include "src/common/utils/map_iter.h"
Expand Down
5 changes: 5 additions & 0 deletions src/ir/auth_logic/souffle_emitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
#ifndef SRC_IR_AUTH_LOGIC_SOUFFLE_EMITTER_H_
#define SRC_IR_AUTH_LOGIC_SOUFFLE_EMITTER_H_

#include <algorithm>
#include <string>
#include <utility>
#include <vector>

#include "absl/container/flat_hash_set.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/auth_logic/souffle_emitter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include <iostream>
#include <string>
#include <utility>
#include <vector>

#include "src/common/testing/gtest.h"
#include "src/ir/auth_logic/ast.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/auth_logic/type_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "src/ir/auth_logic/type_environment.h"

#include <string>

#include "src/ir/auth_logic/is_name_constant.h"

namespace raksha::ir::auth_logic {
Expand Down
6 changes: 6 additions & 0 deletions src/ir/auth_logic/universe_relation_insertion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

#include "src/ir/auth_logic/universe_relation_insertion.h"

#include <iterator>
#include <string>
#include <utility>
#include <variant>
#include <vector>

#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "src/ir/auth_logic/auth_logic_ast_traversing_visitor.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/block_builder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "src/ir/block_builder.h"

#include <memory>
#include <string>
#include <utility>

#include "src/common/testing/gtest.h"
#include "src/ir/attributes/attribute.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/data_decl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
//----------------------------------------------------------------------------
#include "src/ir/data_decl.h"

#include <string>

#include "src/common/testing/gtest.h"
#include "src/ir/types/entity_type.h"
#include "src/ir/types/type.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ir/field_selector_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "src/ir/field_selector.h"

#include <string>
#include <tuple>
#include <vector>

#include "absl/hash/hash_testing.h"
#include "src/common/testing/gtest.h"
Expand Down
Loading