We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d53897 commit 2cd0be0Copy full SHA for 2cd0be0
clang-tools-extra/clangd/index/FileIndex.cpp
@@ -190,7 +190,13 @@ FileShardedIndex::FileShardedIndex(IndexFileIn Input, PathRef HintPath)
190
}
191
192
std::vector<PathRef> FileShardedIndex::getAllFiles() const {
193
- return std::vector<PathRef>(Shards.keys().begin(), Shards.keys().end());
+ // It should be enough to construct a vector with {Shards.keys().begin(),
194
+ // Shards.keys().end()} but MSVC fails to compile that.
195
+ std::vector<PathRef> Result;
196
+ Result.reserve(Shards.size());
197
+ for (PathRef Key : Shards.keys())
198
+ Result.push_back(Key);
199
+ return Result;
200
201
202
IndexFileIn FileShardedIndex::getShard(PathRef File) const {
0 commit comments