[Lldb-commits] [lldb] [lldb] Mark enum types as scalar in clang typesystem (PR #192711)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 13 00:53:42 PDT 2026


================
@@ -3202,7 +3202,7 @@ lldb::ValueObjectSP ValueObject::CastToBasicType(CompilerType type) {
   }
 
   if (type.IsInteger()) {
-    if (!is_scalar || is_integer) {
+    if ((is_enum && is_scalar) || !is_scalar || is_integer) {
----------------
Michael137 wrote:

I wonder if this condition should just be `is_integer || is_enum`. I'm not sure why scalars have anything to do with it here TBH. Looks like this is just a cast from integer->integer/enum type, and it was written this way because `!is_scalar` used to imply `is_enum`. What happens if you simplify the condition to that `is_integer || is_enum`?

https://github.com/llvm/llvm-project/pull/192711


More information about the lldb-commits mailing list