mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Remove StoreDestinationAsPostUpdateNode
This commit is contained in:
@@ -84,6 +84,9 @@ class UninitializedNode extends Node, UninitializedInstruction {
|
||||
* Nodes corresponding to AST elements, for example `ExprNode`, usually refer
|
||||
* to the value before the update with the exception of `ClassInstanceExpr`,
|
||||
* which represents the value after the constructor has run.
|
||||
*
|
||||
* This class exists to match the interface used by Java. There are currently no non-abstract
|
||||
* classes that extend it. When we implement field flow, we can revisit this.
|
||||
*/
|
||||
abstract class PostUpdateNode extends Node {
|
||||
/**
|
||||
@@ -92,17 +95,6 @@ abstract class PostUpdateNode extends Node {
|
||||
abstract Node getPreUpdateNode();
|
||||
}
|
||||
|
||||
class StoreDestinationAsPostUpdateNode extends PostUpdateNode {
|
||||
StoreInstruction si;
|
||||
StoreDestinationAsPostUpdateNode() {
|
||||
this = si.getDestinationAddress()
|
||||
}
|
||||
|
||||
override Node getPreUpdateNode() {
|
||||
result = si.getDestinationAddress()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `Node` corresponding to `e`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user