MCPcopy Create free account
hub / github.com/MaskRay/ccls / buildFileDefUpdate

Function buildFileDefUpdate

src/query.cc:44–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44QueryFile::DefUpdate buildFileDefUpdate(IndexFile &&indexed) {
45 QueryFile::Def def;
46 def.path = std::move(indexed.path);
47 def.args = std::move(indexed.args);
48 def.includes = std::move(indexed.includes);
49 def.skipped_ranges = std::move(indexed.skipped_ranges);
50 def.dependencies.reserve(indexed.dependencies.size());
51 for (auto &dep : indexed.dependencies)
52 def.dependencies.push_back(dep.first.val().data()); // llvm 8 -> data()
53 def.language = indexed.language;
54 return {std::move(def), std::move(indexed.file_contents)};
55}
56
57// Returns true if an element with the same file is found.
58template <typename Q> bool tryReplaceDef(llvm::SmallVectorImpl<Q> &def_list, Q &&def) {

Callers 1

createDeltaMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected