[clangd] Simplify code with *Map::operator[] (NFC) (#111939)
This commit is contained in:
parent
0f476277d5
commit
3f156ef4cc
@ -75,8 +75,8 @@ public:
|
||||
IDs.push_back(HID);
|
||||
}
|
||||
}
|
||||
Out->MainFileIncludesBySpelling.try_emplace(Inc.Written)
|
||||
.first->second.push_back(Out->MainFileIncludes.size() - 1);
|
||||
Out->MainFileIncludesBySpelling[Inc.Written].push_back(
|
||||
Out->MainFileIncludes.size() - 1);
|
||||
}
|
||||
|
||||
// Record include graph (not just for main-file includes)
|
||||
|
@ -2282,8 +2282,7 @@ incomingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) {
|
||||
elog("incomingCalls failed to convert location: {0}", Loc.takeError());
|
||||
return;
|
||||
}
|
||||
auto It = CallsIn.try_emplace(R.Container, std::vector<Range>{}).first;
|
||||
It->second.push_back(Loc->range);
|
||||
CallsIn[R.Container].push_back(Loc->range);
|
||||
|
||||
ContainerLookup.IDs.insert(R.Container);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user