https://github.com/cmtice updated 
https://github.com/llvm/llvm-project/pull/170332

>From 8aab34e35f8622422e1b82147d059b1b6d1ce161 Mon Sep 17 00:00:00 2001
From: Caroline Tice <[email protected]>
Date: Tue, 2 Dec 2025 09:16:01 -0800
Subject: [PATCH 1/5] [LLDB] Add type casting to DIL, part 2 or 3

This PR implements the actual type casting part. With this, type
casting to builtin types should work. The third PR, which will be
put up after this one is merged, will expand the type name parsing
to allow casting to user-defined types.
---
 lldb/include/lldb/ValueObject/DILAST.h        |   7 +
 lldb/include/lldb/ValueObject/DILEval.h       |   5 +
 lldb/source/ValueObject/DILEval.cpp           | 265 +++++++++++++++++-
 .../LocalVars/TestFrameVarDILLocalVars.py     |   1 +
 .../frame/var-dil/expr/Casts/Makefile         |   6 +
 .../var-dil/expr/Casts/TestFrameVarDILCast.py | 213 ++++++++++++++
 .../frame/var-dil/expr/Casts/main.cpp         |  54 ++++
 7 files changed, 547 insertions(+), 4 deletions(-)
 create mode 100644 lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile
 create mode 100644 
lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
 create mode 100644 lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp

diff --git a/lldb/include/lldb/ValueObject/DILAST.h 
b/lldb/include/lldb/ValueObject/DILAST.h
index 9fda0c798ec4e..3a18172852b5e 100644
--- a/lldb/include/lldb/ValueObject/DILAST.h
+++ b/lldb/include/lldb/ValueObject/DILAST.h
@@ -46,6 +46,13 @@ enum class CastKind {
   eNone,        ///< Type promotion casting
 };
 
+/// Promotions allowed for type casts in DIL.
+enum CastPromoKind {
+  eArithmetic,
+  ePointer,
+  eNone,
+};
+
 /// Forward declaration, for use in DIL AST nodes. Definition is at the very
 /// end of this file.
 class Visitor;
diff --git a/lldb/include/lldb/ValueObject/DILEval.h 
b/lldb/include/lldb/ValueObject/DILEval.h
index 2db45a7c37314..8df12ce450db7 100644
--- a/lldb/include/lldb/ValueObject/DILEval.h
+++ b/lldb/include/lldb/ValueObject/DILEval.h
@@ -71,6 +71,11 @@ class Interpreter : Visitor {
                   std::shared_ptr<ExecutionContextScope> ctx,
                   const IntegerLiteralNode *literal);
 
+  llvm::Expected<CompilerType>
+  VerifyCastType(lldb::ValueObjectSP &operand, CompilerType &op_type,
+                 CompilerType target_type, CastPromoKind &promo_kind,
+                 CastKind &cast_kind, int location);
+
   // Used by the interpreter to create objects, perform casts, etc.
   lldb::TargetSP m_target;
   llvm::StringRef m_expr;
diff --git a/lldb/source/ValueObject/DILEval.cpp 
b/lldb/source/ValueObject/DILEval.cpp
index dc0d93d242739..453152554ac62 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -21,6 +21,42 @@
 
 namespace lldb_private::dil {
 
+lldb::ValueObjectSP
+GetDynamicOrSyntheticValue(lldb::ValueObjectSP in_valobj_sp,
+                           lldb::DynamicValueType use_dynamic,
+                           bool use_synthetic) {
+  Status error;
+  if (!in_valobj_sp) {
+    error = Status("invalid value object");
+    return in_valobj_sp;
+  }
+  lldb::ValueObjectSP value_sp = in_valobj_sp;
+  Target *target = value_sp->GetTargetSP().get();
+  // If this ValueObject holds an error, then it is valuable for that.
+  if (value_sp->GetError().Fail())
+    return value_sp;
+
+  if (!target)
+    return lldb::ValueObjectSP();
+
+  if (use_dynamic != lldb::eNoDynamicValues) {
+    lldb::ValueObjectSP dynamic_sp = value_sp->GetDynamicValue(use_dynamic);
+    if (dynamic_sp)
+      value_sp = dynamic_sp;
+  }
+
+  if (use_synthetic) {
+    lldb::ValueObjectSP synthetic_sp = value_sp->GetSyntheticValue();
+    if (synthetic_sp)
+      value_sp = synthetic_sp;
+  }
+
+  if (!value_sp)
+    error = Status("invalid value object");
+
+  return value_sp;
+}
+
 static llvm::Expected<lldb::TypeSystemSP>
 GetTypeSystemFromCU(std::shared_ptr<ExecutionContextScope> ctx) {
   auto stack_frame = ctx->CalculateStackFrame();
@@ -740,16 +776,237 @@ Interpreter::Visit(const BooleanLiteralNode *node) {
   return ValueObject::CreateValueObjectFromBool(m_target, value, "result");
 }
 
+llvm::Expected<CompilerType> Interpreter::VerifyCastType(
+    lldb::ValueObjectSP &operand, CompilerType &op_type,
+    CompilerType target_type, CastPromoKind &promo_kind,
+    CastKind &cast_kind, int location) {
+
+  promo_kind = CastPromoKind::eNone;
+  if (op_type.IsReferenceType())
+    op_type = op_type.GetNonReferenceType();
+  if (target_type.IsScalarType()) {
+    if (op_type.IsArrayType()) {
+      // Do array-to-pointer conversion.
+      CompilerType deref_type =
+          op_type.IsReferenceType() ? op_type.GetNonReferenceType() : op_type;
+      CompilerType result_type =
+          deref_type.GetArrayElementType(nullptr).GetPointerType();
+      uint64_t addr = operand->GetLoadAddress();
+      llvm::StringRef name = operand->GetName().GetStringRef();
+      operand = ValueObject::CreateValueObjectFromAddress(
+          name, addr, m_exe_ctx_scope, result_type, /*do_deref=*/false);
+      op_type = result_type;
+    }
+
+    if (op_type.IsPointerType() || op_type.IsNullPtrType()) {
+      // Cast from pointer to float/double is not allowed.
+      if (target_type.IsFloat()) {
+        std::string errMsg = llvm::formatv(
+            "Cast from {0} to {1} is not allowed",
+            op_type.TypeDescription(), target_type.TypeDescription());
+        return llvm::make_error<DILDiagnosticError>(
+            m_expr, std::move(errMsg), location,
+            op_type.TypeDescription().length());
+      }
+      // Casting pointer to bool is valid. Otherwise check if the result type
+      // is at least as big as the pointer size.
+      uint64_t type_byte_size = 0;
+      uint64_t rhs_type_byte_size = 0;
+      if (auto temp = target_type.GetByteSize(m_exe_ctx_scope.get()))
+        // type_byte_size = temp.value();
+        type_byte_size = *temp;
+      if (auto temp = op_type.GetByteSize(m_exe_ctx_scope.get()))
+        // rhs_type_byte_size = temp.value();
+        rhs_type_byte_size = *temp;
+      if (!target_type.IsBoolean() && type_byte_size < rhs_type_byte_size) {
+        std::string errMsg = llvm::formatv(
+            "cast from pointer to smaller type {0} loses information",
+            target_type.TypeDescription());
+        return llvm::make_error<DILDiagnosticError>(
+            m_expr, std::move(errMsg), location,
+            op_type.TypeDescription().length());
+      }
+    } else if (!op_type.IsScalarType() && !op_type.IsEnumerationType()) {
+      // Otherwise accept only arithmetic types and enums.
+      std::string errMsg = llvm::formatv(
+          "cannot convert {0} to {1} without a conversion operator",
+          op_type.TypeDescription(), target_type.TypeDescription());
+
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          op_type.TypeDescription().length());
+    }
+    promo_kind = CastPromoKind::eArithmetic;
+  } else if (target_type.IsEnumerationType()) {
+    // Cast to enum type.
+    if (!op_type.IsScalarType() && !op_type.IsEnumerationType()) {
+      std::string errMsg = llvm::formatv(
+          "Cast from {0} to {1} is not allowed",
+          op_type.TypeDescription(), target_type.TypeDescription());
+
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          op_type.TypeDescription().length());
+    }
+    cast_kind = CastKind::eEnumeration;
+
+  } else if (target_type.IsPointerType()) {
+    if (!op_type.IsInteger() && !op_type.IsEnumerationType() &&
+        !op_type.IsArrayType() && !op_type.IsPointerType() &&
+        !op_type.IsNullPtrType()) {
+      std::string errMsg = llvm::formatv(
+          "cannot cast from type {0} to pointer type {1}",
+          op_type.TypeDescription(), target_type.TypeDescription());
+
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          op_type.TypeDescription().length());
+    }
+    promo_kind = CastPromoKind::ePointer;
+
+  } else if (target_type.IsNullPtrType()) {
+    // Cast to nullptr type.
+    bool is_signed;
+    if (!target_type.IsNullPtrType() &&
+        (!operand->IsIntegerType(is_signed) ||
+         (is_signed && operand->GetValueAsSigned(0) != 0) ||
+         (!is_signed && operand->GetValueAsUnsigned(0) != 0))) {
+      std::string errMsg = llvm::formatv(
+          "Cast from {0} to {1} is not allowed",
+          op_type.TypeDescription(), target_type.TypeDescription());
+
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          op_type.TypeDescription().length());
+    }
+    cast_kind = CastKind::eNullptr;
+
+  } else if (target_type.IsReferenceType()) {
+    // Cast to a reference type.
+    cast_kind = CastKind::eReference;
+  } else {
+    // Unsupported cast.
+    std::string errMsg =
+        llvm::formatv("casting of {0} to {1} is not implemented yet",
+                      op_type.TypeDescription(), 
target_type.TypeDescription());
+    return llvm::make_error<DILDiagnosticError>(
+        m_expr, std::move(errMsg), location,
+        op_type.TypeDescription().length());
+  }
+
+  return target_type;
+}
+
 llvm::Expected<lldb::ValueObjectSP> Interpreter::Visit(const CastNode *node) {
   auto operand_or_err = Evaluate(node->GetOperand());
   if (!operand_or_err)
     return operand_or_err;
 
   lldb::ValueObjectSP operand = *operand_or_err;
-  // Don't actually do the cast for now -- that code will be added later.
-  // For now just return an error message.
-  return llvm::make_error<DILDiagnosticError>(
-      m_expr, "Type casting is not supported here.", node->GetLocation());
+  CompilerType op_type = operand->GetCompilerType();
+  CastKind cast_kind = CastKind::eNone;
+  CastPromoKind promo_kind = CastPromoKind::eNone;
+
+  auto type_or_err =
+      VerifyCastType(operand, op_type, node->GetType(), promo_kind,
+                     cast_kind, node->GetLocation());
+  if (!type_or_err)
+    return type_or_err.takeError();
+
+  CompilerType target_type = *type_or_err;
+  if (op_type.IsReferenceType()) {
+    Status error;
+    operand = operand->Dereference(error);
+    if (error.Fail())
+      return llvm::make_error<DILDiagnosticError>(m_expr, error.AsCString(),
+                                                  node->GetLocation());
+  }
+
+  switch (cast_kind) {
+  case CastKind::eEnumeration: {
+    if (!target_type.IsEnumerationType()) {
+      std::string errMsg = "invalid ast: target type should be an 
enumeration.";
+      return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                                  node->GetLocation());
+    }
+    if (op_type.IsFloat())
+      return operand->CastToEnumType(target_type);
+
+    if (op_type.IsInteger() || op_type.IsEnumerationType())
+      return operand->CastToEnumType(target_type);
+
+    std::string errMsg =
+        "invalid ast: operand is not convertible to enumeration type";
+    return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                                node->GetLocation());
+    // return error.ToError();
+  }
+  case CastKind::eNullptr: {
+    if (target_type.GetCanonicalType().GetBasicTypeEnumeration() !=
+        lldb::eBasicTypeNullPtr) {
+      std::string errMsg = "invalid ast: target type should be a nullptr_t.";
+      return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                                  node->GetLocation());
+    }
+    return ValueObject::CreateValueObjectFromNullptr(m_target, target_type,
+                                                     "result");
+  }
+  case CastKind::eReference: {
+    lldb::ValueObjectSP operand_sp(
+        GetDynamicOrSyntheticValue(operand, m_use_dynamic, m_use_synthetic));
+    return lldb::ValueObjectSP(
+        operand_sp->Cast(target_type.GetNonReferenceType()));
+  }
+  case CastKind::eNone: {
+    switch (promo_kind) {
+    case CastPromoKind::eArithmetic: {
+      if (target_type.GetCanonicalType().GetBasicTypeEnumeration() ==
+          lldb::eBasicTypeInvalid) {
+        std::string errMsg = "invalid ast: target type should be a basic 
type.";
+        return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                                    node->GetLocation());
+      }
+      // Pick an appropriate cast.
+      if (op_type.IsPointerType() || op_type.IsNullPtrType()) {
+        return operand->CastToBasicType(target_type);
+      }
+      if (op_type.IsScalarType()) {
+        return operand->CastToBasicType(target_type);
+      }
+      if (op_type.IsEnumerationType()) {
+        return operand->CastToBasicType(target_type);
+      }
+      std::string errMsg =
+          "invalid ast: operand is not convertible to arithmetic type";
+      return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                                  node->GetLocation());
+    }
+    case CastPromoKind::ePointer: {
+      if (!target_type.IsPointerType()) {
+        std::string errMsg = "invalid ast: target type should be a pointer";
+        return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                                    node->GetLocation());
+      }
+      uint64_t addr =
+          op_type.IsArrayType()
+              ? operand->GetLoadAddress()
+              : (op_type.IsSigned() ? operand->GetValueAsSigned(0)
+                                    : operand->GetValueAsUnsigned(0));
+      llvm::StringRef name = "result";
+      ExecutionContext exe_ctx(m_target.get(), false);
+      return ValueObject::CreateValueObjectFromAddress(name, addr, exe_ctx,
+                                                       target_type,
+                                                       /* do_deref */ false);
+    }
+    case CastPromoKind::eNone: {
+      return lldb::ValueObjectSP();
+    }
+    } // switch promo_kind
+  } // case CastKind::eNone
+  } // switch cast_kind
+  std::string errMsg = "invalid ast: unexpected c-style cast kind";
+  return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
+                                              node->GetLocation());
 }
 
 } // namespace lldb_private::dil
diff --git 
a/lldb/test/API/commands/frame/var-dil/basics/LocalVars/TestFrameVarDILLocalVars.py
 
b/lldb/test/API/commands/frame/var-dil/basics/LocalVars/TestFrameVarDILLocalVars.py
index 0f6618fe47984..85899caaa7433 100644
--- 
a/lldb/test/API/commands/frame/var-dil/basics/LocalVars/TestFrameVarDILLocalVars.py
+++ 
b/lldb/test/API/commands/frame/var-dil/basics/LocalVars/TestFrameVarDILLocalVars.py
@@ -28,4 +28,5 @@ def test_frame_var(self):
         self.expect_var_path("a", value="1")
         self.expect_var_path("b", value="2")
         self.expect_var_path("c", value="'\\xfd'")
+        self.expect_var_path("(int)c", value="-3")
         self.expect_var_path("s", value="4")
