mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 19:07:08 +00:00
Don't implicitly return data for TestIndexer.
This commit is contained in:
parent
476a3f1797
commit
d22f994d8a
@ -52,8 +52,12 @@ struct TestIndexer : IIndexer {
|
||||
const std::vector<FileContents>& file_contents,
|
||||
PerformanceImportFile* perf) {
|
||||
auto it = indexes.find(file);
|
||||
if (it == indexes.end())
|
||||
if (it == indexes.end()) {
|
||||
// Don't return any indexes for unexpected data.
|
||||
assert(false && "no indexes");
|
||||
return {};
|
||||
}
|
||||
|
||||
// FIXME: allow user to control how many times we return the index for a
|
||||
// specific file (atm it is always 1)
|
||||
auto result = std::move(it->second);
|
||||
|
Loading…
Reference in New Issue
Block a user