Reformat the WebRTC code base

Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -21,90 +21,95 @@
// for the instructions on writing suppressions.
char kLSanDefaultSuppressions[] =
// ============ Leaks in third-party code shared with Chromium =============
// These entries are copied from build/sanitizers/lsan_suppressions.cc in
// Chromium. Please don't add new entries here unless they're present in there.
// ============ Leaks in third-party code shared with Chromium =============
// These entries are copied from build/sanitizers/lsan_suppressions.cc in
// Chromium. Please don't add new entries here unless they're present in
// there.
// False positives in libfontconfig. http://crbug.com/39050
"leak:libfontconfig\n"
// False positives in libfontconfig. http://crbug.com/39050
"leak:libfontconfig\n"
// Leaks in Nvidia's libGL.
"leak:libGL.so\n"
// Leaks in Nvidia's libGL.
"leak:libGL.so\n"
// XRandR has several one time leaks.
"leak:libxrandr\n"
// XRandR has several one time leaks.
"leak:libxrandr\n"
// xrandr leak. http://crbug.com/119677
"leak:XRRFindDisplay\n"
// xrandr leak. http://crbug.com/119677
"leak:XRRFindDisplay\n"
// ========== Leaks in third-party code not shared with Chromium ===========
// ========== Leaks in third-party code not shared with Chromium ===========
// None known so far.
// None known so far.
// ================ Leaks in WebRTC code ================
// PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS.
// Instead, commits that introduce memory leaks should be reverted. Suppressing
// the leak is acceptable in some cases when reverting is impossible, i.e. when
// enabling leak detection for the first time for a test target with
// pre-existing leaks.
// ================ Leaks in WebRTC code ================
// PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS.
// Instead, commits that introduce memory leaks should be reverted.
// Suppressing the leak is acceptable in some cases when reverting is
// impossible, i.e. when enabling leak detection for the first time for a
// test target with pre-existing leaks.
// rtc_unittest
// https://code.google.com/p/webrtc/issues/detail?id=3827 for details.
"leak:rtc::unstarted_task_test_DoNotDeleteTask2_Test::TestBody\n"
"leak:rtc::HttpServer::HandleConnection\n"
"leak:rtc::HttpServer::Connection::onHttpHeaderComplete\n"
"leak:rtc::HttpResponseData::set_success\n"
"leak:rtc::HttpData::changeHeader\n"
// https://code.google.com/p/webrtc/issues/detail?id=4149 for details.
"leak:StartDNSLookup\n"
// https://code.google.com/p/webrtc/issues/detail?id=2527
"leak:HangoutPubSubClientTest::HangoutPubSubClientTest\n"
"leak:MucRoomConfigTaskTest::SetUp\n"
"leak:MucRoomDiscoveryTaskTest::SetUp\n"
"leak:MucRoomLookupTaskTest::SetUp\n"
"leak:MucRoomUniqueHangoutIdTaskTest::SetUp\n"
"leak:PingTaskTest::SetUp\n"
"leak:PingXmppClient::SendStanza\n"
"leak:PubSubClientTest::PubSubClientTest\n"
"leak:PubSubTasksTest::PubSubTasksTest\n"
// rtc_unittest
// https://code.google.com/p/webrtc/issues/detail?id=3827 for details.
"leak:rtc::unstarted_task_test_DoNotDeleteTask2_Test::TestBody\n"
"leak:rtc::HttpServer::HandleConnection\n"
"leak:rtc::HttpServer::Connection::onHttpHeaderComplete\n"
"leak:rtc::HttpResponseData::set_success\n"
"leak:rtc::HttpData::changeHeader\n"
// https://code.google.com/p/webrtc/issues/detail?id=4149 for details.
"leak:StartDNSLookup\n"
// https://code.google.com/p/webrtc/issues/detail?id=2527
"leak:HangoutPubSubClientTest::HangoutPubSubClientTest\n"
"leak:MucRoomConfigTaskTest::SetUp\n"
"leak:MucRoomDiscoveryTaskTest::SetUp\n"
"leak:MucRoomLookupTaskTest::SetUp\n"
"leak:MucRoomUniqueHangoutIdTaskTest::SetUp\n"
"leak:PingTaskTest::SetUp\n"
"leak:PingXmppClient::SendStanza\n"
"leak:PubSubClientTest::PubSubClientTest\n"
"leak:PubSubTasksTest::PubSubTasksTest\n"
// rtc_media_unittests
"leak:cricket::FakeNetworkInterface::SetOption\n"
"leak:CodecTest_TestCodecOperators_Test::TestBody\n"
"leak:VideoEngineTest*::ConstrainNewCodecBody\n"
"leak:VideoMediaChannelTest*::AddRemoveRecvStreams\n"
"leak:WebRtcVideoCapturerTest_TestCapture_Test::TestBody\n"
"leak:WebRtcVideoEngineTestFake_MultipleSendStreamsWithOneCapturer_Test::TestBody\n"
"leak:WebRtcVideoEngineTestFake_SetBandwidthInConference_Test::TestBody\n"
"leak:WebRtcVideoEngineTestFake_SetSendCodecsRejectBadFormat_Test::TestBody\n"
// rtc_media_unittests
"leak:cricket::FakeNetworkInterface::SetOption\n"
"leak:CodecTest_TestCodecOperators_Test::TestBody\n"
"leak:VideoEngineTest*::ConstrainNewCodecBody\n"
"leak:VideoMediaChannelTest*::AddRemoveRecvStreams\n"
"leak:WebRtcVideoCapturerTest_TestCapture_Test::TestBody\n"
"leak:WebRtcVideoEngineTestFake_MultipleSendStreamsWithOneCapturer_Test::"
"TestBody\n"
"leak:WebRtcVideoEngineTestFake_SetBandwidthInConference_Test::TestBody\n"
"leak:WebRtcVideoEngineTestFake_SetSendCodecsRejectBadFormat_Test::"
"TestBody\n"
// peerconnection_unittests
// https://code.google.com/p/webrtc/issues/detail?id=2528
"leak:cricket::FakeVideoMediaChannel::~FakeVideoMediaChannel\n"
"leak:cricket::MediaSessionDescriptionFactory::CreateAnswer\n"
"leak:cricket::MediaSessionDescriptionFactory::CreateOffer\n"
"leak:DtmfSenderTest_InsertEmptyTonesToCancelPreviousTask_Test::TestBody\n"
"leak:sigslot::_signal_base2*::~_signal_base2\n"
"leak:testing::internal::CmpHelperEQ\n"
"leak:webrtc::AudioDeviceLinuxALSA::InitMicrophone\n"
"leak:webrtc::AudioDeviceLinuxALSA::InitSpeaker\n"
"leak:webrtc::CreateIceCandidate\n"
"leak:webrtc::FakeConstraints::AddOptional\n"
"leak:webrtc::WebRtcIdentityRequestObserver::OnSuccess\n"
"leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateAnswer\n"
"leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateOffer\n"
"leak:PeerConnectionInterfaceTest_SsrcInOfferAnswer_Test::TestBody\n"
"leak:PeerConnectionInterfaceTest_CloseAndTestMethods_Test::TestBody\n"
"leak:WebRtcSdpTest::TestDeserializeRtcpFb\n"
"leak:WebRtcSdpTest::TestSerialize\n"
"leak:WebRtcSdpTest_SerializeSessionDescriptionWithDataChannelAndBandwidth_Test::TestBody\n"
"leak:WebRtcSdpTest_SerializeSessionDescriptionWithBandwidth_Test::TestBody\n"
"leak:WebRtcSessionTest::SetLocalDescriptionExpectError\n"
"leak:WebRtcSessionTest_TestAVOfferWithAudioOnlyAnswer_Test::TestBody\n"
// peerconnection_unittests
// https://code.google.com/p/webrtc/issues/detail?id=2528
"leak:cricket::FakeVideoMediaChannel::~FakeVideoMediaChannel\n"
"leak:cricket::MediaSessionDescriptionFactory::CreateAnswer\n"
"leak:cricket::MediaSessionDescriptionFactory::CreateOffer\n"
"leak:DtmfSenderTest_InsertEmptyTonesToCancelPreviousTask_Test::TestBody\n"
"leak:sigslot::_signal_base2*::~_signal_base2\n"
"leak:testing::internal::CmpHelperEQ\n"
"leak:webrtc::AudioDeviceLinuxALSA::InitMicrophone\n"
"leak:webrtc::AudioDeviceLinuxALSA::InitSpeaker\n"
"leak:webrtc::CreateIceCandidate\n"
"leak:webrtc::FakeConstraints::AddOptional\n"
"leak:webrtc::WebRtcIdentityRequestObserver::OnSuccess\n"
"leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateAnswer\n"
"leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateOffer\n"
"leak:PeerConnectionInterfaceTest_SsrcInOfferAnswer_Test::TestBody\n"
"leak:PeerConnectionInterfaceTest_CloseAndTestMethods_Test::TestBody\n"
"leak:WebRtcSdpTest::TestDeserializeRtcpFb\n"
"leak:WebRtcSdpTest::TestSerialize\n"
"leak:WebRtcSdpTest_SerializeSessionDescriptionWithDataChannelAndBandwidth_"
"Test::TestBody\n"
"leak:WebRtcSdpTest_SerializeSessionDescriptionWithBandwidth_Test::"
"TestBody\n"
"leak:WebRtcSessionTest::SetLocalDescriptionExpectError\n"
"leak:WebRtcSessionTest_TestAVOfferWithAudioOnlyAnswer_Test::TestBody\n"
// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
// End of suppressions.
; // Please keep this semicolon.
// End of suppressions.
; // Please keep this semicolon.
#endif // LEAK_SANITIZER

