예제 #1
0
SymbolMap CursorInfo::declarationAndDefinition(const Location &loc, const SymbolMap &map, const SymbolMap *errors) const
{
    SymbolMap cursors;
    cursors[loc] = *this;

    Location l;
    CursorInfo t = bestTarget(map, errors, &l);

    if (t.kind == kind)
        cursors[l] = t;
    return cursors;
}
예제 #2
0
SymbolMap CursorInfo::declarationAndDefinition(const Location &loc, const SymbolMap &map) const
{
    SymbolMap cursors;
    cursors[loc] = copy();

    Location l;
    const std::shared_ptr<CursorInfo> t = bestTarget(map, &l);

    if (t->kind == kind)
        cursors[l] = t;
    return cursors;
}