MCPcopy Create free account
hub / github.com/VKCOM/kphp / dfs_is_uninited_usage

Method dfs_is_uninited_usage

compiler/pipes/cfg.cpp:1111–1130  ·  view source on GitHub ↗

test whether a read usage operates potentially uninited var for example, function f() { if(1) $a = 1; echo $a; f1($a); } — usages 2 and 3 are potentially uninited (but! we'll trigger an error only for the first uninited usage (2 in this case), not for all) here, having a read usage, we traverse up all available paths stopping and write usages if we reach function root — it's an uninited usage

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected