This revision was automatically updated to reflect the committed changes. Closed by commit rL255499: Add failure paths to a few JSONNumber members (authored by omjavaid).
Changed prior to commit: http://reviews.llvm.org/D15355?vs=42706&id=42712#toc Repository: rL LLVM http://reviews.llvm.org/D15355 Files: lldb/trunk/include/lldb/Utility/JSON.h lldb/trunk/source/Utility/JSON.cpp Index: lldb/trunk/include/lldb/Utility/JSON.h =================================================================== --- lldb/trunk/include/lldb/Utility/JSON.h +++ lldb/trunk/include/lldb/Utility/JSON.h @@ -145,7 +145,7 @@ uint64_t GetAsUnsigned() const; - uint64_t + int64_t GetAsSigned() const; double Index: lldb/trunk/source/Utility/JSON.cpp =================================================================== --- lldb/trunk/source/Utility/JSON.cpp +++ lldb/trunk/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: lldb/trunk/include/lldb/Utility/JSON.h =================================================================== --- lldb/trunk/include/lldb/Utility/JSON.h +++ lldb/trunk/include/lldb/Utility/JSON.h @@ -145,7 +145,7 @@ uint64_t GetAsUnsigned() const; - uint64_t + int64_t GetAsSigned() const; double Index: lldb/trunk/source/Utility/JSON.cpp =================================================================== --- lldb/trunk/source/Utility/JSON.cpp +++ lldb/trunk/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
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits