[Lldb-commits] [lldb] [LLDB] Add type casting to DIL, part 1 of 3. (PR #165199)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 30 15:44:22 PDT 2025


================
@@ -3,10 +3,13 @@
 (* This is currently a subset of the final DIL Language, matching the current
    DIL implementation. *)
 
-expression = unary_expression ;
+expression = cast_expression;
+
+cast_expression = unary_expression
+                | "(" type_id ")" cast_expression;
 
 unary_expression = postfix_expression
-                 | unary_operator expression ;
+                 | unary_operator cast_expression ;
----------------
cmtice wrote:

In the currently shown grammar yes. But the full grammar for the full DIL expression language has quite a few layers between "expression" and "cast_expression", and I don't think it would be correct to allow some of them here. So I would prefer to keep this as is at the moment, in anticipation of future changes. But I can make your suggested change if you feel strongly about it.

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


More information about the lldb-commits mailing list