You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cpychecker: Eliminate absinterp.Location in favor of a stmtgraph.StmtNode
Previously in cpychecker, we tracked the PC location of a state using the
absinterp.Location class, which tracked a BB and an index into the stmt
array.
This commit eliminates that class in favor of using a
gccutils.graph.stmtgraph, where each gimple statement is a
stmtgraph.StmtNode, simplifying locations to being nodes within a directed
graph.
The logic for ignoring exception-handling edges can be reduced to simply
not building those edges when initially creating the StmtGraph.
We add an ordering to stmtgraph.StmtEdge, to ensure deterministic orderings.
Motivation:
(A) absinterp.Location vs gcc.Location was confusing
(B) we may be able to solve:
https://fedorahosted.org/gcc-python-plugin/ticket/58
by doing some manipulation of the stmtgraph, undoing the sharing of
return statements, so that each "return" in the source code gets its
own node, and updating the locations accordingly. (Alternatively, we
could just use the location of the last stmt in the trace that had a
non-None location)
0 commit comments