================ @@ -88,6 +89,42 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + std::string name, lldb::DynamicValueType use_dynamic, + bool fragile_ivar, bool use_synth_child, + bool check_ptr_vs_member) + : ASTNode(location, NodeKind::eMemberOfNode), m_base(std::move(base)), + m_is_arrow(is_arrow), m_field_name(std::move(name)), + m_use_dynamic(use_dynamic), m_fragile_ivar(fragile_ivar), + m_use_synth_child(use_synth_child), + m_check_ptr_vs_member(check_ptr_vs_member) {} + + llvm::Expected<lldb::ValueObjectSP> Accept(Visitor *v) const override; + + ASTNode *GetBase() const { return m_base.get(); } + bool GetIsArrow() const { return m_is_arrow; } + llvm::StringRef GetFieldName() const { return llvm::StringRef(m_field_name); } + bool GetCheckPtrVsMember() const { return m_check_ptr_vs_member; } + bool GetFragileIvar() const { return m_fragile_ivar; } + bool GetSynthChild() const { return m_use_synth_child; } + lldb::DynamicValueType GetUseDynamic() const { return m_use_dynamic; } ---------------- labath wrote:
I think we discussed this (briefly) at one of the previous PRs, and I think the conclusion was that things like these should be a property of the interpreter rather than of a specific node. I can sort of imagine a world some parts of an expression are evaluated using dynamic types and some aren't, but I don't think it's your intention to create that world. (And if it is, then these properties (at least some of them), should be other nodes as well, as e.g. `[]` also needs to know whether it should be looking at synthetic children). https://github.com/llvm/llvm-project/pull/138093 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits