Page MenuHomePhabricator

[lldb] Replace default bodies of special member functions with = default;
AcceptedPublic

Authored by JDevlieghere on Thu, Jun 10, 9:19 AM.

Details

Reviewers
shafik
teemperor
Group Reviewers
Restricted Project
Summary

Replace default bodies of special member functions with = default;

$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix ,

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html

Diff Detail

Event Timeline

JDevlieghere created this revision.Thu, Jun 10, 9:19 AM
JDevlieghere requested review of this revision.Thu, Jun 10, 9:20 AM
JDevlieghere added inline comments.Thu, Jun 10, 9:21 AM
lldb/include/lldb/Interpreter/CommandInterpreter.h
102–103

Interesting, I would've expected clang-format to get this.

LGTM beside some minor formatting bugs that got exacerbated by the clang-tidy run. I got bored of writing 'format' everywhere so I translated every comment into a different language via Google translate. I'll already accept this as this is easy to fix.

lldb/include/lldb/Expression/ExpressionParser.h
45

Please drop that when you land it.

lldb/include/lldb/Target/Process.h
227

format

lldb/include/lldb/Target/StackFrameRecognizer.h
41

please remove that pointy boy

67

and that one too

lldb/source/Interpreter/OptionValueFileColonLine.cpp
24

formaat

lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
219

formato

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
111

formatione

lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
50

goodbye

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h
58

フォーマット

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h
55

хэлбэр хэмжээ

lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h
193

formoup

215

isimo

JDevlieghere marked 12 inline comments as done.

Mi traktis la komentojn

lldb/include/lldb/Expression/ExpressionParser.h
45

Dropped.

lldb/include/lldb/Target/Process.h
227

formatted

lldb/include/lldb/Target/StackFrameRecognizer.h
41

pointy boy gone

67

gone too

lldb/source/Interpreter/OptionValueFileColonLine.cpp
24

doone

lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
219

hecho

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
111

factum

lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
50

ciao

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h
58

完了

lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h
55

хэлбэртэй, хэмжээтэй

lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h
193

doune

215

isimo sixazululiwe

teemperor accepted this revision.Mon, Jun 14, 3:14 AM

Not sure what happened to my accept, but I'll LGTM this again. Thanks!

This revision is now accepted and ready to land.Mon, Jun 14, 3:14 AM

I am sure I could find a bunch of other ends and odds but perhaps you have other checks that will cover these coming up.

lldb/include/lldb/Core/ThreadSafeValue.h
21

We can also default this as well, we can use member initializers for these values.

lldb/include/lldb/Core/UserSettingsController.h
35

I believe this should be defaultable as well.

lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
137

It looks like these members somehow got missed in the last PR that changed to use in class member initializers.

lldb/include/lldb/Host/HostNativeProcessBase.h
27

This looks like another case that got missed in the last PR to change to use in class member init.

lldb/include/lldb/Host/HostNativeThreadBase.h
30

I think we can switch this to =default as well.

48

lldb::thread_t m_thread = LLDB_INVALID_HOST_THREAD