CodeQL library for C/C++
codeql/cpp-all 2.0.2-dev (changelog, source)
Search

Predicate pointstoinfo

A summary of the points-to information for the program, computed by collapsing the various flow and pointer relations using the Java class PointsToCalculator. This relation combines several kinds of information; the different kinds are filtered out by several relations further in the file: pointstosets, setflow, children, childrenByElement, parentSetFor.

The information represented by each tuple in the relation depends on the “label” element.

If the label is the empty string, then the tuple describes membership of element “elem” in points-to set “ptset”, and that children of the element are children of set “parent”.

If the label is “–flow–”, then the tuple describes flow from the “parent” points-to set to the “ptset” points-to set.

If the label is “–element–”, then the tuple declares that the set “ptset” is a child of “parent”, where the label of the child is “elem”.

In any other case, the tuple declares that set “ptset” is a child of “parent”, where the label is “label”.

Import path

import semmle.code.cpp.pointsto.PointsTo
predicate pointstoinfo(int parent, @element elem, string label, int ptset)