Documentation
¶
Overview ¶
Package cpp implements a gorisk analyzer for C/C++ projects. It supports vcpkg.json, conanfile.py, and conanfile.txt.
Package cpp implements a gorisk analyzer for C/C++ projects. It supports vcpkg.json, conanfile.py, and conanfile.txt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildIRGraph ¶
func BuildIRGraph(g *graph.DependencyGraph) ir.IRGraph
BuildIRGraph constructs a function-level IR graph from a DependencyGraph by recursively parsing C/C++ source files in each package directory.
func Detect ¶
func Detect(dir string) capability.CapabilitySet
Detect walks C/C++ source files in dir and returns the combined capability set.
func DetectFunctions ¶
func DetectFunctions(dir, pkgName string, files []string) (map[string]ir.FunctionCaps, []ir.CallEdge, error)
DetectFunctions parses C/C++ source files in dir and returns per-function capability sets and call edges.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter implements the analyzer.Adapter interface for C/C++ projects.
type CppFunction ¶
CppFunction represents a C/C++ function found in source.
type CppPackage ¶
CppPackage represents a C/C++ dependency extracted from a package manifest.
func Load ¶
func Load(dir string) (pkgs []CppPackage, retErr error)
Load detects and parses the C/C++ dependency manifest in dir. Priority: vcpkg.json → conanfile.py → conanfile.txt Load never panics; it returns a structured error on failure.