C++: Doc correction and TODOs for interpretOutput, interpretInput.

This commit is contained in:
Geoffrey White
2024-03-11 10:15:07 +00:00
parent e8d0f1fa3e
commit 4bc272da73

View File

@@ -150,7 +150,7 @@ module SourceSinkInterpretationInput implements
/** Provides additional sink specification logic. */ /** Provides additional sink specification logic. */
bindingset[c] bindingset[c]
predicate interpretOutput(string c, InterpretNode mid, InterpretNode node) { predicate interpretOutput(string c, InterpretNode mid, InterpretNode node) {
// Allow fields to be picked as output nodes. // Allow variables to be picked as output nodes.
exists(Node n, Element ast | exists(Node n, Element ast |
n = node.asNode() and n = node.asNode() and
ast = mid.asElement() ast = mid.asElement()
@@ -158,6 +158,7 @@ module SourceSinkInterpretationInput implements
c = "" and c = "" and
n.asExpr().(VariableAccess).getTarget() = ast n.asExpr().(VariableAccess).getTarget() = ast
) )
// TODO: source fields?
} }
/** Provides additional source specification logic. */ /** Provides additional source specification logic. */
@@ -169,6 +170,7 @@ module SourceSinkInterpretationInput implements
e.getTarget() = ast e.getTarget() = ast
| |
// Allow fields to be picked as input nodes. // Allow fields to be picked as input nodes.
// TODO: this has no test cases.
c = "" and c = "" and
e.getQualifier() = n.asExpr() e.getQualifier() = n.asExpr()
or or
@@ -188,6 +190,7 @@ module SourceSinkInterpretationInput implements
or or
// Allow post update nodes to be picked as input nodes when the `input` column // Allow post update nodes to be picked as input nodes when the `input` column
// of the row is `PostUpdate`. // of the row is `PostUpdate`.
// TODO: this has no test cases.
c = "PostUpdate" and c = "PostUpdate" and
e.getQualifier() = n.(PostUpdateNode).getPreUpdateNode().asExpr() e.getQualifier() = n.(PostUpdateNode).getPreUpdateNode().asExpr()
) )