diff --git a/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile
new file mode 100644
index 0000000000000..0165eb73f3073
--- /dev/null
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile
@@ -0,0 +1,6 @@
+CXX_SOURCES := main.cpp
+#CXXFLAGS_EXTRAS := -std=c++14
+
+USE_LIBSTDCPP := 1
+
+include Makefile.rules
diff --git 
a/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
new file mode 100644
index 0000000000000..2e358ed923732
--- /dev/null
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
@@ -0,0 +1,213 @@
+"""
+Make sure 'frame var' using DIL parser/evaultor works for C-Style casts.
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from lldbsuite.test import lldbutil
+
+import os
+import shutil
+import time
+
+
+class TestFrameVarDILCast(TestBase):
+    def test_type_cast(self):
+        self.build()
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+            self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")
+        )
+
+        self.runCmd("settings set target.experimental.use-DIL true")
+
+        # TestCastBUiltins
+
+        self.expect_var_path("(int)1", value="1", type="int")
+        self.expect_var_path("(long long)1", value="1", type="long long")
+        self.expect_var_path("(unsigned long)1", value="1", type="unsigned 
long")
+        self.expect_var_path("(char*)1", value="0x0000000000000001", 
type="char *")
+        self.expect_var_path(
+            "(long long**)1", value="0x0000000000000001", type="long long **"
+        )
+
+        self.expect(
+            "frame variable '(long&*)1'",
+            error=True,
+            substrs=[
+                "'type name' declared as a pointer to a reference of type 
'long &'"
+            ],
+        )
+
+        self.expect(
+            "frame variable '(long& &)1'",
+            error=True,
+            substrs=["type name declared as a reference to a reference"],
+        )
+
+        self.expect(
+            "frame variable '(long 1)1'",
+            error=True,
+            substrs=["expected 'r_paren', got: <'1' (integer_constant)>"],
+        )
+
+        # TestCastBasicType
+
+        # Test with integer literals.
+        self.expect_var_path("(char)1", type="char", value="'\\x01'")
+        self.expect_var_path("(long long)1", type="long long", value="1")
+        self.expect_var_path("(short)65534", type="short", value="-2")
+        self.expect_var_path(
+            "(unsigned short)100000", type="unsigned short", value="34464"
+        )
+        self.expect_var_path("(int)false", type="int", value="0")
+        self.expect_var_path("(int)true", type="int", value="1")
+        self.expect_var_path("(float)1", type="float", value="1")
+        self.expect_var_path("(float)1.1", type="float", value="1.10000002")
+        self.expect_var_path("(float)1.1f", type="float", value="1.10000002")
+        self.expect_var_path("(float)false", type="float", value="0")
+        self.expect_var_path("(float)true", type="float", value="1")
+        self.expect_var_path("(double)1", type="double", value="1")
+        self.expect_var_path("(double)1.1", type="double", 
value="1.1000000000000001")
+        self.expect_var_path("(double)1.1f", type="double", 
value="1.1000000238418579")
+        self.expect_var_path("(double)false", type="double", value="0")
+        self.expect_var_path("(double)true", type="double", value="1")
+        self.expect_var_path("(int)1.1", type="int", value="1")
+        self.expect_var_path("(int)1.1f", type="int", value="1")
+        self.expect_var_path("(long)1.1", type="long", value="1")
+        self.expect_var_path("(bool)0", type="bool", value="false")
+        self.expect_var_path("(bool)0.0", type="bool", value="false")
+        self.expect_var_path("(bool)0.0f", type="bool", value="false")
+        self.expect_var_path("(bool)3", type="bool", value="true")
+
+        self.expect(
+            "frame variable '&(int)1'",
+            error=True,
+            substrs=["'result' doesn't have a valid address"],
+        )
+
+        # Test with variables.
+        self.expect_var_path("(char)a", type="char", value="'\\x01'")
+        self.expect_var_path("(unsigned char)na", type="unsigned char", 
value="'\\xff'")
+        self.expect_var_path("(short)na", type="short", value="-1")
+        self.expect_var_path("(long long)a", type="long long", value="1")
+        self.expect_var_path("(float)a", type="float", value="1")
+        self.expect_var_path("(float)f", type="float", value="1.10000002")
+        self.expect_var_path("(double)f", type="double", 
value="1.1000000238418579")
+        self.expect_var_path("(int)f", type="int", value="1")
+        self.expect_var_path("(long)f", type="long", value="1")
+        self.expect_var_path("(bool)finf", type="bool", value="true")
+        self.expect_var_path("(bool)fnan", type="bool", value="true")
+        self.expect_var_path("(bool)fsnan", type="bool", value="true")
+        self.expect_var_path("(bool)fmax", type="bool", value="true")
+        self.expect_var_path("(bool)fdenorm", type="bool", value="true")
+        self.expect(
+            "frame variable '(int)ns_foo_'",
+            error=True,
+            substrs=["cannot convert 'ns::Foo' to 'int' without a conversion 
operator"],
+        )
+
+        self.expect_var_path("(int)myint_", type="int", value="1")
+        self.expect_var_path("(int)ns_myint_", type="int", value="2")
+        self.expect_var_path("(long long)myint_", type="long long", value="1")
+        self.expect_var_path("(long long)ns_myint_", type="long long", 
value="2")
+
+        # Test with pointers and arrays.
+        self.expect_var_path("(long long)ap", type="long long")
+        self.expect_var_path("(unsigned long long)vp", type="unsigned long 
long")
+        self.expect_var_path("(long long)arr", type="long long")
+        self.expect_var_path("(bool)ap", type="bool", value="true")
+        self.expect_var_path("(bool)(int*)0x00000000", type="bool", 
value="false")
+        self.expect_var_path("(bool)arr", type="bool", value="true")
+        self.expect(
+            "frame variable '(char)ap'",
+            error=True,
+            substrs=["cast from pointer to smaller type 'char' loses 
information"],
+        )
+        Is32Bit = False
+        if self.target().GetAddressByteSize() == 4:
+            Is32Bit = True
+
+        if Is32Bit:
+            self.expect("frame variable '(int)arr'", type="int")
+        else:
+            self.expect(
+                "frame variable '(int)arr'",
+                error=True,
+                substrs=["cast from pointer to smaller type 'int' loses 
information"],
+            )
+
+        self.expect(
+            "frame variable '(float)ap'",
+            error=True,
+            substrs=["Cast from 'int *' to 'float' is not allowed"],
+        )
+        self.expect(
+            "frame variable '(float)arr'",
+            error=True,
+            substrs=["Cast from 'int *' to 'float' is not allowed"],
+        )
+
+        # TestCastPointer
+        self.expect_var_path("(void*)&a", type="void *")
+        self.expect_var_path("(void*)ap", type="void *")
+        self.expect_var_path("(long long*)vp", type="long long *")
+        self.expect_var_path("(short int*)vp", type="short *")
+        self.expect_var_path("(unsigned long long*)vp", type="unsigned long 
long *")
+        self.expect_var_path("(unsigned short int*)vp", type="unsigned short 
*")
+
+        if Is32Bit:
+            self.expect_var_path("(void*)0", type="void *", value="0x00000000")
+            self.expect_var_path("(void*)1", type="void *", value="0x00000001")
+            self.expect_var_path("(void*)a", type="void *", value="0x00000001")
+            self.expect_var_path("(void*)na", type="void *", 
value="0xffffffff")
+        else:
+            self.expect_var_path("(void*)0", type="void *", 
value="0x0000000000000000")
+            self.expect_var_path("(void*)1", type="void *", 
value="0x0000000000000001")
+            self.expect_var_path("(void*)a", type="void *", 
value="0x0000000000000001")
+            self.expect_var_path("(void*)na", type="void *", 
value="0xffffffffffffffff")
+
+        self.expect_var_path("(int*&)ap", type="int *")
+
+        self.expect(
+            "frame variable '(char*) 1.0'",
+            error=True,
+            substrs=["cannot cast from type 'double' to pointer type 'char 
*'"],
+        )
+
+        self.expect_var_path("*(int*)(void*)ap", type="int", value="1")
+
+        self.expect(
+            "frame variable '(int& &)ap'",
+            error=True,
+            substrs=["type name declared as a reference to a reference"],
+        )
+        self.expect(
+            "frame variable '(int&*)ap'",
+            error=True,
+            substrs=[
+                "'type name' declared as a pointer to a reference of type 'int 
&'"
+            ],
+        )
+
+        if Is32Bit:
+            self.expect_var_path("(void *)0", type="void *", 
value="0x00000000")
+        else:
+            self.expect_var_path("(void *)0", type="void *", 
value="0x0000000000000000")
+
+        # TestCastArray
+        self.expect_var_path("(int*)arr_1d", type="int *")
+        self.expect_var_path("(char*)arr_1d", type="char *")
+        self.expect_var_path("((char*)arr_1d)[0]", type="char", 
value="'\\x01'")
+        self.expect_var_path("((char*)arr_1d)[1]", type="char", value="'\\0'")
+
+        # 2D arrays.
+        self.expect_var_path("(int*)arr_2d", type="int *")
+        self.expect_var_path("((int*)arr_2d)[1]", type="int", value="2")
+        self.expect_var_path("((int*)arr_2d)[2]", type="int", value="3")
+        self.expect_var_path("((int*)arr_2d[1])[1]", type="int", value="5")
+
+        # TestCastReference
+        self.expect_var_path("(int&)arr_1d[0]", type="int", value="1")
+        self.expect_var_path("(int&)arr_1d[1]", type="int", value="2")
+        self.expect_var_path("&(int&)arr_1d", type="int *")
diff --git a/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
new file mode 100644
index 0000000000000..f54e58f36a9cb
--- /dev/null
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
@@ -0,0 +1,54 @@
+// Type Casting, main.cpp
+
+#include <cstdarg>
+#include <cstddef>
+#include <cstdint>
+#include <cstdlib>
+#include <limits>
+#include <memory>
+#include <string>
+
+
+namespace ns {
+
+typedef int myint;
+
+class Foo {};
+
+} // namespace ns
+
+
+int main(int argc, char **argv) {
+  int a = 1;
+  int *ap = &a;
+  void *vp = &a;
+  int arr[2] = {1, 2};
+
+  int na = -1;
+  float f = 1.1;
+
+  typedef int myint;
+  std::nullptr_t std_nullptr_t = nullptr;
+  bool found_it = false;
+  if (std_nullptr_t) {
+    found_it = true;
+  } else {
+    found_it = (bool)0;
+  }
+
+  myint myint_ = 1;
+  ns::myint ns_myint_ = 2;
+  ns::Foo ns_foo_;
+  ns::Foo *ns_foo_ptr_ = &ns_foo_;
+
+  float finf = std::numeric_limits<float>::infinity();
+  float fnan = std::numeric_limits<float>::quiet_NaN();
+  float fsnan = std::numeric_limits<float>::signaling_NaN();
+  float fmax = std::numeric_limits<float>::max();
+  float fdenorm = std::numeric_limits<float>::denorm_min();
+
+  int arr_1d[] = {1, 2, 3, 4};
+  int arr_2d[2][3] = {{1, 2, 3}, {4, 5, 6}};
+
+  return 0; // Set a breakpoint here
+}

>From 90912276edc48fe8f1f87a72cf122f0a7a518c89 Mon Sep 17 00:00:00 2001
From: Caroline Tice <[email protected]>
Date: Tue, 2 Dec 2025 09:26:57 -0800
Subject: [PATCH 2/5] Fix clang format issues.

---
 lldb/source/ValueObject/DILEval.cpp           | 29 +++++++++----------
 .../frame/var-dil/expr/Casts/main.cpp         |  2 --
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/lldb/source/ValueObject/DILEval.cpp 
b/lldb/source/ValueObject/DILEval.cpp
index 453152554ac62..28175b3f6428e 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -776,10 +776,10 @@ Interpreter::Visit(const BooleanLiteralNode *node) {
   return ValueObject::CreateValueObjectFromBool(m_target, value, "result");
 }
 
-llvm::Expected<CompilerType> Interpreter::VerifyCastType(
-    lldb::ValueObjectSP &operand, CompilerType &op_type,
-    CompilerType target_type, CastPromoKind &promo_kind,
-    CastKind &cast_kind, int location) {
+llvm::Expected<CompilerType>
+Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, CompilerType 
&op_type,
+                            CompilerType target_type, CastPromoKind 
&promo_kind,
+                            CastKind &cast_kind, int location) {
 
   promo_kind = CastPromoKind::eNone;
   if (op_type.IsReferenceType())
@@ -802,8 +802,8 @@ llvm::Expected<CompilerType> Interpreter::VerifyCastType(
       // Cast from pointer to float/double is not allowed.
       if (target_type.IsFloat()) {
         std::string errMsg = llvm::formatv(
-            "Cast from {0} to {1} is not allowed",
-            op_type.TypeDescription(), target_type.TypeDescription());
+            "Cast from {0} to {1} is not allowed", op_type.TypeDescription(),
+            target_type.TypeDescription());
         return llvm::make_error<DILDiagnosticError>(
             m_expr, std::move(errMsg), location,
             op_type.TypeDescription().length());
@@ -840,9 +840,9 @@ llvm::Expected<CompilerType> Interpreter::VerifyCastType(
   } else if (target_type.IsEnumerationType()) {
     // Cast to enum type.
     if (!op_type.IsScalarType() && !op_type.IsEnumerationType()) {
-      std::string errMsg = llvm::formatv(
-          "Cast from {0} to {1} is not allowed",
-          op_type.TypeDescription(), target_type.TypeDescription());
+      std::string errMsg = llvm::formatv("Cast from {0} to {1} is not allowed",
+                                         op_type.TypeDescription(),
+                                         target_type.TypeDescription());
 
       return llvm::make_error<DILDiagnosticError>(
           m_expr, std::move(errMsg), location,
@@ -871,9 +871,9 @@ llvm::Expected<CompilerType> Interpreter::VerifyCastType(
         (!operand->IsIntegerType(is_signed) ||
          (is_signed && operand->GetValueAsSigned(0) != 0) ||
          (!is_signed && operand->GetValueAsUnsigned(0) != 0))) {
-      std::string errMsg = llvm::formatv(
-          "Cast from {0} to {1} is not allowed",
-          op_type.TypeDescription(), target_type.TypeDescription());
+      std::string errMsg = llvm::formatv("Cast from {0} to {1} is not allowed",
+                                         op_type.TypeDescription(),
+                                         target_type.TypeDescription());
 
       return llvm::make_error<DILDiagnosticError>(
           m_expr, std::move(errMsg), location,
@@ -907,9 +907,8 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
   CastKind cast_kind = CastKind::eNone;
   CastPromoKind promo_kind = CastPromoKind::eNone;
 
-  auto type_or_err =
-      VerifyCastType(operand, op_type, node->GetType(), promo_kind,
-                     cast_kind, node->GetLocation());
+  auto type_or_err = VerifyCastType(operand, op_type, node->GetType(),
+                                    promo_kind, cast_kind, 
node->GetLocation());
   if (!type_or_err)
     return type_or_err.takeError();
 
diff --git a/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
index f54e58f36a9cb..8ecf4d548afe6 100644
--- a/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
@@ -8,7 +8,6 @@
 #include <memory>
 #include <string>
 
-
 namespace ns {
 
 typedef int myint;
@@ -17,7 +16,6 @@ class Foo {};
 
 } // namespace ns
 
-
 int main(int argc, char **argv) {
   int a = 1;
   int *ap = &a;

>From 92e209c56066f3779e9192e579a60a7dfbd0442f Mon Sep 17 00:00:00 2001
From: Caroline Tice <[email protected]>
Date: Mon, 8 Dec 2025 20:51:30 -0800
Subject: [PATCH 3/5] Addressed reviewer comments:  - Changed enum name to
 CastPromotionKind  - Added Doxygen comment for VerifyTypeCast function  -
 Removed unneeded Status variable  - Rewrote VerifyTypeCast to use early style
 returns.

---
 lldb/include/lldb/ValueObject/DILAST.h  |  2 +-
 lldb/include/lldb/ValueObject/DILEval.h |  8 +++-
 lldb/source/ValueObject/DILEval.cpp     | 63 +++++++++++++------------
 3 files changed, 40 insertions(+), 33 deletions(-)

diff --git a/lldb/include/lldb/ValueObject/DILAST.h 
b/lldb/include/lldb/ValueObject/DILAST.h
index 3a18172852b5e..1e61f7975a815 100644
--- a/lldb/include/lldb/ValueObject/DILAST.h
+++ b/lldb/include/lldb/ValueObject/DILAST.h
@@ -47,7 +47,7 @@ enum class CastKind {
 };
 
 /// Promotions allowed for type casts in DIL.
-enum CastPromoKind {
+enum CastPromotionKind {
   eArithmetic,
   ePointer,
   eNone,
diff --git a/lldb/include/lldb/ValueObject/DILEval.h 
b/lldb/include/lldb/ValueObject/DILEval.h
index 8df12ce450db7..401ac1a2b805a 100644
--- a/lldb/include/lldb/ValueObject/DILEval.h
+++ b/lldb/include/lldb/ValueObject/DILEval.h
@@ -71,9 +71,15 @@ class Interpreter : Visitor {
                   std::shared_ptr<ExecutionContextScope> ctx,
                   const IntegerLiteralNode *literal);
 
+  /// As a preparation for type casting, compare the requested 'target' type
+  /// of the cast with the type of the operand to be cast. If the cast is
+  /// allowed, set 'promo_kind' and 'cast_kind' to the appropriate values for
+  /// the type of cast to be done. Also perform pointer-to-array conversion
+  /// on the operand, if needed, updating the operand & its type appropriately.
+  /// If the requested cast is not allowed, return the appropriate error.
   llvm::Expected<CompilerType>
   VerifyCastType(lldb::ValueObjectSP &operand, CompilerType &op_type,
-                 CompilerType target_type, CastPromoKind &promo_kind,
+                 CompilerType target_type, CastPromotionKind &promo_kind,
                  CastKind &cast_kind, int location);
 
   // Used by the interpreter to create objects, perform casts, etc.
diff --git a/lldb/source/ValueObject/DILEval.cpp 
b/lldb/source/ValueObject/DILEval.cpp
index 28175b3f6428e..e2520197c83ef 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -25,11 +25,9 @@ lldb::ValueObjectSP
 GetDynamicOrSyntheticValue(lldb::ValueObjectSP in_valobj_sp,
                            lldb::DynamicValueType use_dynamic,
                            bool use_synthetic) {
-  Status error;
-  if (!in_valobj_sp) {
-    error = Status("invalid value object");
+  if (!in_valobj_sp)
     return in_valobj_sp;
-  }
+
   lldb::ValueObjectSP value_sp = in_valobj_sp;
   Target *target = value_sp->GetTargetSP().get();
   // If this ValueObject holds an error, then it is valuable for that.
@@ -51,9 +49,6 @@ GetDynamicOrSyntheticValue(lldb::ValueObjectSP in_valobj_sp,
       value_sp = synthetic_sp;
   }
 
-  if (!value_sp)
-    error = Status("invalid value object");
-
   return value_sp;
 }
 
@@ -778,10 +773,11 @@ Interpreter::Visit(const BooleanLiteralNode *node) {
 
 llvm::Expected<CompilerType>
 Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, CompilerType 
&op_type,
-                            CompilerType target_type, CastPromoKind 
&promo_kind,
-                            CastKind &cast_kind, int location) {
+                            CompilerType target_type,
+                            CastPromotionKind &promo_kind, CastKind &cast_kind,
+                            int location) {
 
-  promo_kind = CastPromoKind::eNone;
+  promo_kind = CastPromotionKind::eNone;
   if (op_type.IsReferenceType())
     op_type = op_type.GetNonReferenceType();
   if (target_type.IsScalarType()) {
@@ -813,10 +809,8 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
       uint64_t type_byte_size = 0;
       uint64_t rhs_type_byte_size = 0;
       if (auto temp = target_type.GetByteSize(m_exe_ctx_scope.get()))
-        // type_byte_size = temp.value();
         type_byte_size = *temp;
       if (auto temp = op_type.GetByteSize(m_exe_ctx_scope.get()))
-        // rhs_type_byte_size = temp.value();
         rhs_type_byte_size = *temp;
       if (!target_type.IsBoolean() && type_byte_size < rhs_type_byte_size) {
         std::string errMsg = llvm::formatv(
@@ -836,8 +830,11 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           m_expr, std::move(errMsg), location,
           op_type.TypeDescription().length());
     }
-    promo_kind = CastPromoKind::eArithmetic;
-  } else if (target_type.IsEnumerationType()) {
+    promo_kind = CastPromotionKind::eArithmetic;
+    return target_type;
+  }
+
+  if (target_type.IsEnumerationType()) {
     // Cast to enum type.
     if (!op_type.IsScalarType() && !op_type.IsEnumerationType()) {
       std::string errMsg = llvm::formatv("Cast from {0} to {1} is not allowed",
@@ -849,8 +846,10 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           op_type.TypeDescription().length());
     }
     cast_kind = CastKind::eEnumeration;
+    return target_type;
+  }
 
-  } else if (target_type.IsPointerType()) {
+  if (target_type.IsPointerType()) {
     if (!op_type.IsInteger() && !op_type.IsEnumerationType() &&
         !op_type.IsArrayType() && !op_type.IsPointerType() &&
         !op_type.IsNullPtrType()) {
@@ -862,9 +861,11 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           m_expr, std::move(errMsg), location,
           op_type.TypeDescription().length());
     }
-    promo_kind = CastPromoKind::ePointer;
+    promo_kind = CastPromotionKind::ePointer;
+    return target_type;
+  }
 
-  } else if (target_type.IsNullPtrType()) {
+  if (target_type.IsNullPtrType()) {
     // Cast to nullptr type.
     bool is_signed;
     if (!target_type.IsNullPtrType() &&
@@ -880,21 +881,21 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           op_type.TypeDescription().length());
     }
     cast_kind = CastKind::eNullptr;
+    return target_type;
+  }
 
-  } else if (target_type.IsReferenceType()) {
+  if (target_type.IsReferenceType()) {
     // Cast to a reference type.
     cast_kind = CastKind::eReference;
-  } else {
-    // Unsupported cast.
-    std::string errMsg =
-        llvm::formatv("casting of {0} to {1} is not implemented yet",
-                      op_type.TypeDescription(), 
target_type.TypeDescription());
-    return llvm::make_error<DILDiagnosticError>(
-        m_expr, std::move(errMsg), location,
-        op_type.TypeDescription().length());
+    return target_type;
   }
 
-  return target_type;
+  // Unsupported cast.
+  std::string errMsg =
+      llvm::formatv("casting of {0} to {1} is not implemented yet",
+                    op_type.TypeDescription(), target_type.TypeDescription());
+  return llvm::make_error<DILDiagnosticError>(
+      m_expr, std::move(errMsg), location, op_type.TypeDescription().length());
 }
 
 llvm::Expected<lldb::ValueObjectSP> Interpreter::Visit(const CastNode *node) {
@@ -905,7 +906,7 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
   lldb::ValueObjectSP operand = *operand_or_err;
   CompilerType op_type = operand->GetCompilerType();
   CastKind cast_kind = CastKind::eNone;
-  CastPromoKind promo_kind = CastPromoKind::eNone;
+  CastPromotionKind promo_kind = CastPromotionKind::eNone;
 
   auto type_or_err = VerifyCastType(operand, op_type, node->GetType(),
                                     promo_kind, cast_kind, 
node->GetLocation());
@@ -958,7 +959,7 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
   }
   case CastKind::eNone: {
     switch (promo_kind) {
-    case CastPromoKind::eArithmetic: {
+    case CastPromotionKind::eArithmetic: {
       if (target_type.GetCanonicalType().GetBasicTypeEnumeration() ==
           lldb::eBasicTypeInvalid) {
         std::string errMsg = "invalid ast: target type should be a basic 
type.";
@@ -980,7 +981,7 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
       return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
                                                   node->GetLocation());
     }
-    case CastPromoKind::ePointer: {
+    case CastPromotionKind::ePointer: {
       if (!target_type.IsPointerType()) {
         std::string errMsg = "invalid ast: target type should be a pointer";
         return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
@@ -997,7 +998,7 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
                                                        target_type,
                                                        /* do_deref */ false);
     }
-    case CastPromoKind::eNone: {
+    case CastPromotionKind::eNone: {
       return lldb::ValueObjectSP();
     }
     } // switch promo_kind

>From a3b4e8da94a886b2e68e81797a99aed7d07ac058 Mon Sep 17 00:00:00 2001
From: Caroline Tice <[email protected]>
Date: Wed, 10 Dec 2025 22:14:58 -0800
Subject: [PATCH 4/5] Addressed review comments & simplified code:  - Combined
 cast enumeration kinds into a single enumeration  - Reorganized code so
 VerifyCastKind does not update any of its parameters  - VerifyCastKind now
 returns type of cast to perform (cast kind enum)  - Removed redundant error
 checking from the Visit function for cast nodes.

---
 lldb/include/lldb/ValueObject/DILAST.h        |  14 +-
 lldb/include/lldb/ValueObject/DILEval.h       |  13 +-
 lldb/source/ValueObject/DILEval.cpp           | 177 ++++++------------
 .../frame/var-dil/expr/Casts/Makefile         |   3 -
 4 files changed, 68 insertions(+), 139 deletions(-)

diff --git a/lldb/include/lldb/ValueObject/DILAST.h 
b/lldb/include/lldb/ValueObject/DILAST.h
index 1e61f7975a815..4dc668e7a44cb 100644
--- a/lldb/include/lldb/ValueObject/DILAST.h
+++ b/lldb/include/lldb/ValueObject/DILAST.h
@@ -40,18 +40,20 @@ enum class UnaryOpKind {
 
 /// The type casts allowed by DIL.
 enum class CastKind {
+  eArithmetic,  ///< Casting to a scalar.
   eEnumeration, ///< Casting from a scalar to an enumeration type
   eNullptr,     ///< Casting to a nullptr type
+  ePointer,     ///< Casting to a pointer type.
   eReference,   ///< Casting to a reference type
-  eNone,        ///< Type promotion casting
+  eNone,        ///< Invalid promotion type (results in error).
 };
 
 /// Promotions allowed for type casts in DIL.
-enum CastPromotionKind {
-  eArithmetic,
-  ePointer,
-  eNone,
-};
+//enum CastPromotionKind {
+//  eArithmetic, ///< Casting to a scalar.
+//  ePointer,    ///< Casting to a pointer type.
+//  eNone,       ///< Invalid promotion type (results in error).
+//};
 
 /// Forward declaration, for use in DIL AST nodes. Definition is at the very
 /// end of this file.
diff --git a/lldb/include/lldb/ValueObject/DILEval.h 
b/lldb/include/lldb/ValueObject/DILEval.h
index 401ac1a2b805a..f7cae9c314efa 100644
--- a/lldb/include/lldb/ValueObject/DILEval.h
+++ b/lldb/include/lldb/ValueObject/DILEval.h
@@ -73,14 +73,11 @@ class Interpreter : Visitor {
 
   /// As a preparation for type casting, compare the requested 'target' type
   /// of the cast with the type of the operand to be cast. If the cast is
-  /// allowed, set 'promo_kind' and 'cast_kind' to the appropriate values for
-  /// the type of cast to be done. Also perform pointer-to-array conversion
-  /// on the operand, if needed, updating the operand & its type appropriately.
-  /// If the requested cast is not allowed, return the appropriate error.
-  llvm::Expected<CompilerType>
-  VerifyCastType(lldb::ValueObjectSP &operand, CompilerType &op_type,
-                 CompilerType target_type, CastPromotionKind &promo_kind,
-                 CastKind &cast_kind, int location);
+  /// allowed, return the appropriate CastKind for the cast; otherwise return
+  /// an error.
+  llvm::Expected<CastKind>
+  VerifyCastType(lldb::ValueObjectSP operand, CompilerType op_type,
+                 CompilerType target_type, int location);
 
   // Used by the interpreter to create objects, perform casts, etc.
   lldb::TargetSP m_target;
diff --git a/lldb/source/ValueObject/DILEval.cpp 
b/lldb/source/ValueObject/DILEval.cpp
index e2520197c83ef..222c3d0f5a4fb 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -22,20 +22,11 @@
 namespace lldb_private::dil {
 
 lldb::ValueObjectSP
-GetDynamicOrSyntheticValue(lldb::ValueObjectSP in_valobj_sp,
+GetDynamicOrSyntheticValue(lldb::ValueObjectSP value_sp,
                            lldb::DynamicValueType use_dynamic,
                            bool use_synthetic) {
-  if (!in_valobj_sp)
-    return in_valobj_sp;
-
-  lldb::ValueObjectSP value_sp = in_valobj_sp;
-  Target *target = value_sp->GetTargetSP().get();
-  // If this ValueObject holds an error, then it is valuable for that.
-  if (value_sp->GetError().Fail())
-    return value_sp;
-
-  if (!target)
-    return lldb::ValueObjectSP();
+  if (!value_sp)
+    return nullptr;
 
   if (use_dynamic != lldb::eNoDynamicValues) {
     lldb::ValueObjectSP dynamic_sp = value_sp->GetDynamicValue(use_dynamic);
@@ -74,7 +65,8 @@ static CompilerType GetBasicType(lldb::TypeSystemSP 
type_system,
 }
 
 static lldb::ValueObjectSP
-ArrayToPointerConversion(ValueObject &valobj, ExecutionContextScope &ctx) {
+ArrayToPointerConversion(ValueObject &valobj, ExecutionContextScope &ctx,
+                         llvm::StringRef name) {
   uint64_t addr = valobj.GetLoadAddress();
   ExecutionContext exe_ctx;
   ctx.CalculateExecutionContext(exe_ctx);
@@ -130,8 +122,9 @@ Interpreter::UnaryConversion(lldb::ValueObjectSP valobj, 
uint32_t location) {
     }
   }
 
+  llvm::StringRef name = "result";
   if (in_type.IsArrayType())
-    valobj = ArrayToPointerConversion(*valobj, *m_exe_ctx_scope);
+    valobj = ArrayToPointerConversion(*valobj, *m_exe_ctx_scope, name);
 
   if (valobj->GetCompilerType().IsInteger() ||
       valobj->GetCompilerType().IsUnscopedEnumerationType()) {
@@ -771,29 +764,11 @@ Interpreter::Visit(const BooleanLiteralNode *node) {
   return ValueObject::CreateValueObjectFromBool(m_target, value, "result");
 }
 
-llvm::Expected<CompilerType>
-Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, CompilerType 
&op_type,
-                            CompilerType target_type,
-                            CastPromotionKind &promo_kind, CastKind &cast_kind,
-                            int location) {
+llvm::Expected<CastKind>
+Interpreter::VerifyCastType(lldb::ValueObjectSP operand, CompilerType op_type,
+                            CompilerType target_type, int location) {
 
-  promo_kind = CastPromotionKind::eNone;
-  if (op_type.IsReferenceType())
-    op_type = op_type.GetNonReferenceType();
   if (target_type.IsScalarType()) {
-    if (op_type.IsArrayType()) {
-      // Do array-to-pointer conversion.
-      CompilerType deref_type =
-          op_type.IsReferenceType() ? op_type.GetNonReferenceType() : op_type;
-      CompilerType result_type =
-          deref_type.GetArrayElementType(nullptr).GetPointerType();
-      uint64_t addr = operand->GetLoadAddress();
-      llvm::StringRef name = operand->GetName().GetStringRef();
-      operand = ValueObject::CreateValueObjectFromAddress(
-          name, addr, m_exe_ctx_scope, result_type, /*do_deref=*/false);
-      op_type = result_type;
-    }
-
     if (op_type.IsPointerType() || op_type.IsNullPtrType()) {
       // Cast from pointer to float/double is not allowed.
       if (target_type.IsFloat()) {
@@ -830,8 +805,7 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           m_expr, std::move(errMsg), location,
           op_type.TypeDescription().length());
     }
-    promo_kind = CastPromotionKind::eArithmetic;
-    return target_type;
+    return CastKind::eArithmetic;
   }
 
   if (target_type.IsEnumerationType()) {
@@ -845,8 +819,7 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           m_expr, std::move(errMsg), location,
           op_type.TypeDescription().length());
     }
-    cast_kind = CastKind::eEnumeration;
-    return target_type;
+    return CastKind::eEnumeration;
   }
 
   if (target_type.IsPointerType()) {
@@ -861,8 +834,7 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           m_expr, std::move(errMsg), location,
           op_type.TypeDescription().length());
     }
-    promo_kind = CastPromotionKind::ePointer;
-    return target_type;
+    return CastKind::ePointer;
   }
 
   if (target_type.IsNullPtrType()) {
@@ -880,15 +852,11 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP &operand, 
CompilerType &op_type,
           m_expr, std::move(errMsg), location,
           op_type.TypeDescription().length());
     }
-    cast_kind = CastKind::eNullptr;
-    return target_type;
+    return CastKind::eNullptr;
   }
 
-  if (target_type.IsReferenceType()) {
-    // Cast to a reference type.
-    cast_kind = CastKind::eReference;
-    return target_type;
-  }
+  if (target_type.IsReferenceType())
+    return CastKind::eReference;
 
   // Unsupported cast.
   std::string errMsg =
@@ -905,16 +873,22 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
 
   lldb::ValueObjectSP operand = *operand_or_err;
   CompilerType op_type = operand->GetCompilerType();
-  CastKind cast_kind = CastKind::eNone;
-  CastPromotionKind promo_kind = CastPromotionKind::eNone;
+  CompilerType target_type =  node->GetType();
 
-  auto type_or_err = VerifyCastType(operand, op_type, node->GetType(),
-                                    promo_kind, cast_kind, 
node->GetLocation());
+  if (op_type.IsReferenceType())
+    op_type = op_type.GetNonReferenceType();
+  if (target_type.IsScalarType() && op_type.IsArrayType()) {
+    operand = ArrayToPointerConversion(*operand, *m_exe_ctx_scope,
+                                       operand->GetName().GetStringRef());
+    op_type = operand->GetCompilerType();
+  }
+  auto type_or_err = VerifyCastType(operand, op_type, target_type,
+                                    node->GetLocation());
   if (!type_or_err)
     return type_or_err.takeError();
 
-  CompilerType target_type = *type_or_err;
-  if (op_type.IsReferenceType()) {
+  CastKind cast_kind  = *type_or_err;
+  if (operand->GetCompilerType().IsReferenceType()) {
     Status error;
     operand = operand->Dereference(error);
     if (error.Fail())
@@ -924,30 +898,11 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
 
   switch (cast_kind) {
   case CastKind::eEnumeration: {
-    if (!target_type.IsEnumerationType()) {
-      std::string errMsg = "invalid ast: target type should be an 
enumeration.";
-      return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
-                                                  node->GetLocation());
-    }
-    if (op_type.IsFloat())
+    if (op_type.IsFloat() || op_type.IsInteger() || 
op_type.IsEnumerationType())
       return operand->CastToEnumType(target_type);
-
-    if (op_type.IsInteger() || op_type.IsEnumerationType())
-      return operand->CastToEnumType(target_type);
-
-    std::string errMsg =
-        "invalid ast: operand is not convertible to enumeration type";
-    return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
-                                                node->GetLocation());
-    // return error.ToError();
+    break;
   }
   case CastKind::eNullptr: {
-    if (target_type.GetCanonicalType().GetBasicTypeEnumeration() !=
-        lldb::eBasicTypeNullPtr) {
-      std::string errMsg = "invalid ast: target type should be a nullptr_t.";
-      return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
-                                                  node->GetLocation());
-    }
     return ValueObject::CreateValueObjectFromNullptr(m_target, target_type,
                                                      "result");
   }
@@ -957,54 +912,32 @@ llvm::Expected<lldb::ValueObjectSP> 
Interpreter::Visit(const CastNode *node) {
     return lldb::ValueObjectSP(
         operand_sp->Cast(target_type.GetNonReferenceType()));
   }
+  case CastKind::eArithmetic: {
+    if (op_type.IsPointerType() || op_type.IsNullPtrType() ||
+        op_type.IsScalarType()  || op_type.IsEnumerationType())
+      return operand->CastToBasicType(target_type);
+    break;
+  }
+  case CastKind::ePointer: {
+    uint64_t addr =
+        op_type.IsArrayType()
+        ? operand->GetLoadAddress()
+        : (op_type.IsSigned() ? operand->GetValueAsSigned(0)
+                              : operand->GetValueAsUnsigned(0));
+    llvm::StringRef name = "result";
+    ExecutionContext exe_ctx(m_target.get(), false);
+    return ValueObject::CreateValueObjectFromAddress(name, addr, exe_ctx,
+                                                     target_type,
+                                                     /* do_deref */ false);
+  }
   case CastKind::eNone: {
-    switch (promo_kind) {
-    case CastPromotionKind::eArithmetic: {
-      if (target_type.GetCanonicalType().GetBasicTypeEnumeration() ==
-          lldb::eBasicTypeInvalid) {
-        std::string errMsg = "invalid ast: target type should be a basic 
type.";
-        return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
-                                                    node->GetLocation());
-      }
-      // Pick an appropriate cast.
-      if (op_type.IsPointerType() || op_type.IsNullPtrType()) {
-        return operand->CastToBasicType(target_type);
-      }
-      if (op_type.IsScalarType()) {
-        return operand->CastToBasicType(target_type);
-      }
-      if (op_type.IsEnumerationType()) {
-        return operand->CastToBasicType(target_type);
-      }
-      std::string errMsg =
-          "invalid ast: operand is not convertible to arithmetic type";
-      return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
-                                                  node->GetLocation());
-    }
-    case CastPromotionKind::ePointer: {
-      if (!target_type.IsPointerType()) {
-        std::string errMsg = "invalid ast: target type should be a pointer";
-        return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
-                                                    node->GetLocation());
-      }
-      uint64_t addr =
-          op_type.IsArrayType()
-              ? operand->GetLoadAddress()
-              : (op_type.IsSigned() ? operand->GetValueAsSigned(0)
-                                    : operand->GetValueAsUnsigned(0));
-      llvm::StringRef name = "result";
-      ExecutionContext exe_ctx(m_target.get(), false);
-      return ValueObject::CreateValueObjectFromAddress(name, addr, exe_ctx,
-                                                       target_type,
-                                                       /* do_deref */ false);
-    }
-    case CastPromotionKind::eNone: {
-      return lldb::ValueObjectSP();
-    }
-    } // switch promo_kind
-  } // case CastKind::eNone
-  } // switch cast_kind
-  std::string errMsg = "invalid ast: unexpected c-style cast kind";
+    return lldb::ValueObjectSP();
+  }
+  } // switch
+
+  std::string errMsg = llvm::formatv("unable to cast from '{0}' to '{1}'",
+                                     op_type.TypeDescription(),
+                                     target_type.TypeDescription());
   return llvm::make_error<DILDiagnosticError>(m_expr, std::move(errMsg),
                                               node->GetLocation());
 }
diff --git a/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile
index 0165eb73f3073..99998b20bcb05 100644
--- a/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/Makefile
@@ -1,6 +1,3 @@
 CXX_SOURCES := main.cpp
-#CXXFLAGS_EXTRAS := -std=c++14
-
-USE_LIBSTDCPP := 1
 
 include Makefile.rules

>From 69c4a8d349f34c6c9b1a13746db8e3304bdffd88 Mon Sep 17 00:00:00 2001
From: Caroline Tice <[email protected]>
Date: Tue, 16 Dec 2025 15:49:39 -0800
Subject: [PATCH 5/5] Address review comments:   - Put arithmetic cast
 verification into a separate helper function.   - Rename 'op_type' to
 'source_type'.   - Return errors if we can't get the byte sizes for the types
 (when we try)   - Use early-return for ptr-to-boolean cast.   - Fix typo in
 NullPtr cast checking conditions.   - Remove unused header includes from
 test.

---
 lldb/include/lldb/ValueObject/DILAST.h        |   7 -
 lldb/include/lldb/ValueObject/DILEval.h       |  14 +-
 lldb/source/ValueObject/DILEval.cpp           | 135 +++++++++++-------
 .../var-dil/expr/Casts/TestFrameVarDILCast.py |   2 +-
 .../frame/var-dil/expr/Casts/main.cpp         |   6 -
 5 files changed, 93 insertions(+), 71 deletions(-)

diff --git a/lldb/include/lldb/ValueObject/DILAST.h 
b/lldb/include/lldb/ValueObject/DILAST.h
index 4dc668e7a44cb..ad74777260e70 100644
--- a/lldb/include/lldb/ValueObject/DILAST.h
+++ b/lldb/include/lldb/ValueObject/DILAST.h
@@ -48,13 +48,6 @@ enum class CastKind {
   eNone,        ///< Invalid promotion type (results in error).
 };
 
-/// Promotions allowed for type casts in DIL.
-//enum CastPromotionKind {
-//  eArithmetic, ///< Casting to a scalar.
-//  ePointer,    ///< Casting to a pointer type.
-//  eNone,       ///< Invalid promotion type (results in error).
-//};
-
 /// Forward declaration, for use in DIL AST nodes. Definition is at the very
 /// end of this file.
 class Visitor;
diff --git a/lldb/include/lldb/ValueObject/DILEval.h 
b/lldb/include/lldb/ValueObject/DILEval.h
index f7cae9c314efa..8390717db2ab8 100644
--- a/lldb/include/lldb/ValueObject/DILEval.h
+++ b/lldb/include/lldb/ValueObject/DILEval.h
@@ -71,13 +71,21 @@ class Interpreter : Visitor {
                   std::shared_ptr<ExecutionContextScope> ctx,
                   const IntegerLiteralNode *literal);
 
+  /// A helper function for VerifyCastType (below). This performs
+  /// arithmetic-specific checks. It should only be called if the target_type
+  /// is a scalar type.
+  llvm::Expected<CastKind> VerifyArithmeticCast(CompilerType source_type,
+                                                CompilerType target_type,
+                                                int location);
+
   /// As a preparation for type casting, compare the requested 'target' type
   /// of the cast with the type of the operand to be cast. If the cast is
   /// allowed, return the appropriate CastKind for the cast; otherwise return
   /// an error.
-  llvm::Expected<CastKind>
-  VerifyCastType(lldb::ValueObjectSP operand, CompilerType op_type,
-                 CompilerType target_type, int location);
+  llvm::Expected<CastKind> VerifyCastType(lldb::ValueObjectSP operand,
+                                          CompilerType source_type,
+                                          CompilerType target_type,
+                                          int location);
 
   // Used by the interpreter to create objects, perform casts, etc.
   lldb::TargetSP m_target;
diff --git a/lldb/source/ValueObject/DILEval.cpp 
b/lldb/source/ValueObject/DILEval.cpp
index 222c3d0f5a4fb..6440efd114e0b 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -71,7 +71,7 @@ ArrayToPointerConversion(ValueObject &valobj, 
ExecutionContextScope &ctx,
   ExecutionContext exe_ctx;
   ctx.CalculateExecutionContext(exe_ctx);
   return ValueObject::CreateValueObjectFromAddress(
-      "result", addr, exe_ctx,
+      name, addr, exe_ctx,
       valobj.GetCompilerType().GetArrayElementType(&ctx).GetPointerType(),
       /* do_deref */ false);
 }
@@ -122,9 +122,8 @@ Interpreter::UnaryConversion(lldb::ValueObjectSP valobj, 
uint32_t location) {
     }
   }
 
-  llvm::StringRef name = "result";
   if (in_type.IsArrayType())
-    valobj = ArrayToPointerConversion(*valobj, *m_exe_ctx_scope, name);
+    valobj = ArrayToPointerConversion(*valobj, *m_exe_ctx_scope, "result");
 
   if (valobj->GetCompilerType().IsInteger() ||
       valobj->GetCompilerType().IsUnscopedEnumerationType()) {
@@ -765,74 +764,101 @@ Interpreter::Visit(const BooleanLiteralNode *node) {
 }
 
 llvm::Expected<CastKind>
-Interpreter::VerifyCastType(lldb::ValueObjectSP operand, CompilerType op_type,
-                            CompilerType target_type, int location) {
+Interpreter::VerifyArithmeticCast(CompilerType source_type,
+                                  CompilerType target_type, int location) {
+  if (source_type.IsPointerType() || source_type.IsNullPtrType()) {
+    // Cast from pointer to float/double is not allowed.
+    if (target_type.IsFloat()) {
+      std::string errMsg = llvm::formatv("Cast from {0} to {1} is not allowed",
+                                         source_type.TypeDescription(),
+                                         target_type.TypeDescription());
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          source_type.TypeDescription().length());
+    }
 
-  if (target_type.IsScalarType()) {
-    if (op_type.IsPointerType() || op_type.IsNullPtrType()) {
-      // Cast from pointer to float/double is not allowed.
-      if (target_type.IsFloat()) {
-        std::string errMsg = llvm::formatv(
-            "Cast from {0} to {1} is not allowed", op_type.TypeDescription(),
-            target_type.TypeDescription());
-        return llvm::make_error<DILDiagnosticError>(
-            m_expr, std::move(errMsg), location,
-            op_type.TypeDescription().length());
-      }
-      // Casting pointer to bool is valid. Otherwise check if the result type
-      // is at least as big as the pointer size.
-      uint64_t type_byte_size = 0;
-      uint64_t rhs_type_byte_size = 0;
-      if (auto temp = target_type.GetByteSize(m_exe_ctx_scope.get()))
-        type_byte_size = *temp;
-      if (auto temp = op_type.GetByteSize(m_exe_ctx_scope.get()))
-        rhs_type_byte_size = *temp;
-      if (!target_type.IsBoolean() && type_byte_size < rhs_type_byte_size) {
-        std::string errMsg = llvm::formatv(
-            "cast from pointer to smaller type {0} loses information",
-            target_type.TypeDescription());
-        return llvm::make_error<DILDiagnosticError>(
-            m_expr, std::move(errMsg), location,
-            op_type.TypeDescription().length());
-      }
-    } else if (!op_type.IsScalarType() && !op_type.IsEnumerationType()) {
-      // Otherwise accept only arithmetic types and enums.
-      std::string errMsg = llvm::formatv(
-          "cannot convert {0} to {1} without a conversion operator",
-          op_type.TypeDescription(), target_type.TypeDescription());
+    // Casting from pointer to bool is always valid.
+    if (target_type.IsBoolean())
+      return CastKind::eArithmetic;
+
+    // Otherwise check if the result type is at least as big as the pointer
+    // size.
+    uint64_t type_byte_size = 0;
+    uint64_t rhs_type_byte_size = 0;
+    if (auto temp = target_type.GetByteSize(m_exe_ctx_scope.get())) {
+      type_byte_size = *temp;
+    } else {
+      std::string errMsg = llvm::formatv("unable to get byte size for type 
{0}",
+                                         target_type.TypeDescription());
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          target_type.TypeDescription().length());
+    }
 
+    if (auto temp = source_type.GetByteSize(m_exe_ctx_scope.get())) {
+      rhs_type_byte_size = *temp;
+    } else {
+      std::string errMsg = llvm::formatv("unable to get byte size for type 
{0}",
+                                         source_type.TypeDescription());
+      return llvm::make_error<DILDiagnosticError>(
+          m_expr, std::move(errMsg), location,
+          source_type.TypeDescription().length());
+    }
+
+    if (type_byte_size < rhs_type_byte_size) {
+      std::string errMsg = llvm::formatv(
+          "cast from pointer to smaller type {0} loses information",
+          target_type.TypeDescription());
       return llvm::make_error<DILDiagnosticError>(
           m_expr, std::move(errMsg), location,
-          op_type.TypeDescription().length());
+          source_type.TypeDescription().length());
     }
-    return CastKind::eArithmetic;
+  } else if (!source_type.IsScalarType() && !source_type.IsEnumerationType()) {
+    // Otherwise accept only arithmetic types and enums.
+    std::string errMsg = llvm::formatv("cannot convert {0} to {1}",
+                                       source_type.TypeDescription(),
+                                       target_type.TypeDescription());
+
+    return llvm::make_error<DILDiagnosticError>(
+        m_expr, std::move(errMsg), location,
+        source_type.TypeDescription().length());
   }
+  return CastKind::eArithmetic;
+}
+
+llvm::Expected<CastKind>
+Interpreter::VerifyCastType(lldb::ValueObjectSP operand,
+                            CompilerType source_type, CompilerType target_type,
+                            int location) {
+
+  if (target_type.IsScalarType())
+    return VerifyArithmeticCast(source_type, target_type, location);
 
   if (target_type.IsEnumerationType()) {
     // Cast to enum type.
-    if (!op_type.IsScalarType() && !op_type.IsEnumerationType()) {
+    if (!source_type.IsScalarType() && !source_type.IsEnumerationType()) {
       std::string errMsg = llvm::formatv("Cast from {0} to {1} is not allowed",
-                                         op_type.TypeDescription(),
+                                         source_type.TypeDescription(),
                                          target_type.TypeDescription());
 
       return llvm::make_error<DILDiagnosticError>(
           m_expr, std::move(errMsg), location,
-          op_type.TypeDescription().length());
+          source_type.TypeDescription().length());
     }
     return CastKind::eEnumeration;
   }
 
   if (target_type.IsPointerType()) {
-    if (!op_type.IsInteger() && !op_type.IsEnumerationType() &&
-        !op_type.IsArrayType() && !op_type.IsPointerType() &&
-        !op_type.IsNullPtrType()) {
+    if (!source_type.IsInteger() && !source_type.IsEnumerationType() &&
+        !source_type.IsArrayType() && !source_type.IsPointerType() &&
+        !source_type.IsNullPtrType()) {
       std::string errMsg = llvm::formatv(
           "cannot cast from type {0} to pointer type {1}",
-          op_type.TypeDescription(), target_type.TypeDescription());
+          source_type.TypeDescription(), target_type.TypeDescription());
 
       return llvm::make_error<DILDiagnosticError>(
           m_expr, std::move(errMsg), location,
-          op_type.TypeDescription().length());
+          source_type.TypeDescription().length());
     }
     return CastKind::ePointer;
   }
@@ -840,17 +866,17 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP operand, 
CompilerType op_type,
   if (target_type.IsNullPtrType()) {
     // Cast to nullptr type.
     bool is_signed;
-    if (!target_type.IsNullPtrType() &&
+    if (!source_type.IsNullPtrType() &&
         (!operand->IsIntegerType(is_signed) ||
          (is_signed && operand->GetValueAsSigned(0) != 0) ||
          (!is_signed && operand->GetValueAsUnsigned(0) != 0))) {
       std::string errMsg = llvm::formatv("Cast from {0} to {1} is not allowed",
-                                         op_type.TypeDescription(),
+                                         source_type.TypeDescription(),
                                          target_type.TypeDescription());
 
       return llvm::make_error<DILDiagnosticError>(
           m_expr, std::move(errMsg), location,
-          op_type.TypeDescription().length());
+          source_type.TypeDescription().length());
     }
     return CastKind::eNullptr;
   }
@@ -859,11 +885,12 @@ Interpreter::VerifyCastType(lldb::ValueObjectSP operand, 
CompilerType op_type,
     return CastKind::eReference;
 
   // Unsupported cast.
-  std::string errMsg =
-      llvm::formatv("casting of {0} to {1} is not implemented yet",
-                    op_type.TypeDescription(), target_type.TypeDescription());
+  std::string errMsg = llvm::formatv(
+      "casting of {0} to {1} is not implemented yet",
+      source_type.TypeDescription(), target_type.TypeDescription());
   return llvm::make_error<DILDiagnosticError>(
-      m_expr, std::move(errMsg), location, op_type.TypeDescription().length());
+      m_expr, std::move(errMsg), location,
+      source_type.TypeDescription().length());
 }
 
 llvm::Expected<lldb::ValueObjectSP> Interpreter::Visit(const CastNode *node) {
diff --git 
a/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
index 2e358ed923732..cc9260a15c636 100644
--- a/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/TestFrameVarDILCast.py
@@ -104,7 +104,7 @@ def test_type_cast(self):
         self.expect(
             "frame variable '(int)ns_foo_'",
             error=True,
-            substrs=["cannot convert 'ns::Foo' to 'int' without a conversion 
operator"],
+            substrs=["cannot convert 'ns::Foo' to 'int'"],
         )
 
         self.expect_var_path("(int)myint_", type="int", value="1")
diff --git a/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp 
b/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
index 8ecf4d548afe6..3977283f54cc6 100644
--- a/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
+++ b/lldb/test/API/commands/frame/var-dil/expr/Casts/main.cpp
@@ -1,12 +1,6 @@
 // Type Casting, main.cpp
 
-#include <cstdarg>
-#include <cstddef>
-#include <cstdint>
-#include <cstdlib>
 #include <limits>
-#include <memory>
-#include <string>
 
 namespace ns {
 

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to