[Lldb-commits] [PATCH] D15355: Add failure paths to a few JSONNumber members
Muhammad Omair Javaid via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 14 05:27:06 PST 2015
omjavaid updated this revision to Diff 42706.
omjavaid added a comment.
Sorry @tberghammer there was corruption in my setup showing changes which i just made internally.
I have updated this diff as per suggestions.
LGTM?
http://reviews.llvm.org/D15355
Files:
include/lldb/Utility/JSON.h
source/Utility/JSON.cpp
Index: source/Utility/JSON.cpp
===================================================================
--- source/Utility/JSON.cpp
+++ source/Utility/JSON.cpp
@@ -12,6 +12,7 @@
#include <limits.h>
#include "lldb/Core/StreamString.h"
#include "lldb/Host/StringConvert.h"
+#include "llvm/Support/ErrorHandling.h"
using namespace lldb_private;
@@ -72,9 +73,10 @@
case DataType::Double:
return (uint64_t)m_data.m_double;
}
+ llvm_unreachable("Unhandled data type");
}
-uint64_t
+int64_t
JSONNumber::GetAsSigned() const
{
switch (m_data_type)
@@ -86,6 +88,7 @@
case DataType::Double:
return (int64_t)m_data.m_double;
}
+ llvm_unreachable("Unhandled data type");
}
double
@@ -100,6 +103,7 @@
case DataType::Double:
return m_data.m_double;
}
+ llvm_unreachable("Unhandled data type");
}
void
Index: include/lldb/Utility/JSON.h
===================================================================
--- include/lldb/Utility/JSON.h
+++ include/lldb/Utility/JSON.h
@@ -145,7 +145,7 @@
uint64_t
GetAsUnsigned() const;
- uint64_t
+ int64_t
GetAsSigned() const;
double
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15355.42706.patch
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151214/9385fc83/attachment.bin>
More information about the lldb-commits
mailing list