================
@@ -68,11 +68,10 @@ class OptionValueSInt64 : public
Cloneable<OptionValueSInt64, OptionValue> {
}
bool SetDefaultValue(int64_t value) {
- if (value >= m_min_value && value <= m_max_value) {
- m_default_value = value;
- return true;
- }
- return false;
+ assert(value >= m_min_value && value <= m_max_value &&
----------------
bulbazord wrote:
A few things I'd like to make sure of:
- What happens in release configurations where assertions are compiled out?
Might this allow you to set an invalid value?
- Can you call `SetDefaultValue` by typing a command in lldb? If so, an
assertion seems like the wrong way of catching this. I ask because this is in
OptionValue, which are involved in parsing commands in LLDB.
https://github.com/llvm/llvm-project/pull/126590
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits