From 3e5281f2b3942110987527a6a7654a145a19617a Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Thu, 26 Jul 2018 14:52:19 +0200 Subject: [PATCH] Enable clang::find_bad_constructs for congestion_controller/goog_cc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: I289795c92958fd43fed6165894510ad63ca9d24d Reviewed-on: https://webrtc-review.googlesource.com/90415 Reviewed-by: Björn Terelius Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#24114} --- .../congestion_controller/goog_cc/BUILD.gn | 28 ------------------- .../delay_based_bwe_unittest_helper.cc | 2 ++ .../goog_cc/delay_based_bwe_unittest_helper.h | 5 ++-- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn index a82ba9abb5..2f89e18dd9 100644 --- a/modules/congestion_controller/goog_cc/BUILD.gn +++ b/modules/congestion_controller/goog_cc/BUILD.gn @@ -25,11 +25,6 @@ rtc_static_library("goog_cc") { "include/goog_cc_factory.h", ] - 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" ] - } - deps = [ ":alr_detector", ":delay_based_bwe", @@ -59,10 +54,6 @@ rtc_source_set("alr_detector") { "alr_detector.cc", "alr_detector.h", ] - 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" ] - } deps = [ "../../..:webrtc_common", "../../../logging:rtc_event_log_api", @@ -95,11 +86,6 @@ rtc_source_set("estimators") { # TODO(jschuh): Bug 1348: fix this warning. configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - 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" ] - } - deps = [ "../../../logging:rtc_event_bwe", "../../../logging:rtc_event_log_api", @@ -135,11 +121,6 @@ rtc_source_set("delay_based_bwe") { "../../remote_bitrate_estimator", "//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" ] - } } rtc_source_set("probe_controller") { @@ -158,11 +139,6 @@ rtc_source_set("probe_controller") { "../../../system_wrappers:metrics_api", "//third_party/abseil-cpp/absl/types:optional", ] - - 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) { @@ -213,9 +189,5 @@ if (rtc_include_tests) { "//testing/gmock", "//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" ] - } } } diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc index ff9392c2f6..2a00801eb1 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc +++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.cc @@ -88,6 +88,8 @@ bool RtpStream::Compare(const std::unique_ptr& lhs, StreamGenerator::StreamGenerator(int capacity, int64_t time_now) : capacity_(capacity), prev_arrival_time_us_(time_now) {} +StreamGenerator::~StreamGenerator() = default; + // Add a new stream. void StreamGenerator::AddStream(RtpStream* stream) { streams_.push_back(std::unique_ptr(stream)); diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h index b3996999b9..7ba18c3675 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h +++ b/modules/congestion_controller/goog_cc/delay_based_bwe_unittest_helper.h @@ -32,7 +32,7 @@ namespace test { class TestBitrateObserver : public RemoteBitrateObserver { public: TestBitrateObserver() : updated_(false), latest_bitrate_(0) {} - virtual ~TestBitrateObserver() {} + ~TestBitrateObserver() override {} void OnReceiveBitrateChanged(const std::vector& ssrcs, uint32_t bitrate) override; @@ -82,6 +82,7 @@ class RtpStream { class StreamGenerator { public: StreamGenerator(int capacity, int64_t time_now); + ~StreamGenerator(); // Add a new stream. void AddStream(RtpStream* stream); @@ -117,7 +118,7 @@ class DelayBasedBweTest : public ::testing::Test { public: DelayBasedBweTest(); explicit DelayBasedBweTest(const std::string& field_trial_string); - virtual ~DelayBasedBweTest(); + ~DelayBasedBweTest() override; protected: void AddDefaultStream();