| 126 | } |
| 127 | |
| 128 | std::optional<std::pair<std::vector<const core::ITypedExpr*>, size_t>> |
| 129 | SingleSubfieldExtractor::parseDereference(const core::ITypedExpr* expr) { |
| 130 | if (UNLIKELY( |
| 131 | expr == nullptr || |
| 132 | expr->typedExprKind() != core::TypedExprKind::kDereference)) { |
| 133 | return std::nullopt; |
| 134 | } |
| 135 | |
| 136 | auto deref = static_cast<const core::DereferenceTypedExpr*>(expr); |
| 137 | if (UNLIKELY(deref->inputs().empty() || deref->name().empty())) { |
| 138 | return std::nullopt; |
| 139 | } |
| 140 | |
| 141 | auto childResult = parseSingleChain(deref->inputs()[0].get()); |
| 142 | if (!childResult) { |
| 143 | return std::nullopt; |
| 144 | } |
| 145 | |
| 146 | auto& [childChain, childDepth] = *childResult; |
| 147 | childChain.push_back(deref); |
| 148 | return std::make_pair(std::move(childChain), childDepth + 1); |
| 149 | } |
| 150 | |
| 151 | std::optional<std::pair<std::vector<const core::ITypedExpr*>, size_t>> |
| 152 | SingleSubfieldExtractor::parseCast(const core::ITypedExpr* expr) { |
nothing calls this directly
no test coverage detected