mirror of
https://github.com/github/codeql.git
synced 2026-02-19 16:33:40 +01:00
Update CFG to match changes to Call/MethodCall
This commit is contained in:
@@ -319,10 +319,13 @@ module Trees {
|
||||
}
|
||||
|
||||
private class CallTree extends StandardPostOrderTree, Call {
|
||||
// this.getBlock() is not included as it uses a different scope
|
||||
final override AstNode getChildNode(int i) {
|
||||
result = this.getReceiver() and i = 0
|
||||
result = this.getArguments() and i = 0
|
||||
or
|
||||
result = this.getMethod() and i = 1
|
||||
result = this.getReceiver() and i = 1
|
||||
or
|
||||
result = this.getMethod() and i = 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,15 +772,6 @@ module Trees {
|
||||
override predicate isHidden() { any() }
|
||||
}
|
||||
|
||||
private class MethodCallTree extends StandardPostOrderTree, MethodCall {
|
||||
// this.getBlock() is not included as it uses a different scope
|
||||
final override AstNode getChildNode(int i) {
|
||||
result = this.getArguments() and i = 0
|
||||
or
|
||||
result = this.getMethod() and i = 1
|
||||
}
|
||||
}
|
||||
|
||||
private class MethodParametersTree extends StandardPreOrderTree, MethodParameters {
|
||||
final override AstNode getChildNode(int i) { result = this.getChild(i) }
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@ abstract class NonReturningCall extends AstNode {
|
||||
abstract Completion getACompletion();
|
||||
}
|
||||
|
||||
private class RaiseCall extends NonReturningCall, MethodCall {
|
||||
private class RaiseCall extends NonReturningCall, Call {
|
||||
RaiseCall() { this.getMethod().toString() = "raise" }
|
||||
|
||||
override RaiseCompletion getACompletion() { not result instanceof NestedCompletion }
|
||||
}
|
||||
|
||||
private class ExitCall extends NonReturningCall, MethodCall {
|
||||
private class ExitCall extends NonReturningCall, Call {
|
||||
ExitCall() { this.getMethod().toString() in ["abort", "exit"] }
|
||||
|
||||
override ExitCompletion getACompletion() { not result instanceof NestedCompletion }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user