This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix initialization of LazyBool/bool variables m_overwrite/m_overwrite_lazy. NFCI.
ClosedPublic

Authored by mstorsjo on Apr 6 2022, 4:54 AM.

Details

Summary

This silences a GCC warning after
1f7b58f2a50461493f083b2ed807b25e036286f6 / D122680:

lldb/source/Commands/CommandObjectCommands.cpp:1650:22: warning: enum constant in boolean context [-Wint-in-bool-context]
 1650 |   bool m_overwrite = eLazyBoolCalculate;
      |                      ^~~~~~~~~~~~~~~~~~

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 6 2022, 4:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 4:54 AM
mstorsjo requested review of this revision.Apr 6 2022, 4:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 4:54 AM
jingham accepted this revision.Apr 29 2022, 10:34 AM

Thanks for these cleanups. In actual fact, the values set for options in the constructor for CommandOptions are never used, only the values in OptionParsingStarted matter. But it's still confusing to have them be wrong...

This revision is now accepted and ready to land.Apr 29 2022, 10:34 AM
This revision was automatically updated to reflect the committed changes.