| 180 | } |
| 181 | |
| 182 | std::tuple<std::string, unsigned, unsigned> |
| 183 | DefMapGenerator::generateLocation(const ASTDefNode &Node) const { |
| 184 | std::string Path; |
| 185 | unsigned Offset, Length; |
| 186 | if (const auto *Assigned = Node.getAssigned()) { |
| 187 | const auto &Index = Assigned->getIndex(); |
| 188 | Path = Index.getPath(); |
| 189 | Offset = Assigned->getOffset(); |
| 190 | Length = Assigned->getLength(); |
| 191 | } else { |
| 192 | const auto &Assignee = Node.getAssignee(); |
| 193 | const auto &Index = Assignee.getIndex(); |
| 194 | Path = Index.getPath(); |
| 195 | Offset = Assignee.getOffset() + Assignee.getLength(); |
| 196 | Length = 0; |
| 197 | } |
| 198 | return std::make_tuple(Path, Offset, Length); |
| 199 | } |
| 200 | |
| 201 | std::shared_ptr<Type> |
| 202 | DefMapGenerator::generateType(ASTDefNode &Node, |
nothing calls this directly
no test coverage detected