[Lldb-commits] [PATCH] D123204: [lldb] Fix initialization of LazyBool/bool variables m_overwrite/m_overwrite_lazy. NFCI.
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 6 04:54:39 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: jingham, labath.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLDB.
This silences a GCC warning after
1f7b58f2a50461493f083b2ed807b25e036286f6 <https://reviews.llvm.org/rG1f7b58f2a50461493f083b2ed807b25e036286f6> / D122680 <https://reviews.llvm.org/D122680>:
lldb/source/Commands/CommandObjectCommands.cpp:1650:22: warning: enum constant in boolean context [-Wint-in-bool-context]
1650 | bool m_overwrite = eLazyBoolCalculate;
| ^~~~~~~~~~~~~~~~~~
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123204
Files:
lldb/source/Commands/CommandObjectCommands.cpp
Index: lldb/source/Commands/CommandObjectCommands.cpp
===================================================================
--- lldb/source/Commands/CommandObjectCommands.cpp
+++ lldb/source/Commands/CommandObjectCommands.cpp
@@ -1480,7 +1480,7 @@
std::string m_class_name;
std::string m_funct_name;
std::string m_short_help;
- LazyBool m_overwrite_lazy;
+ LazyBool m_overwrite_lazy = eLazyBoolCalculate;
ScriptedCommandSynchronicity m_synchronicity =
eScriptedCommandSynchronicitySynchronous;
};
@@ -1647,7 +1647,7 @@
std::string m_cmd_name;
CommandObjectMultiword *m_container = nullptr;
std::string m_short_help;
- bool m_overwrite = eLazyBoolCalculate;
+ bool m_overwrite = false;
ScriptedCommandSynchronicity m_synchronicity =
eScriptedCommandSynchronicitySynchronous;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123204.420789.patch
Type: text/x-patch
Size: 835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220406/fb192c55/attachment.bin>
More information about the lldb-commits
mailing list