View File

@ -21,55 +21,57 @@
// for the instructions on writing suppressions.
char kTSanDefaultSuppressions[] =
// WebRTC specific suppressions.
// WebRTC specific suppressions.
// Split up suppressions covered previously by thread.cc and messagequeue.cc.
"race:vp8cx_remove_encoder_threads\n"
"race:third_party/libvpx/source/libvpx/vp9/common/vp9_scan.h\n"
// Split up suppressions covered previously by thread.cc and
// messagequeue.cc.
"race:vp8cx_remove_encoder_threads\n"
"race:third_party/libvpx/source/libvpx/vp9/common/vp9_scan.h\n"
// rtc_unittests
// https://code.google.com/p/webrtc/issues/detail?id=3911 for details.
"race:rtc::MessageQueueManager::Clear\n"
"race:rtc::Thread::Clear\n"
// https://code.google.com/p/webrtc/issues/detail?id=2080
"race:rtc_base/logging.cc\n"
"race:rtc_base/sharedexclusivelock_unittest.cc\n"
"race:rtc_base/signalthread_unittest.cc\n"
// https://code.google.com/p/webrtc/issues/detail?id=4456
"deadlock:rtc::MessageQueueManager::Clear\n"
"deadlock:rtc::MessageQueueManager::ClearInternal\n"
// rtc_unittests
// https://code.google.com/p/webrtc/issues/detail?id=3911 for details.
"race:rtc::MessageQueueManager::Clear\n"
"race:rtc::Thread::Clear\n"
// https://code.google.com/p/webrtc/issues/detail?id=2080
"race:rtc_base/logging.cc\n"
"race:rtc_base/sharedexclusivelock_unittest.cc\n"
"race:rtc_base/signalthread_unittest.cc\n"
// https://code.google.com/p/webrtc/issues/detail?id=4456
"deadlock:rtc::MessageQueueManager::Clear\n"
"deadlock:rtc::MessageQueueManager::ClearInternal\n"
// rtc_pc_unittests
// https://code.google.com/p/webrtc/issues/detail?id=2079
"race:rtc_base/testclient.cc\n"
"race:rtc_base/virtualsocketserver.cc\n"
"race:talk/p2p/base/stunserver_unittest.cc\n"
// rtc_pc_unittests
// https://code.google.com/p/webrtc/issues/detail?id=2079
"race:rtc_base/testclient.cc\n"
"race:rtc_base/virtualsocketserver.cc\n"
"race:talk/p2p/base/stunserver_unittest.cc\n"
// third_party/usrsctp
// TODO(jiayl): https://code.google.com/p/webrtc/issues/detail?id=3492
"race:user_sctp_timer_iterate\n"
// third_party/usrsctp
// TODO(jiayl): https://code.google.com/p/webrtc/issues/detail?id=3492
"race:user_sctp_timer_iterate\n"
// https://code.google.com/p/webrtc/issues/detail?id=5151
"race:sctp_close\n"
// https://code.google.com/p/webrtc/issues/detail?id=5151
"race:sctp_close\n"
// Potential deadlocks detected after roll in r6516.
// https://code.google.com/p/webrtc/issues/detail?id=3509
"deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n"
// Potential deadlocks detected after roll in r6516.
// https://code.google.com/p/webrtc/issues/detail?id=3509
"deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n"
// TODO(pbos): Trace events are racy due to lack of proper POD atomics.
// https://code.google.com/p/webrtc/issues/detail?id=2497
"race:*trace_event_unique_catstatic*\n"
// TODO(pbos): Trace events are racy due to lack of proper POD atomics.
// https://code.google.com/p/webrtc/issues/detail?id=2497
"race:*trace_event_unique_catstatic*\n"
// Race between InitCpuFlags and TestCpuFlag in libyuv.
// https://code.google.com/p/libyuv/issues/detail?id=508
"race:InitCpuFlags\n"
// Race between InitCpuFlags and TestCpuFlag in libyuv.
// https://code.google.com/p/libyuv/issues/detail?id=508
"race:InitCpuFlags\n"
// Test-only race due to PeerConnection::session() being virtual for testing.
// The stats collector may call session() before or after the destructor begins
// executing, which modifies the vtable.
"race:*RTCStatsIntegrationTest_GetsStatsWhileDestroyingPeerConnections_Test::TestBody\n"
// Test-only race due to PeerConnection::session() being virtual for
// testing. The stats collector may call session() before or after the
// destructor begins executing, which modifies the vtable.
"race:*RTCStatsIntegrationTest_GetsStatsWhileDestroyingPeerConnections_"
"Test::TestBody\n"
// End of suppressions.
; // Please keep this semicolon.
// End of suppressions.
; // Please keep this semicolon.
#endif // THREAD_SANITIZER