MCPcopy Create free account
hub / github.com/Samsung/UTopia / generateLocation

Method generateLocation

lib/inputanalysis/DefMapGenerator.cpp:182–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182std::tuple<std::string, unsigned, unsigned>
183DefMapGenerator::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
201std::shared_ptr<Type>
202DefMapGenerator::generateType(ASTDefNode &Node,

Callers

nothing calls this directly

Calls 4

getAssignedMethod · 0.80
getPathMethod · 0.80
getOffsetMethod · 0.45
getLengthMethod · 0.45

Tested by

no test coverage detected