Skip to content

Commit 2399371

Browse files
Revert "C++: Avoid creating ExprNodes for Conversions"
This reverts commit df882a9.
1 parent df882a9 commit 2399371

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ class Node extends Instruction {
2525
}
2626

2727
/** Gets the expression corresponding to this node, if any. */
28-
Expr asExpr() {
29-
result = this.getConvertedResultExpression() and
30-
// Ignore conversions. The AST-based library does have an `ExprNode` for each `Conversion`, but
31-
// there is no flow involving those nodes.
32-
not result instanceof Conversion
33-
}
28+
Expr asExpr() { result = this.getConvertedResultExpression() }
3429

3530
/** Gets the parameter corresponding to this node, if any. */
3631
Parameter asParameter() { result = this.(InitializeParameterInstruction).getParameter() }
@@ -105,9 +100,7 @@ abstract class PostUpdateNode extends Node {
105100
/**
106101
* Gets the `Node` corresponding to `e`.
107102
*/
108-
ExprNode exprNode(Expr e) {
109-
result.getExpr() = e
110-
}
103+
ExprNode exprNode(Expr e) { result.getExpr() = e }
111104

112105
/**
113106
* Gets the `Node` corresponding to the value of `p` at function entry.

0 commit comments

Comments
 (0)