From cafaed3109a5afeb49eed44109cf00adc9bdd8bb Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Mon, 16 Oct 2023 00:34:23 +0000 Subject: [PATCH] Bug 1856795 - ride along: use = default; on some recently modified files r=emilio More on: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html Command: L=$(hg export -r tip|grep +++|cut -d/ -f2-) ./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L Differential Revision: https://phabricator.services.mozilla.com/D191016 UltraBlame original commit: aba20bc488e22880b8ef5a89916ecabb51cee798 --- accessible/atk/ApplicationAccessibleWrap.cpp | 5 +++-- .../DeserializedStackFrameUbiStackFrames.cpp | 5 +++-- .../shared/heapsnapshot/tests/gtest/DevTools.h | 5 +++-- dom/base/nsFrameMessageManager.cpp | 5 +++-- dom/base/nsGlobalWindowOuter.cpp | 5 +++-- dom/html/ConstraintValidation.cpp | 5 +++-- dom/ipc/SharedMap.cpp | 5 +++-- dom/media/gtest/TestWebMWriter.cpp | 5 +++-- dom/media/webrtc/sdp/SdpAttribute.h | 15 +++++++++------ dom/media/webrtc/transport/stun_socket_filter.cpp | 5 +++-- dom/media/webrtc/transport/test/ice_unittest.cpp | 5 +++-- gfx/2d/Path.cpp | 5 +++-- gfx/vr/service/PuppetSession.cpp | 5 +++-- image/imgFrame.h | 10 ++++++---- ipc/chromium/src/base/histogram.cc | 10 ++++++---- ipc/chromium/src/base/lock.h | 10 ++++++---- js/src/builtin/TestingFunctions.cpp | 5 +++-- js/src/jit/RegisterSets.h | 10 ++++++---- js/src/jsapi.cpp | 5 +++-- js/src/vm/SavedStacks.h | 5 +++-- js/src/vm/SharedImmutableStringsCache.h | 5 +++-- js/src/vm/Stack.h | 5 +++-- js/src/vm/UbiNodeCensus.cpp | 5 +++-- js/src/wasm/WasmTypeDef.h | 5 +++-- js/src/wasm/WasmValue.h | 10 ++++++---- memory/replace/dmd/DMD.cpp | 5 +++-- memory/replace/phc/PHC.cpp | 5 +++-- modules/libpref/Preferences.cpp | 5 +++-- mozglue/misc/AutoProfilerLabel.cpp | 5 +++-- netwerk/base/nsBufferedStreams.h | 10 ++++++---- netwerk/base/nsStreamLoader.cpp | 5 +++-- security/manager/ssl/ScopedNSSTypes.h | 10 ++++++---- storage/mozStorageAsyncStatement.cpp | 5 +++-- storage/mozStorageStatement.cpp | 5 +++-- .../extensions/webrequest/ChannelWrapper.cpp | 5 +++-- tools/profiler/core/memory_hooks.cpp | 10 ++++++---- .../profiler/tests/gtest/LulTestInfrastructure.h | 4 ++-- xpcom/base/nsTraceRefcnt.cpp | 4 ++-- xpcom/io/nsStreamUtils.cpp | 10 ++++++---- 39 files changed, 148 insertions(+), 100 deletions(-) diff --git a/accessible/atk/ApplicationAccessibleWrap.cpp b/accessible/atk/ApplicationAccessibleWrap.cpp index 15f36fe3bc947..79eadde26ee34 100644 --- a/accessible/atk/ApplicationAccessibleWrap.cpp +++ b/accessible/atk/ApplicationAccessibleWrap.cpp @@ -170,8 +170,9 @@ ApplicationAccessibleWrap ApplicationAccessibleWrap ( ) -{ -} += +default +; ApplicationAccessibleWrap : : diff --git a/devtools/shared/heapsnapshot/tests/gtest/DeserializedStackFrameUbiStackFrames.cpp b/devtools/shared/heapsnapshot/tests/gtest/DeserializedStackFrameUbiStackFrames.cpp index 3ddb710f6c39c..57153f789296a 100644 --- a/devtools/shared/heapsnapshot/tests/gtest/DeserializedStackFrameUbiStackFrames.cpp +++ b/devtools/shared/heapsnapshot/tests/gtest/DeserializedStackFrameUbiStackFrames.cpp @@ -214,8 +214,9 @@ DeserializedStackFrame MockDeserializedStackFrame ( ) -{ -} += +default +; } ; DEF_TEST diff --git a/devtools/shared/heapsnapshot/tests/gtest/DevTools.h b/devtools/shared/heapsnapshot/tests/gtest/DevTools.h index c62b83c7e9f09..c4346f13590df 100644 --- a/devtools/shared/heapsnapshot/tests/gtest/DevTools.h +++ b/devtools/shared/heapsnapshot/tests/gtest/DevTools.h @@ -1322,8 +1322,9 @@ MockWriter ( ) override -{ -} += +default +; MOCK_METHOD2 ( writeNode diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index 40e11db7ab7d0..ff0486187d360 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -9224,8 +9224,9 @@ public nsAsyncMessageToSameProcessParent ( ) -{ -} += +default +; nsresult HandleMessage ( diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index f8596fab8c233..4c7f4e979faa5 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -9798,8 +9798,9 @@ constexpr nsChromeOuterWindowProxy ( ) -{ -} += +default +; const char * diff --git a/dom/html/ConstraintValidation.cpp b/dom/html/ConstraintValidation.cpp index 9acf7e8a35dca..df51bdc82723e 100644 --- a/dom/html/ConstraintValidation.cpp +++ b/dom/html/ConstraintValidation.cpp @@ -448,8 +448,9 @@ ConstraintValidation ConstraintValidation ( ) -{ -} += +default +; void ConstraintValidation : diff --git a/dom/ipc/SharedMap.cpp b/dom/ipc/SharedMap.cpp index 3f667a3fb9974..a68877034bde3 100644 --- a/dom/ipc/SharedMap.cpp +++ b/dom/ipc/SharedMap.cpp @@ -339,8 +339,9 @@ SharedMap SharedMap ( ) -{ -} += +default +; SharedMap : : diff --git a/dom/media/gtest/TestWebMWriter.cpp b/dom/media/gtest/TestWebMWriter.cpp index 08f82fe8018ab..3c1ec74d5031a 100644 --- a/dom/media/gtest/TestWebMWriter.cpp +++ b/dom/media/gtest/TestWebMWriter.cpp @@ -413,8 +413,9 @@ public TestWebMWriter ( ) -{ -} += +default +; / / When diff --git a/dom/media/webrtc/sdp/SdpAttribute.h b/dom/media/webrtc/sdp/SdpAttribute.h index d4e64f41a2adb..bf0cb885cc964 100644 --- a/dom/media/webrtc/sdp/SdpAttribute.h +++ b/dom/media/webrtc/sdp/SdpAttribute.h @@ -305,8 +305,9 @@ virtual SdpAttribute ( ) -{ -} += +default +; virtual SdpAttribute * @@ -10285,8 +10286,9 @@ virtual Parameters ( ) -{ -} += +default +; virtual Parameters * @@ -10559,8 +10561,9 @@ virtual RtxParameters ( ) -{ -} += +default +; virtual Parameters * diff --git a/dom/media/webrtc/transport/stun_socket_filter.cpp b/dom/media/webrtc/transport/stun_socket_filter.cpp index 927e7dfcd6eb1..d3c7260962cf8 100644 --- a/dom/media/webrtc/transport/stun_socket_filter.cpp +++ b/dom/media/webrtc/transport/stun_socket_filter.cpp @@ -683,8 +683,9 @@ public STUNUDPSocketFilter ( ) -{ -} += +default +; / / Allocated diff --git a/dom/media/webrtc/transport/test/ice_unittest.cpp b/dom/media/webrtc/transport/test/ice_unittest.cpp index d6999fb9bb5ff..601a539e7694d 100644 --- a/dom/media/webrtc/transport/test/ice_unittest.cpp +++ b/dom/media/webrtc/transport/test/ice_unittest.cpp @@ -808,8 +808,9 @@ public StunTest ( ) -{ -} += +default +; void SetUp ( diff --git a/gfx/2d/Path.cpp b/gfx/2d/Path.cpp index a435538e320d6..82fcc400323f1 100644 --- a/gfx/2d/Path.cpp +++ b/gfx/2d/Path.cpp @@ -205,8 +205,9 @@ Super PointD ( ) -{ -} += +default +; PointD ( double diff --git a/gfx/vr/service/PuppetSession.cpp b/gfx/vr/service/PuppetSession.cpp index 89406d813fe67..f5da4d7d366a5 100644 --- a/gfx/vr/service/PuppetSession.cpp +++ b/gfx/vr/service/PuppetSession.cpp @@ -206,8 +206,9 @@ PuppetSession PuppetSession ( ) -{ -} += +default +; PuppetSession : : diff --git a/image/imgFrame.h b/image/imgFrame.h index 9acd117a92e93..e03bd09393b9b 100644 --- a/image/imgFrame.h +++ b/image/imgFrame.h @@ -2047,8 +2047,9 @@ public DrawableFrameRef ( ) -{ -} += +default +; explicit DrawableFrameRef ( @@ -2651,8 +2652,9 @@ nullptr RawAccessFrameRef ( ) -{ -} += +default +; RawAccessFrameRef & operator diff --git a/ipc/chromium/src/base/histogram.cc b/ipc/chromium/src/base/histogram.cc index 469c235d187ee..74bb3698d899c 100644 --- a/ipc/chromium/src/base/histogram.cc +++ b/ipc/chromium/src/base/histogram.cc @@ -3174,8 +3174,9 @@ SampleSet SampleSet ( ) -{ -} += +default +; void Histogram : @@ -3636,8 +3637,9 @@ LinearHistogram LinearHistogram ( ) -{ -} += +default +; Histogram * LinearHistogram diff --git a/ipc/chromium/src/base/lock.h b/ipc/chromium/src/base/lock.h index 82e8cd0bf6d4c..c76c637717483 100644 --- a/ipc/chromium/src/base/lock.h +++ b/ipc/chromium/src/base/lock.h @@ -155,14 +155,16 @@ implementation Lock ( ) -{ -} += +default +; ~ Lock ( ) -{ -} += +default +; void Acquire ( diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 854b1a172c20a..078c03a1f71f0 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -30074,8 +30074,9 @@ public ShellAllocationMetadataBuilder ( ) -{ -} += +default +; virtual JSObject * diff --git a/js/src/jit/RegisterSets.h b/js/src/jit/RegisterSets.h index 3fcc06f128f8b..436e7a7461842 100644 --- a/js/src/jit/RegisterSets.h +++ b/js/src/jit/RegisterSets.h @@ -3855,8 +3855,9 @@ public AllocatableSetAccessors ( ) -{ -} += +default +; explicit constexpr AllocatableSetAccessors @@ -4414,8 +4415,9 @@ public LiveSetAccessors ( ) -{ -} += +default +; explicit constexpr LiveSetAccessors diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 16056a27bad25..f5427ad4d778f 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -24355,8 +24355,9 @@ JSErrorNotes JSErrorNotes ( ) -{ -} += +default +; JSErrorNotes : : diff --git a/js/src/vm/SavedStacks.h b/js/src/vm/SavedStacks.h index c327797d0051c..45694ddddad15 100644 --- a/js/src/vm/SavedStacks.h +++ b/js/src/vm/SavedStacks.h @@ -2181,8 +2181,9 @@ AllocationMetadataBuilder MetadataBuilder ( ) -{ -} += +default +; virtual JSObject * diff --git a/js/src/vm/SharedImmutableStringsCache.h b/js/src/vm/SharedImmutableStringsCache.h index e4ff20311526c..d5b255da016db 100644 --- a/js/src/vm/SharedImmutableStringsCache.h +++ b/js/src/vm/SharedImmutableStringsCache.h @@ -2016,8 +2016,9 @@ set Inner ( ) -{ -} += +default +; Inner ( const diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h index 8fa47ca71c090..d9fc059bf4f00 100644 --- a/js/src/vm/Stack.h +++ b/js/src/vm/Stack.h @@ -1754,8 +1754,9 @@ public NullFramePtr ( ) -{ -} += +default +; } ; enum diff --git a/js/src/vm/UbiNodeCensus.cpp b/js/src/vm/UbiNodeCensus.cpp index 9bfb30b4dfe0b..74a58b8485538 100644 --- a/js/src/vm/UbiNodeCensus.cpp +++ b/js/src/vm/UbiNodeCensus.cpp @@ -876,8 +876,9 @@ explicit BucketCount ( ) -{ -} += +default +; void destructCount ( diff --git a/js/src/wasm/WasmTypeDef.h b/js/src/wasm/WasmTypeDef.h index 805fb3005146b..6cb8911b130be 100644 --- a/js/src/wasm/WasmTypeDef.h +++ b/js/src/wasm/WasmTypeDef.h @@ -908,8 +908,9 @@ public FuncType ( ) -{ -} += +default +; FuncType ( ValTypeVector diff --git a/js/src/wasm/WasmValue.h b/js/src/wasm/WasmValue.h index 5ec35caed98da..367e7f20c462f 100644 --- a/js/src/wasm/WasmValue.h +++ b/js/src/wasm/WasmValue.h @@ -1341,8 +1341,9 @@ public LitVal ( ) -{ -} += +default +; explicit LitVal ( @@ -1900,8 +1901,9 @@ public Val ( ) -{ -} += +default +; explicit Val ( diff --git a/memory/replace/dmd/DMD.cpp b/memory/replace/dmd/DMD.cpp index e81900baaf7eb..80232bda3600d 100644 --- a/memory/replace/dmd/DMD.cpp +++ b/memory/replace/dmd/DMD.cpp @@ -7092,8 +7092,9 @@ AllocStackTrace DeadBlock ( ) -{ -} += +default +; size_t ReqSize ( diff --git a/memory/replace/phc/PHC.cpp b/memory/replace/phc/PHC.cpp index ea30286611af2..823833b8fb863 100644 --- a/memory/replace/phc/PHC.cpp +++ b/memory/replace/phc/PHC.cpp @@ -1924,8 +1924,9 @@ public StackTrace ( ) -{ -} += +default +; void Clear ( diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp index b23ed65c12446..d8bc3f889b5dd 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -21948,8 +21948,9 @@ nsIMemoryReporter PreferenceServiceReporter ( ) -{ -} += +default +; public : NS_DECL_ISUPPORTS diff --git a/mozglue/misc/AutoProfilerLabel.cpp b/mozglue/misc/AutoProfilerLabel.cpp index 60e4082fa7417..ee589d65f9b37 100644 --- a/mozglue/misc/AutoProfilerLabel.cpp +++ b/mozglue/misc/AutoProfilerLabel.cpp @@ -334,8 +334,9 @@ public Mutex ( ) -{ -} += +default +; void Lock ( diff --git a/netwerk/base/nsBufferedStreams.h b/netwerk/base/nsBufferedStreams.h index 98e48190ef26a..3bcf83bdb7b8f 100644 --- a/netwerk/base/nsBufferedStreams.h +++ b/netwerk/base/nsBufferedStreams.h @@ -624,8 +624,9 @@ NS_DECL_NSIINPUTSTREAMLENGTHCALLBACK nsBufferedInputStream ( ) -{ -} += +default +; static nsresult Create @@ -1022,8 +1023,9 @@ NS_DECL_NSISTREAMBUFFERACCESS nsBufferedOutputStream ( ) -{ -} += +default +; static nsresult Create diff --git a/netwerk/base/nsStreamLoader.cpp b/netwerk/base/nsStreamLoader.cpp index cb1b48ec08f83..9515cac113dfc 100644 --- a/netwerk/base/nsStreamLoader.cpp +++ b/netwerk/base/nsStreamLoader.cpp @@ -147,8 +147,9 @@ nsStreamLoader nsStreamLoader ( ) -{ -} += +default +; NS_IMETHODIMP nsStreamLoader : diff --git a/security/manager/ssl/ScopedNSSTypes.h b/security/manager/ssl/ScopedNSSTypes.h index 563481b0cd69f..0955af1330552 100644 --- a/security/manager/ssl/ScopedNSSTypes.h +++ b/security/manager/ssl/ScopedNSSTypes.h @@ -1196,8 +1196,9 @@ explicit Digest ( ) -{ -} += +default +; static nsresult DigestBuf @@ -1592,8 +1593,9 @@ explicit HMAC ( ) -{ -} += +default +; nsresult Begin ( diff --git a/storage/mozStorageAsyncStatement.cpp b/storage/mozStorageAsyncStatement.cpp index 4c0d6ec13265e..fb1c556bd7d8b 100644 --- a/storage/mozStorageAsyncStatement.cpp +++ b/storage/mozStorageAsyncStatement.cpp @@ -343,8 +343,9 @@ constexpr AsyncStatementClassInfo ( ) -{ -} += +default +; NS_DECL_ISUPPORTS_INHERITED NS_IMETHOD GetInterfaces diff --git a/storage/mozStorageStatement.cpp b/storage/mozStorageStatement.cpp index 4ed583e866b84..add621595fc7b 100644 --- a/storage/mozStorageStatement.cpp +++ b/storage/mozStorageStatement.cpp @@ -362,8 +362,9 @@ constexpr StatementClassInfo ( ) -{ -} += +default +; NS_DECL_ISUPPORTS_INHERITED NS_IMETHOD GetInterfaces diff --git a/toolkit/components/extensions/webrequest/ChannelWrapper.cpp b/toolkit/components/extensions/webrequest/ChannelWrapper.cpp index b3957b0ab8b82..911827cc90afb 100644 --- a/toolkit/components/extensions/webrequest/ChannelWrapper.cpp +++ b/toolkit/components/extensions/webrequest/ChannelWrapper.cpp @@ -809,8 +809,9 @@ public ChannelListHolder ( ) -{ -} += +default +; ~ ChannelListHolder ( diff --git a/tools/profiler/core/memory_hooks.cpp b/tools/profiler/core/memory_hooks.cpp index 19ea2c6449a5f..0f8edc9450e12 100644 --- a/tools/profiler/core/memory_hooks.cpp +++ b/tools/profiler/core/memory_hooks.cpp @@ -1729,8 +1729,9 @@ public Mutex ( ) -{ -} += +default +; void Lock ( @@ -2160,8 +2161,9 @@ public AllocationTracker ( ) -{ -} += +default +; void AddMemoryAddress ( diff --git a/tools/profiler/tests/gtest/LulTestInfrastructure.h b/tools/profiler/tests/gtest/LulTestInfrastructure.h index 74f0876f00a8c..2c2cb3b192298 100644 --- a/tools/profiler/tests/gtest/LulTestInfrastructure.h +++ b/tools/profiler/tests/gtest/LulTestInfrastructure.h @@ -2508,8 +2508,8 @@ virtual Section ( ) -{ -} += +default ; / / diff --git a/xpcom/base/nsTraceRefcnt.cpp b/xpcom/base/nsTraceRefcnt.cpp index c8639ddca6bfd..0a8a75384dae6 100644 --- a/xpcom/base/nsTraceRefcnt.cpp +++ b/xpcom/base/nsTraceRefcnt.cpp @@ -566,8 +566,8 @@ explicit TraceLogMutex ( ) -{ -} += +default ; private : diff --git a/xpcom/io/nsStreamUtils.cpp b/xpcom/io/nsStreamUtils.cpp index 77cb401e20838..b08d338c55dda 100644 --- a/xpcom/io/nsStreamUtils.cpp +++ b/xpcom/io/nsStreamUtils.cpp @@ -2893,8 +2893,9 @@ public nsStreamCopierIB ( ) -{ -} += +default +; virtual ~ nsStreamCopierIB @@ -3119,8 +3120,9 @@ public nsStreamCopierOB ( ) -{ -} += +default +; virtual ~ nsStreamCopierOB