[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue May 6 01:03:55 PDT 2025


================
@@ -108,6 +130,26 @@ class UnaryOpNode : public ASTNode {
   ASTNodeUP m_operand;
 };
 
+class ArraySubscriptNode : public ASTNode {
+public:
+  ArraySubscriptNode(uint32_t location, ASTNodeUP lhs, ASTNodeUP rhs)
+      : ASTNode(location, NodeKind::eArraySubscriptNode), m_lhs(std::move(lhs)),
+        m_rhs(std::move(rhs)) {}
+
+  llvm::Expected<lldb::ValueObjectSP> Accept(Visitor *v) const override;
+
+  ASTNode *lhs() const { return m_lhs.get(); }
+  ASTNode *rhs() const { return m_rhs.get(); }
----------------
labath wrote:

Let's use the GetFoo convention for this (and also in UnaryOpNode, which I didn't catch at the time)

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


More information about the lldb-commits mailing list