Enable clang::find_bad_constructs for congestion_controller/goog_cc.
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 <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24114}
diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn
index a82ba9a..2f89e18 100644
--- a/modules/congestion_controller/goog_cc/BUILD.gn
+++ b/modules/congestion_controller/goog_cc/BUILD.gn
@@ -25,11 +25,6 @@
"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 @@
"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 @@
# 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 @@
"../../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 @@
"../../../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 @@
"//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 ff9392c..2a00801 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 @@
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<RtpStream>(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 b399699..7ba18c3 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 @@
class TestBitrateObserver : public RemoteBitrateObserver {
public:
TestBitrateObserver() : updated_(false), latest_bitrate_(0) {}
- virtual ~TestBitrateObserver() {}
+ ~TestBitrateObserver() override {}
void OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs,
uint32_t bitrate) override;
@@ -82,6 +82,7 @@
class StreamGenerator {
public:
StreamGenerator(int capacity, int64_t time_now);
+ ~StreamGenerator();
// Add a new stream.
void AddStream(RtpStream* stream);
@@ -117,7 +118,7 @@
public:
DelayBasedBweTest();
explicit DelayBasedBweTest(const std::string& field_trial_string);
- virtual ~DelayBasedBweTest();
+ ~DelayBasedBweTest() override;
protected:
void AddDefaultStream();