Skip to content

Commit

Permalink
pragma once (#15274)
Browse files Browse the repository at this point in the history
Commit Message:
Add pragma once almost every header.
Risk Level: LOW
Testing: self-contained
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Part of #15264
[Optional Deprecated:]
[Optional API Considerations:]

Additional Description:

Signed-off-by: Yuchen Dai <[email protected]>
  • Loading branch information
lambdai authored Mar 3, 2021
1 parent 5002661 commit e9f025a
Show file tree
Hide file tree
Showing 44 changed files with 88 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/common/common/documentation_url.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

namespace Envoy {

// TODO(ggreenway): replace 'latest' with the current version, pulled from the VERSION file at
Expand Down
2 changes: 2 additions & 0 deletions source/common/grpc/google_async_client_cache.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <memory>

#include "envoy/grpc/async_client_manager.h"
Expand Down
2 changes: 2 additions & 0 deletions source/common/stats/scope_prefixer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/stats/scope.h"

#include "common/stats/symbol_table_impl.h"
Expand Down
2 changes: 2 additions & 0 deletions source/common/upstream/load_stats_reporter.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/event/dispatcher.h"
#include "envoy/service/load_stats/v3/lrs.pb.h"
#include "envoy/stats/scope.h"
Expand Down
2 changes: 2 additions & 0 deletions source/extensions/common/sqlutils/sqlutils.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "common/protobuf/utility.h"

#include "include/sqlparser/SQLParser.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/extensions/filters/common/dependency/v3/dependency.pb.h"

namespace Envoy {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "common/buffer/buffer_impl.h"

#include "absl/strings/str_cat.h"
Expand Down
2 changes: 2 additions & 0 deletions source/extensions/io_socket/user_space/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

namespace Envoy {
namespace Extensions {
namespace IoSocket {
Expand Down
2 changes: 2 additions & 0 deletions source/extensions/quic_listeners/quiche/codec_impl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/http/codec.h"
#include "envoy/registry/registry.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/network/listener.h"

#include "server/connection_handler_impl.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

// NOLINT(namespace-envoy)
//
// This file is part of the QUICHE platform implementation, and is not to be
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <chrono>
#include <iostream>

Expand Down
2 changes: 2 additions & 0 deletions source/extensions/retry/host/omit_canary_hosts/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.h"
#include "envoy/upstream/retry.h"

Expand Down
2 changes: 2 additions & 0 deletions source/extensions/tracers/skywalking/skywalking_stats.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/stats/stats_macros.h"

namespace Envoy {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/extensions/transport_sockets/starttls/v3/starttls.pb.h"
#include "envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.h"
#include "envoy/network/transport_socket.h"
Expand Down
2 changes: 2 additions & 0 deletions test/common/formatter/command_extension.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <string>

#include "envoy/config/typed_config.h"
Expand Down
2 changes: 2 additions & 0 deletions test/common/http/http2/frame_replay.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <cstdint>
#include <memory>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions test/common/network/udp_listener_impl_test_base.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <cstddef>
#include <memory>
#include <string>
Expand Down
2 changes: 2 additions & 0 deletions test/common/upstream/health_check_fuzz_test_utils.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <vector>

#include "common/upstream/health_checker_impl.h"
Expand Down
2 changes: 2 additions & 0 deletions test/common/upstream/load_balancer_fuzz_base.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/config/cluster/v3/cluster.pb.h"

#include "common/upstream/load_balancer_impl.h"
Expand Down
2 changes: 2 additions & 0 deletions test/common/upstream/zone_aware_load_balancer_fuzz_base.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "test/mocks/upstream/priority_set.h"

#include "load_balancer_fuzz_base.h"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/clusters/redis/mocks.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/extensions/clusters/redis/v3/redis_cluster.pb.h"
#include "envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.h"
#include "envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.h"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/common/tap/common.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/data/tap/v3/wrapper.pb.h"

#include "common/protobuf/utility.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "test/integration/http_integration.h"
#include "test/test_common/simulated_time_system.h"
#include "test/test_common/utility.h"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/filters/http/common/fuzz/uber_filter.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "test/extensions/filters/http/common/fuzz/http_filter_fuzzer.h"
#include "test/fuzz/utility.h"
#include "test/mocks/buffer/mocks.h"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/filters/http/tap/common.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "extensions/filters/http/tap/tap_config.h"

#include "gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "common/api/os_sys_calls_impl.h"
#include "common/network/io_socket_handle_impl.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/network/filter.h"

#include "test/extensions/filters/listener/common/fuzz/listener_filter_fakes.h"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/filters/network/common/fuzz/uber_readfilter.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/network/filter.h"

#include "common/protobuf/protobuf.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/network/filter.h"

#include "common/protobuf/protobuf.h"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/filters/network/common/fuzz/utils/fakes.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "test/mocks/server/factory_context.h"

namespace Envoy {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "common/filter/http/filter_config_discovery_impl.h"
#include "common/http/date_provider_impl.h"
#include "common/network/address_impl.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "common/buffer/buffer_impl.h"

namespace Envoy {
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/quic_listeners/quiche/test_proof_source.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/quic_listeners/quiche/test_proof_verifier.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "extensions/quic_listeners/quiche/envoy_quic_proof_verifier_base.h"

namespace Envoy {
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/quic_listeners/quiche/test_utils.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "extensions/quic_listeners/quiche/quic_filter_manager_connection_impl.h"

#if defined(__GNUC__)
Expand Down
2 changes: 2 additions & 0 deletions test/fuzz/random.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <memory>
#include <random>
#include <utility>
Expand Down
2 changes: 2 additions & 0 deletions test/integration/clusters/custom_static_cluster.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <chrono>
#include <list>
#include <string>
Expand Down
2 changes: 2 additions & 0 deletions test/mocks/local_reply/mocks.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "common/local_reply/local_reply.h"

#include "gmock/gmock.h"
Expand Down
2 changes: 2 additions & 0 deletions test/server/config_validation/xds_verifier.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/admin/v3/config_dump.pb.h"
#include "envoy/common/exception.h"
#include "envoy/config/cluster/v3/cluster.pb.h"
Expand Down
2 changes: 2 additions & 0 deletions test/server/listener_manager_impl_test.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <memory>

#include "envoy/admin/v3/config_dump.pb.h"
Expand Down
2 changes: 2 additions & 0 deletions test/test_common/file_system_for_test.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/filesystem/filesystem.h"

namespace Envoy {
Expand Down
2 changes: 2 additions & 0 deletions test/test_common/thread_factory_for_test.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include "envoy/thread/thread.h"

namespace Envoy {
Expand Down
2 changes: 2 additions & 0 deletions test/test_common/wasm_base.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <cstdio>

#include "envoy/extensions/wasm/v3/wasm.pb.validate.h"
Expand Down

0 comments on commit e9f025a

Please sign in to comment.