Merge pull request #17070 from aschackmull/dataflow/pptype-refactor

Dataflow: Replace `ppReprType` with `DataFlowType.toString`.
This commit is contained in:
Anders Schack-Mulligen
2024-07-25 14:30:08 +02:00
committed by GitHub
11 changed files with 36 additions and 46 deletions

View File

@@ -548,12 +548,9 @@ DataFlowType getNodeType(Node n)
```
and every `Node` should have a type.
One also needs to define the string representation of a `DataFlowType`:
```ql
string ppReprType(DataFlowType t)
```
The `ppReprType` predicate is used for printing a type in the labels of
`PathNode`s, this can be defined as `none()` if type pruning is not used.
One also needs to define the string representation of a `DataFlowType`.
The `DataFlowType.toString` predicate is used for printing a type in the labels of
`PathNode`s, this should be defined as `result = ""` if type pruning is not used.
Finally, one must define `CastNode` as a subclass of `Node` as those nodes
where types should be checked. Usually this will be things like explicit casts.