[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 16:08:49 PDT 2025
================
@@ -80,15 +82,62 @@ ASTNodeUP DILParser::Run() {
// Parse an expression.
//
// expression:
-// unary_expression
+// cast_expression
//
-ASTNodeUP DILParser::ParseExpression() { return ParseUnaryExpression(); }
+ASTNodeUP DILParser::ParseExpression() { return ParseCastExpression(); }
+
+// Parse a cast_expression.
+//
+// cast_expression:
+// unary_expression
+// "(" type_id ")" cast_expression
+
+ASTNodeUP DILParser::ParseCastExpression() {
+ // This can be a C-style cast, try parsing the contents as a type declaration.
+ if (CurToken().Is(Token::l_paren)) {
----------------
cmtice wrote:
Will do.
https://github.com/llvm/llvm-project/pull/165199
More information about the lldb-commits
mailing list