[lldb] Fix OptionValueFileColonLine to compile with MSVC
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 21 Jul 2020 04:25:32 +0000 (21:25 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 21 Jul 2020 04:25:33 +0000 (21:25 -0700)
This should fix error C4716:
'lldb_private::OptionValueFileColonLine::Clear': must return a value

lldb/include/lldb/Interpreter/OptionValueFileColonLine.h

index 6285c03afa1490e5860938f531aaeeaa28160a11..3c0ccb2d2fa273da8cd714dc162555eb8c1c86bb 100644 (file)
@@ -1,4 +1,4 @@
-//===-- OptionValueFileColonLine.h -----------------------------------*- C++ -*-===//
+//===-- OptionValueFileColonLine.h ------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -38,7 +38,8 @@ public:
   bool Clear() override {
     m_file_spec.Clear();
     m_line_number = LLDB_INVALID_LINE_NUMBER;
-    m_column_number = 0;
+    m_column_number = LLDB_INVALID_COLUMN_NUMBER;
+    return true;
   }
 
   lldb::OptionValueSP DeepCopy() const override;
@@ -49,7 +50,7 @@ public:
   FileSpec &GetFileSpec() { return m_file_spec; }
   uint32_t GetLineNumber() { return m_line_number; }
   uint32_t GetColumnNumber() { return m_column_number; }
-  
+
   void SetCompletionMask(uint32_t mask) { m_completion_mask = mask; }
 
 protected: