MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / isHeaderFunction

Method isHeaderFunction

lib/base-compiler.ts:1987–1988  ·  view source on GitHub ↗
(piece: string)

Source from the content-addressed store, hash-verified

1985 const pieces = content.split(/(?=^;; Function )/m);
1986
1987 const isHeaderFunction = (piece: string) =>
1988 !piece.includes(sourceBasename) && /\/usr\/|\/opt\/|\/include\//.test(piece);
1989
1990 const kept =
1991 pieces.length <= 1

Callers

nothing calls this directly

Calls 1

testMethod · 0.80

Tested by

no test coverage detected