Enable clang::find_bad_constructs for call/ (part 1).

This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.

Bug: webrtc:9251, webrtc:163
Change-Id: Ia58a3b4f3becf9e620d3991da8451d81f32f8ad0
Reviewed-on: https://webrtc-review.googlesource.com/90406
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24118}
This commit is contained in:
Mirko Bonadei
2018-07-26 09:15:11 +02:00
committed by Commit Bot
parent e4db6a1518
commit ed1dcf9f23
5 changed files with 10 additions and 14 deletions

View File

@ -161,10 +161,6 @@ rtc_source_set("bitrate_allocator") {
"../system_wrappers:field_trial_api",
"../system_wrappers:metrics_api",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
rtc_static_library("call") {
@ -265,11 +261,6 @@ rtc_source_set("fake_network") {
"../system_wrappers",
"//third_party/abseil-cpp/absl/memory",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
if (rtc_include_tests) {
@ -438,9 +429,5 @@ if (rtc_include_tests) {
sources = [
"test/fake_network_pipe_unittest.cc",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
}

View File

@ -53,6 +53,8 @@ NetworkPacket::NetworkPacket(NetworkPacket&& o)
media_type_(o.media_type_),
packet_time_(o.packet_time_) {}
NetworkPacket::~NetworkPacket() = default;
NetworkPacket& NetworkPacket::operator=(NetworkPacket&& o) {
packet_ = std::move(o.packet_);
send_time_ = o.send_time_;
@ -147,6 +149,8 @@ SimulatedNetwork::SimulatedNetwork(SimulatedNetwork::Config config,
SetConfig(config);
}
SimulatedNetwork::~SimulatedNetwork() = default;
void FakeNetworkPipe::SetConfig(const FakeNetworkPipe::Config& config) {
network_simulation_->SetConfig(config);
}

View File

@ -46,6 +46,7 @@ class NetworkPacket {
absl::optional<PacketTime> packet_time_);
// Disallow copy constructor and copy assignment (no deep copies of |data_|).
NetworkPacket(const NetworkPacket&) = delete;
~NetworkPacket();
NetworkPacket& operator=(const NetworkPacket&) = delete;
// Allow move constructor/assignment, so that we can use in stl containers.
NetworkPacket(NetworkPacket&&);
@ -91,6 +92,7 @@ class SimulatedNetwork : public NetworkSimulationInterface {
public:
using Config = NetworkSimulationInterface::SimulatedNetworkConfig;
explicit SimulatedNetwork(Config config, uint64_t random_seed = 1);
~SimulatedNetwork() override;
// Sets a new configuration. This won't affect packets already in the pipe.
void SetConfig(const Config& config);
@ -153,7 +155,7 @@ class FakeNetworkPipe : public Transport, public PacketReceiver, public Module {
const FakeNetworkPipe::Config& config,
Transport* transport);
virtual ~FakeNetworkPipe();
~FakeNetworkPipe() override;
void SetClockOffset(int64_t offset_ms);