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

Function readCompilerArgumentsFromFile

src/project.cc:134–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132};
133
134std::vector<const char *> readCompilerArgumentsFromFile(const std::string &path) {
135 auto mbOrErr = MemoryBuffer::getFile(path);
136 if (!mbOrErr)
137 return {};
138 std::vector<const char *> args;
139 for (line_iterator i(*mbOrErr.get(), true, '#'), e; i != e; ++i) {
140 std::string line(*i);
141 doPathMapping(line);
142 args.push_back(intern(line));
143 }
144 return args;
145}
146
147bool appendToCDB(const std::vector<const char *> &args) {
148 return args.size() && StringRef("%compile_commands.json") == args[0];

Callers 1

loadDirectoryListingFunction · 0.85

Calls 3

doPathMappingFunction · 0.85
internFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected