mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Swift: Add CFG for a couple more expressions.
This commit is contained in:
@@ -908,6 +908,8 @@ module Exprs {
|
||||
}
|
||||
}
|
||||
|
||||
private class TypeTree extends LeafTree instanceof TypeExpr { }
|
||||
|
||||
private class DynamicTypeTree extends StandardPostOrderTree instanceof DynamicTypeExpr {
|
||||
final override ControlFlowTree getChildElement(int i) {
|
||||
result = super.getBaseExpr().getFullyConverted() and i = 0
|
||||
@@ -951,7 +953,13 @@ module Exprs {
|
||||
}
|
||||
}
|
||||
|
||||
private class DeclRefExprTree extends LeafTree, DeclRefExpr { }
|
||||
private class DeclRefExprTree extends LeafTree instanceof DeclRefExpr { }
|
||||
|
||||
private class MemberRefTree extends StandardPostOrderTree instanceof MemberRefExpr {
|
||||
final override AstNode getChildElement(int i) {
|
||||
result = super.getBaseExpr().getFullyConverted() and i = 0
|
||||
}
|
||||
}
|
||||
|
||||
private class ApplyExprTree extends StandardPostOrderTree instanceof ApplyExpr {
|
||||
ApplyExprTree() {
|
||||
@@ -969,6 +977,15 @@ module Exprs {
|
||||
}
|
||||
}
|
||||
|
||||
private class DefaultArgumentTree extends LeafTree instanceof DefaultArgumentExpr { }
|
||||
|
||||
private class ForceValueTree extends StandardPostOrderTree instanceof ForceValueExpr {
|
||||
override AstNode getChildElement(int i) {
|
||||
i = 0 and
|
||||
result = super.getSubExpr().getFullyConverted()
|
||||
}
|
||||
}
|
||||
|
||||
private class LogicalAndTree extends PostOrderTree, LogicalAndExpr {
|
||||
final override predicate propagatesAbnormal(AstNode child) {
|
||||
child = this.getAnOperand().getFullyConverted()
|
||||
|
||||
Reference in New Issue
Block a user