================
@@ -3141,15 +3141,15 @@ lldb::ValueObjectSP
ValueObject::CastToBasicType(CompilerType type) {
val_byte_size = temp.value();
if (is_pointer) {
+ if (!type.IsInteger()) {
+ m_error.SetErrorString("target type must be an integer");
+ return GetSP();
+ }
if (!type.IsBoolean() && type_byte_size < val_byte_size) {
----------------
jimingham wrote:
That's better, but now the `type.IsBoolean` is entirely pointless, since you
would never get to this code in that case.
https://github.com/llvm/llvm-project/pull/87197
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits