[lldb/CommandInterpreter] Fix typo in CommandInterpreterResult::IsResult
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 1 May 2020 19:03:56 +0000 (12:03 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 1 May 2020 19:07:21 +0000 (12:07 -0700)
A missing `=` turned a comparison into an assignment.

lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/source/Interpreter/CommandInterpreter.cpp

index dbe5c18..a0a9bcb 100644 (file)
@@ -38,7 +38,7 @@ public:
   lldb::CommandInterpreterResult GetResult() const { return m_result; }
 
   bool IsResult(lldb::CommandInterpreterResult result) {
-    return m_result = result;
+    return m_result == result;
   }
 
 protected:
index d765cb7..3f727e8 100644 (file)
@@ -116,7 +116,7 @@ CommandInterpreter::CommandInterpreter(Debugger &debugger,
       m_skip_lldbinit_files(false), m_skip_app_init_files(false),
       m_command_io_handler_sp(), m_comment_char('#'),
       m_batch_command_mode(false), m_truncation_warning(eNoTruncation),
-      m_command_source_depth(0) {
+      m_command_source_depth(0), m_result() {
   SetEventName(eBroadcastBitThreadShouldExit, "thread-should-exit");
   SetEventName(eBroadcastBitResetPrompt, "reset-prompt");
   SetEventName(eBroadcastBitQuitCommandReceived, "quit");