MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / cppIncludedSources

Function cppIncludedSources

src/resolution/cpp-includers.ts:167–178  ·  view source on GitHub ↗
(context: ResolutionContext)

Source from the content-addressed store, hash-verified

165 * directive. Names with no extension are the standard library's (`<vector>`).
166 */
167export function cppIncludedSources(context: ResolutionContext): string[] {
168 const memo = memoFor(context);
169 const found = new Set<string>();
170 for (const [name, includes] of includesByName(context, memo)) {
171 if (!name.includes('.') || /\.(?:h|hh|hpp|hxx)$/i.test(name)) continue;
172 for (const include of includes) {
173 const file = includedFile(include, context, memo);
174 if (file !== null) found.add(file);
175 }
176 }
177 return [...found].sort();
178}
179
180/**
181 * Every file that includes `filePath`, directly or through the files that

Callers 1

memoForFunction · 0.90

Calls 4

includesByNameFunction · 0.85
includedFileFunction · 0.85
memoForFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected